TsgcSTUNClient › Properties › NotifyEvents
NotifyEvents Property
Selects how threaded events are synchronized with the main VCL/FMX thread.
Syntax
property NotifyEvents: TwsNotifyEvent read GetNotifyEvents write SetNotifyEvents;
Default Value
—
Remarks
Defines the threading model used to dispatch OnSTUN* events:
- neAsynchronous (default): events are queued and synchronized with the main thread asynchronously.
- neSynchronous: events are synchronized with the main thread using
TThread.Synchronize.
- neNoSync: events fire on the socket worker thread; you must handle thread safety yourself if the handler touches UI controls.
Example
oSTUN.NotifyEvents := neAsynchronous;
oSTUN.SendRequest;
Back to Properties