#include <icy/turn/client/client.h>Subclassed by:
TCPClientObserver
Abstract observer interface for TURN client events. Callers subclass this to receive allocation lifecycle and data relay callbacks.
| Return | Name | Description |
|---|---|---|
void | onClientStateChange | Called whenever the client's state machine transitions to a new state. |
void | onRelayDataReceived | Called when relayed data is received from a peer via a Data Indication. |
void | onAllocationFailed virtual inline | Called when the server rejects an Allocate request with an error. |
void | onAllocationDeleted virtual inline | Called when the server confirms deletion of the allocation. |
void | onAllocationPermissionsCreated virtual inline | Called after a CreatePermission request succeeds. |
void | onTransactionResponse virtual inline | All received transaction responses will be routed here after local processing so the observer can easily implement extra functionality. |
void | onTimer virtual inline | Fires after the client's internal timer callback. Handy for performing extra async cleanup tasks. |
void onClientStateChange(Client & client, ClientState & state, const ClientState & oldState)Called whenever the client's state machine transitions to a new state.
client The client that changed state.
state The new state.
oldState The previous state.
void onRelayDataReceived(Client & client, const char * data, size_t size, const net::Address & peerAddress)Called when relayed data is received from a peer via a Data Indication.
client The owning client.
data Pointer to the received payload bytes.
size Number of bytes in data.
peerAddress Source address of the remote peer.
virtual inline
virtual inline void onAllocationFailed(Client & client, int errorCode, const std::string & reason)Called when the server rejects an Allocate request with an error.
client The owning client.
errorCode STUN error code (e.g. 401, 438).
reason Human-readable error reason string.
virtual inline
virtual inline void onAllocationDeleted(Client & client, const stun::Transaction & transaction)Called when the server confirms deletion of the allocation.
client The owning client.
transaction The completed Refresh transaction (lifetime == 0).
virtual inline
virtual inline void onAllocationPermissionsCreated(Client & client, const PermissionList & permissions)Called after a CreatePermission request succeeds.
client The owning client.
permissions The full list of active permissions after this update.
virtual inline
virtual inline void onTransactionResponse(Client & client, const stun::Transaction & transaction)All received transaction responses will be routed here after local processing so the observer can easily implement extra functionality.
client The owning client.
transaction The completed transaction (request + response accessible).
virtual inline
virtual inline void onTimer(Client & client)Fires after the client's internal timer callback. Handy for performing extra async cleanup tasks.
client The owning client.