TsgcUDPCLient › Properties › NotifyEvents
Controls how received-datagram and exception events are dispatched to the main thread.
property NotifyEvents: TwsNotifyEvent read FNotifyEvents write SetNotifyEvents;
neAsynchronous
Determines the threading model used to fire OnUDPRead and OnUDPException. neAsynchronous (default) queues events and delivers them to the main thread in the background, so VCL/FMX controls can be touched safely without blocking the UDP reader; neSynchronous uses Synchronize to deliver each event and waits for the handler to return; neNoSync fires the event directly on the reader thread, which is the fastest option but requires the handler code to be thread-safe. Choose neNoSync only when event handlers do not access the UI.
oClient.NotifyEvents := neAsynchronous;