TsgcWebSocketServer_HTTPAPI › Methods › Stop
Stops the HTTP.sys server from a secondary thread so the calling thread is not blocked while connections are closed and the request queue is released.
public void Stop();
Stop spawns an internal worker thread that sets Active := False, so the caller returns immediately instead of blocking while every active WebSocket connection is torn down. The server calls DisconnectAll internally to drop open clients, removes the registered URL group and closes the HTTP.sys request queue. Subscribe to OnShutdown to be notified once the server has fully stopped and no further requests are accepted. Use the Active property directly if you prefer a synchronous shutdown that runs on the calling thread.
oServer.Stop();