TsgcTURNClient › 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* and OnTURN* 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. This mode minimises latency for OnTURNDataIndication and OnTURNChannelData, which may fire at the rate of the relayed media stream.
Example
oTURN.NotifyEvents := neAsynchronous;
oTURN.Allocate;
Back to Properties