TsgcWebSocketClient › Methods

TsgcWebSocketClient Methods

Public methods grouped by purpose, followed by the full alphabetical list.

Connection

NameDescription
StartConnects to the server asynchronously from a secondary thread so the calling thread is not blocked.
StopDisconnects from the server asynchronously from a secondary thread so the calling thread is not blocked.
ConnectOpens the WebSocket connection synchronously and blocks the caller until the handshake completes or the timeout elapses.
DisconnectCloses the WebSocket connection synchronously and blocks the caller until the disconnection completes or the timeout elapses.
ConnectedQueries the underlying socket to determine whether the client is currently connected to the server.

Messaging

NameDescription
PingSends a WebSocket ping frame to the server and returns immediately without waiting for the pong response.
WriteDataSends a text message to the WebSocket server, optionally splitting it into fragments of a given size.
WriteAndWaitDataSends a text message and blocks the caller until the server responds with a text message or the timeout elapses.

All Methods (alphabetical)

NameDescription
ConnectOpens the WebSocket connection synchronously and blocks the caller until the handshake completes or the timeout elapses.
ConnectedQueries the underlying socket to determine whether the client is currently connected to the server.
DisconnectCloses the WebSocket connection synchronously and blocks the caller until the disconnection completes or the timeout elapses.
PingSends a WebSocket ping frame to the server and returns immediately without waiting for the pong response.
StartConnects to the server asynchronously from a secondary thread so the calling thread is not blocked.
StopDisconnects from the server asynchronously from a secondary thread so the calling thread is not blocked.
WriteAndWaitDataSends a text message and blocks the caller until the server responds with a text message or the timeout elapses.
WriteDataSends a text message to the WebSocket server, optionally splitting it into fragments of a given size.