TsgcTURNClient › Events

TsgcTURNClient Events

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

STUN lifecycle

NameDescription
OnSTUNBeforeSendFires just before a STUN/TURN message is sent to the server, allowing last-minute inspection or modification.
OnSTUNResponseSuccessFires when the server returns a success response to any STUN or TURN request.
OnSTUNResponseErrorFires when the server returns an error response (for example 401 Unauthorized or 437 Allocation Mismatch).
OnSTUNExceptionFires when a transport, parsing or timeout exception occurs while processing a STUN/TURN message.

TURN lifecycle

NameDescription
OnTURNAllocateFires after a successful ALLOCATE response; exposes the relayed IP address and port assigned by the server.
OnTURNRefreshFires after a successful REFRESH response, reporting the new allocation lifetime.
OnTURNCreatePermissionFires after a successful CreatePermission response for the requested peer IP.
OnTURNChannelBindFires after a successful ChannelBind response; exposes the channel number assigned to the peer.

TURN data

NameDescription
OnTURNDataIndicationFires when the client receives a DATA Indication relayed from a peer that has no bound channel.
OnTURNChannelDataFires when the client receives a ChannelData message relayed from a peer bound to a channel.
OnTURNICMPIndicationFires when the server forwards an ICMP error received from a peer (for example unreachable or TTL exceeded).

All Events (alphabetical)

NameDescription
OnSTUNBeforeSendFires just before a STUN/TURN message is sent to the server, allowing last-minute inspection or modification.
OnSTUNExceptionFires when a transport, parsing or timeout exception occurs while processing a STUN/TURN message.
OnSTUNResponseErrorFires when the server returns an error response (for example 401 Unauthorized or 437 Allocation Mismatch).
OnSTUNResponseSuccessFires when the server returns a success response to any STUN or TURN request.
OnTURNAllocateFires after a successful ALLOCATE response; exposes the relayed IP address and port assigned by the server.
OnTURNChannelBindFires after a successful ChannelBind response; exposes the channel number assigned to the peer.
OnTURNChannelDataFires when the client receives a ChannelData message relayed from a peer bound to a channel.
OnTURNCreatePermissionFires after a successful CreatePermission response for the requested peer IP.
OnTURNDataIndicationFires when the client receives a DATA Indication relayed from a peer that has no bound channel.
OnTURNICMPIndicationFires when the server forwards an ICMP error received from a peer (for example unreachable or TTL exceeded).
OnTURNRefreshFires after a successful REFRESH response, reporting the new allocation lifetime.