TsgcWebSocketClient › Properties › NotifyEvents
Controls how WebSocket events are dispatched to the main thread.
public TwsNotifyEvent NotifyEvents { get; set; }
neAsynchronous
Three modes are available: neAsynchronous (default) queues events and synchronises them with the main thread asynchronously; neSynchronous blocks the connection thread until the main thread has processed the event (uses TThread.Synchronize); neNoSync fires events directly on the connection thread, which is faster but requires the event handler to be thread-safe.
oClient = new TsgcWebSocketClient();
oClient.URL = "wss://www.esegece.com:2053";
oClient.NotifyEvents = TwsNotifyEvent.neSynchronous;
oClient.Active = true;