TsgcWSPServer_WebRTC › Events

TsgcWSPServer_WebRTC Events

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

Lifecycle

NameDescription
OnConnectFires on the server once a peer finishes the WebSocket handshake and attaches to the WebRTC signalling subprotocol.
OnDisconnectFires on the server when a signalling peer closes its transport or the server drops it.
OnErrorFires when the server detects a transport or protocol-level error on a signalling connection.
OnExceptionFires when a Delphi exception is raised inside the server's worker threads or user event handlers.

Messaging

NameDescription
OnMessageFires for incoming text frames that the signalling decoder did not route to a dedicated subscription or WebRTC relay event.
OnBinaryFires when a peer sends a binary WebSocket frame that is not part of the JSON-text signalling protocol.
OnFragmentedFires for each fragment of a multi-frame WebSocket message received from a peer before the payload is reassembled.
OnRawMessageFires before signalling decoding, letting the server inspect every incoming text frame and optionally suppress further processing.

PubSub

NameDescription
OnBeforeSubscriptionFires when a peer asks to join a signalling channel, giving the server the chance to accept or reject the subscription.
OnSubscriptionFires after a peer subscription has been accepted and the signalling server has registered the peer on the channel.
OnUnSubscriptionFires when a peer leaves a signalling channel and the server has removed it from the subscriber list.

All Events (alphabetical)

NameDescription
OnBeforeSubscriptionFires when a peer asks to join a signalling channel, giving the server the chance to accept or reject the subscription.
OnBinaryFires when a peer sends a binary WebSocket frame that is not part of the JSON-text signalling protocol.
OnConnectFires on the server once a peer finishes the WebSocket handshake and attaches to the WebRTC signalling subprotocol.
OnDisconnectFires on the server when a signalling peer closes its transport or the server drops it.
OnErrorFires when the server detects a transport or protocol-level error on a signalling connection.
OnExceptionFires when a Delphi exception is raised inside the server's worker threads or user event handlers.
OnFragmentedFires for each fragment of a multi-frame WebSocket message received from a peer before the payload is reassembled.
OnMessageFires for incoming text frames that the signalling decoder did not route to a dedicated subscription or WebRTC relay event.
OnRawMessageFires before signalling decoding, letting the server inspect every incoming text frame and optionally suppress further processing.
OnSubscriptionFires after a peer subscription has been accepted and the signalling server has registered the peer on the channel.
OnUnSubscriptionFires when a peer leaves a signalling channel and the server has removed it from the subscriber list.