TsgcWebSocketHTTPServer › Methods

TsgcWebSocketHTTPServer Methods

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

Connection

NameDescription
StartStarts the HTTP server from a secondary thread so the calling thread is not blocked while bindings are opened.
StopStops the HTTP server from a secondary thread so the calling thread is not blocked while connections are closed.
ReStartStops and then restarts the server from a secondary thread, useful after changing bindings or ports at runtime.
DisconnectAllDisconnects every active client connection while keeping the server listening for new connections.

Messaging

NameDescription
BroadcastSends the same WebSocket message to all connected clients, optionally filtered by channel, protocol, or connection GUID list.
WriteDataSends a WebSocket message to a single client identified by its connection GUID.
PingSends a WebSocket ping frame to every connected WebSocket client.

HTTP/2 Push

NameDescription
PushPromiseAddPreLoadLinksRegisters an HTTP/2 Server Push rule that preloads a set of related resources whenever a matching request path is served.
PushPromiseRemovePreLoadLinksRemoves the HTTP/2 Server Push rule previously registered for the given request path.

All Methods (alphabetical)

NameDescription
BroadcastSends the same WebSocket message to all connected clients, optionally filtered by channel, protocol, or connection GUID list.
DisconnectAllDisconnects every active client connection while keeping the server listening for new connections.
PingSends a WebSocket ping frame to every connected WebSocket client.
PushPromiseAddPreLoadLinksRegisters an HTTP/2 Server Push rule that preloads a set of related resources whenever a matching request path is served.
PushPromiseRemovePreLoadLinksRemoves the HTTP/2 Server Push rule previously registered for the given request path.
ReStartStops and then restarts the server from a secondary thread, useful after changing bindings or ports at runtime.
StartStarts the HTTP server from a secondary thread so the calling thread is not blocked while bindings are opened.
StopStops the HTTP server from a secondary thread so the calling thread is not blocked while connections are closed.
WriteDataSends a WebSocket message to a single client identified by its connection GUID.