TsgcWSPClient_sgc › Events

TsgcWSPClient_sgc Events

Events you can handle, grouped by purpose, followed by the full alphabetical list.

Lifecycle

NameDescription
OnConnectFires after the WebSocket handshake completes and the sgc subprotocol is initialized.
OnDisconnectFires when the connection is closed, reporting the close code.
OnErrorFires when the server or transport reports an error string.
OnExceptionFires when an unhandled exception occurs on the connection.
OnSessionFires after a successful connection or GetSession request with the assigned session Guid.

Messaging

NameDescription
OnMessageFires when a plain text message arrives on the sgc channel.
OnBinaryFires when a binary frame arrives; payload is delivered as a TMemoryStream.
OnFragmentedFires for fragmented WebSocket frames, exposing OpCode and continuation flag.
OnRawMessageFires before the component parses a message; set Handled to True to suppress default processing.

PubSub

NameDescription
OnSubscriptionFires when the client has been subscribed to a channel.
OnUnSubscriptionFires when the client has been unsubscribed from a channel.
OnEventFires when a message is received on a subscribed channel.
OnAcknowledgmentFires when the server acknowledges receipt of a QoS 1 or 2 message.

RPC

NameDescription
OnRPCResultFires when the server returns a successful RPC response.
OnRPCErrorFires when the server returns an error response to an RPC request.

All Events (alphabetical)

NameDescription
OnAcknowledgmentFires when the server acknowledges receipt of a QoS 1 or 2 message.
OnBinaryFires when a binary frame arrives; payload is delivered as a TMemoryStream.
OnConnectFires after the WebSocket handshake completes and the sgc subprotocol is initialized.
OnDisconnectFires when the connection is closed, reporting the close code.
OnErrorFires when the server or transport reports an error string.
OnEventFires when a message is received on a subscribed channel.
OnExceptionFires when an unhandled exception occurs on the connection.
OnFragmentedFires for fragmented WebSocket frames, exposing OpCode and continuation flag.
OnMessageFires when a plain text message arrives on the sgc channel.
OnRawMessageFires before the component parses a message; set Handled to True to suppress default processing.
OnRPCErrorFires when the server returns an error response to an RPC request.
OnRPCResultFires when the server returns a successful RPC response.
OnSessionFires after a successful connection or GetSession request with the assigned session Guid.
OnSubscriptionFires when the client has been subscribed to a channel.
OnUnSubscriptionFires when the client has been unsubscribed from a channel.