TsgcWebSocketServer_HTTPAPI › Events › OnShutdown
Fires after the HTTP API server has stopped and no more requests are accepted.
public event TNotifyEventHandler OnShutdown;
// delegate void TNotifyEventHandler(TObject Sender)
—
OnShutdown is raised after the HTTP.SYS request queue has been closed and all active WebSocket connections have been released. The Sender parameter is the TsgcWebSocketServer_HTTPAPI 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.
void OnShutdown()
{
Console.WriteLine("#server stopped");
}