TsgcWSPServer_sgc › Events
Events you can handle, grouped by purpose, followed by the full alphabetical list.
| Name | Description |
|---|---|
| OnConnect | Fires after a client completes the WebSocket handshake for this subprotocol. |
| OnDisconnect | Fires when a client disconnects from the server. |
| OnError | Fires when the subprotocol reports a protocol-level error string for a connection. |
| OnException | Fires when an unhandled exception is raised while processing a connection. |
| Name | Description |
|---|---|
| OnMessage | Fires when a client sends a plain text message wrapped in the sgc envelope. |
| OnBinary | Fires when a client sends a binary frame to the server. |
| OnFragmented | Fires for each fragment of a fragmented WebSocket message received from a client. |
| OnRawMessage | Fires before a text message is decoded, allowing the handler to consume it. |
| Name | Description |
|---|---|
| OnBeforeSubscription | Fires before a subscription is accepted; the handler can deny or authorise it. |
| OnSubscription | Fires after a client successfully subscribes to a channel. |
| OnUnSubscription | Fires after a client unsubscribes from a channel. |
| OnBeforePublish | Fires before a client publication is broadcast; the handler can rewrite or deny it. |
| OnNotification | Fires when a client sends a JSON-RPC Notification (no Id, no reply expected). |
| OnAcknowledgment | Fires when a client confirms receipt of a QoS Level 1 or Level 2 message. |
| Name | Description |
|---|---|
| OnRPC | Fires when a client invokes a JSON-RPC method on this server. |
| OnRPCAuthentication | Fires when an RPC method is not on the allow-list, letting the handler authorise it. |
| Name | Description |
|---|---|
| OnAcknowledgment | Fires when a client confirms receipt of a QoS Level 1 or Level 2 message. |
| OnBeforePublish | Fires before a client publication is broadcast; the handler can rewrite or deny it. |
| OnBeforeSubscription | Fires before a subscription is accepted; the handler can deny or authorise it. |
| OnBinary | Fires when a client sends a binary frame to the server. |
| OnConnect | Fires after a client completes the WebSocket handshake for this subprotocol. |
| OnDisconnect | Fires when a client disconnects from the server. |
| OnError | Fires when the subprotocol reports a protocol-level error string for a connection. |
| OnException | Fires when an unhandled exception is raised while processing a connection. |
| OnFragmented | Fires for each fragment of a fragmented WebSocket message received from a client. |
| OnMessage | Fires when a client sends a plain text message wrapped in the sgc envelope. |
| OnNotification | Fires when a client sends a JSON-RPC Notification (no Id, no reply expected). |
| OnRawMessage | Fires before a text message is decoded, allowing the handler to consume it. |
| OnRPC | Fires when a client invokes a JSON-RPC method on this server. |
| OnRPCAuthentication | Fires when an RPC method is not on the allow-list, letting the handler authorise it. |
| OnSubscription | Fires after a client successfully subscribes to a channel. |
| OnUnSubscription | Fires after a client unsubscribes from a channel. |