TsgcSSEClient › Properties › NotifyEvents

NotifyEvents Property

Controls how the events are dispatched to the main thread.

Syntax

property NotifyEvents: TwsNotifyEvent read FNotifyEvents write FNotifyEvents;

Default Value

neAsynchronous (neNoSync in console applications and DLLs)

Remarks

The stream is read on a background thread. neAsynchronous queues the events and runs them on the main thread, neSynchronous waits until the main thread has run each event, and neNoSync fires the events directly on the background thread, which suits console applications and services but requires thread-safe handlers. OnReconnect and OnBeforeConnect always run on the background thread.

Example


oSSE.NotifyEvents := neNoSync;
oSSE.Open;

Back to Properties