#include <icy/turn/client/tcpclient.h>Inherits:
ClientObserver
Observer interface for TCP TURN client events (RFC 6062). Extends ClientObserver with callbacks specific to TCP relay connections.
| Return | Name | Description |
|---|---|---|
void | onRelayConnectionCreated | Called when a ConnectionBind succeeds and the relay pipe is live. |
void | onRelayConnectionError virtual inline | Called when an error occurs on a relay connection socket. |
void | onRelayConnectionClosed | Called when a relay connection socket is closed. |
void | onRelayConnectionBindingFailed virtual inline | Called when a Connect request (client-initiated) or a ConnectionBind handshake fails for the given peer. |
bool | onPeerConnectionAttempt virtual inline | Called when the server sends a ConnectionAttempt indication indicating that a remote peer wants to connect. Return true to accept the connection (proceeds with ConnectionBind), or false to reject it. |
void onRelayConnectionCreated(TCPClient & client, const net::TCPSocket::Ptr & socket, const net::Address & peerAddress)Called when a ConnectionBind succeeds and the relay pipe is live.
client The owning TCP client.
socket The TCP socket that is now connected to the TURN server and ready for direct data transfer to/from the peer.
peerAddress The remote peer address associated with this connection.
virtual inline
virtual inline void onRelayConnectionError(TCPClient & client, const net::TCPSocket::Ptr & socket, const net::Address & peerAddress)Called when an error occurs on a relay connection socket.
client The owning TCP client.
socket The affected socket.
peerAddress The remote peer address for this connection.
void onRelayConnectionClosed(TCPClient & client, const net::TCPSocket::Ptr & socket, const net::Address & peerAddress)Called when a relay connection socket is closed.
client The owning TCP client.
socket The closed socket.
peerAddress The remote peer address for this connection.
virtual inline
virtual inline void onRelayConnectionBindingFailed(TCPClient & client, const net::Address & peerAddress)Called when a Connect request (client-initiated) or a ConnectionBind handshake fails for the given peer.
client The owning TCP client.
peerAddress The peer address whose binding failed.
virtual inline
virtual inline bool onPeerConnectionAttempt(TCPClient & client, const net::Address & peerAddress)Called when the server sends a ConnectionAttempt indication indicating that a remote peer wants to connect. Return true to accept the connection (proceeds with ConnectionBind), or false to reject it.
client The owning TCP client.
peerAddress The address of the connecting peer.
true to accept and bind, false to ignore.