#include <icy/turn/server/tcpconnectionpair.h>Inherits:
RefCounted< TCPConnectionPair >
Paired TCP connections forming a single TURN relay pipe between a client and a peer. Lifetime managed by IntrusivePtr; the owning TCPAllocation holds the Ptr in its pair map.
| Return | Name | Description |
|---|---|---|
TCPAllocation & | allocation | |
net::SocketEmitter | client | |
net::SocketEmitter | peer | |
Buffer | earlyPeerData | |
uint32_t | connectionID | |
bool | isDataConnection | |
bool | pendingDelete | |
Timeout | timeout | |
stun::TransactionID | transactionID |
TCPAllocation & allocationnet::SocketEmitter clientnet::SocketEmitter peerBuffer earlyPeerDatauint32_t connectionIDbool isDataConnectionbool pendingDelete = falseTimeout timeoutstun::TransactionID transactionID| Return | Name | Description |
|---|---|---|
TCPConnectionPair | Constructs a pair with a randomly assigned connection ID. The caller must add the pair to the allocation's pair map. | |
bool | doPeerConnect | |
bool | makeDataConnection | |
void | setPeerSocket | |
void | setClientSocket | |
bool | onPeerConnectSuccess | |
bool | onPeerConnectError | |
bool | onClientDataReceived | |
bool | onPeerDataReceived | |
bool | onConnectionClosed | |
void | startTimeout | |
void | requestDeletion | |
bool | expired const |
TCPConnectionPair(TCPAllocation & allocation)Constructs a pair with a randomly assigned connection ID. The caller must add the pair to the allocation's pair map.
allocation The TCPAllocation that owns this pair.bool doPeerConnect(const net::Address & peerAddr)bool makeDataConnection()void setPeerSocket(const net::TCPSocket::Ptr & socket)void setClientSocket(const net::TCPSocket::Ptr & socket)bool onPeerConnectSuccess(net::Socket & socket)bool onPeerConnectError(net::Socket & socket, const Error & error)bool onClientDataReceived(net::Socket & socket, const MutableBuffer & buffer, const net::Address & peerAddress)bool onPeerDataReceived(net::Socket & socket, const MutableBuffer & buffer, const net::Address & peerAddress)bool onConnectionClosed(net::Socket & socket)void startTimeout()void requestDeletion()const
bool expired() const| Name | Description |
|---|---|
Ptr |
IntrusivePtr< TCPConnectionPair > Ptr()| Return | Name | Description |
|---|---|---|
TCPConnectionPair | Deleted constructor. | |
TCPConnectionPair | Deleted constructor. |
TCPConnectionPair(const TCPConnectionPair &) = deleteDeleted constructor.
TCPConnectionPair(TCPConnectionPair &&) = deleteDeleted constructor.