TsgcWebSocketProxyServerEvents › OnShutdown

OnShutdown Event

Fires after the proxy server has stopped and no more connections are accepted.

Syntax

property OnShutdown: TNotifyEvent;
// TNotifyEvent = procedure(Sender: TObject) of object

Default Value

Remarks

OnShutdown is raised after the proxy server has stopped listening and all active downstream connections and their upstream TCP partners have been closed. The Sender parameter is the TsgcWebSocketProxyServer instance. Use it to update UI status, flush logs, or release resources associated with the server; note that DisconnectAll is invoked automatically before this event, so the connection list is already empty when the handler runs.

Example


procedure OnShutdown(Sender: TObject);
begin
  WriteLn('#server stopped');
end;

Back to Events