TsgcWSPServer_Presence › Events

TsgcWSPServer_Presence Events

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

Lifecycle

NameDescription
OnConnectFired when a client completes the WebSocket handshake for the Presence protocol.
OnDisconnectFired when a client disconnects from the Presence protocol.
OnErrorFired when a transport-level error is reported for a connection.
OnExceptionFired when an unhandled exception is caught while processing a Presence message.
OnRawMessageFired for every raw frame received before the Presence protocol parses it.

Members

NameDescription
OnBeforeNewMemberFired before a client joins as a Presence member; set Accept to False to reject.
OnNewMemberFired after a new member has been accepted and added to the member list.
OnRemoveMemberFired when a member disconnects or is removed from the Presence protocol.
OnBeforeNewChannelMemberFired before a member is added to an existing channel; set Accept to False to refuse.
OnNewChannelMemberFired after a member has successfully joined a channel.
OnRemoveChannelMemberFired when a member leaves a channel, whether by unsubscribing or disconnecting.
OnBeforeSendMembersFired before the channel member list is sent to a subscriber; set Accept to False to suppress it.
OnErrorMemberChannelFired when a member- or channel-related operation is rejected.

Channels

NameDescription
OnBeforeNewChannelFired before a new channel is created; set Accept to False to reject it.
OnNewChannelFired after a new channel has been accepted and registered.

Publishing

NameDescription
OnBeforePublishMsgFired before a client-published message is relayed; set Accept to False to drop it.
OnErrorPublishMsgFired when a publish request from a client is rejected.

All Events (alphabetical)

NameDescription
OnBeforeNewChannelFired before a new channel is created; set Accept to False to reject it.
OnBeforeNewChannelMemberFired before a member is added to an existing channel; set Accept to False to refuse.
OnBeforeNewMemberFired before a client joins as a Presence member; set Accept to False to reject.
OnBeforePublishMsgFired before a client-published message is relayed; set Accept to False to drop it.
OnBeforeSendMembersFired before the channel member list is sent to a subscriber; set Accept to False to suppress it.
OnConnectFired when a client completes the WebSocket handshake for the Presence protocol.
OnDisconnectFired when a client disconnects from the Presence protocol.
OnErrorFired when a transport-level error is reported for a connection.
OnErrorMemberChannelFired when a member- or channel-related operation is rejected.
OnErrorPublishMsgFired when a publish request from a client is rejected.
OnExceptionFired when an unhandled exception is caught while processing a Presence message.
OnNewChannelFired after a new channel has been accepted and registered.
OnNewChannelMemberFired after a member has successfully joined a channel.
OnNewMemberFired after a new member has been accepted and added to the member list.
OnRawMessageFired for every raw frame received before the Presence protocol parses it.
OnRemoveChannelMemberFired when a member leaves a channel, whether by unsubscribing or disconnecting.
OnRemoveMemberFired when a member disconnects or is removed from the Presence protocol.