TsgcWebSocketHTTPServer › Methods › Stop
Stops the HTTP server from a secondary thread so the calling thread is not blocked while connections are closed.
public void Stop();
Stop spawns an internal worker thread that sets Active := False, so the caller returns immediately instead of blocking while every active connection is torn down. The server closes its listening sockets and calls DisconnectAll internally to drop both WebSocket and HTTP keep-alive connections. Subscribe to OnShutdown to be notified once the server has fully stopped and no further connections are accepted. Use the Active property directly if you prefer a synchronous shutdown that runs on the calling thread.
oServer.Stop();