TsgcWebSocketServer_HTTPAPI › Methods › Ping
Sends a WebSocket ping frame to every connected client.
public void Ping();
Ping iterates the active connection list and sends an empty WebSocket ping frame to each client, returning once the frames are handed to the underlying HTTP.sys sockets. It is a convenient way to keep idle connections alive or to probe liveness manually in addition to the automatic HeartBeat mechanism. When the HeartBeat timeout is configured, the server closes any connection that does not answer within the window; without a timeout the call is fire-and-forget and any pong replies are delivered asynchronously through the standard connection events. Exceptions raised while writing are routed to OnException.
oServer.Ping();