TsgcWebSocketLoadBalancerServer › Methods › DisconnectAll
Disconnects every active client connection and every registered backup server while keeping the load balancer listening for new connections.
procedure DisconnectAll;
DisconnectAll walks the internal connection list under a lock and calls DisconnectPeer on each active client and each backup-server link, dropping the sockets at the TCP level without sending a WebSocket Close frame. The load balancer keeps listening for new incoming connections; this method does not stop or unbind the listener. OnDisconnect fires once for each connection that is closed, including backup servers that were registered against the load balancer. The method is invoked automatically when the load balancer stops, but you can call it at any time to forcibly clear the session table (for example after a configuration change or when draining the cluster before a restart).
oServer.DisconnectAll;