TsgcUDPServer › Events › OnStartup
Fires once the UDP listener is bound and ready to accept datagrams.
property OnStartup: TNotifyEvent;
// TNotifyEvent = procedure(Sender: TObject) of object
—
Fired from Active := True (directly or through Start/ReStart) after every binding has been opened and, when DTLS is enabled, after the DTLS handler has been initialized. Use the event to log that the server is alive, to refresh a status indicator in the UI, or to kick off any work that depends on the listener being available. The thread that fires the event depends on the NotifyEvents property; the default for the server is neNoSync so the handler runs on the worker thread that performed the transition.
procedure TForm1.oServerStartup(Sender: TObject);
begin
Memo1.Lines.Add('UDP server listening');
end;