#include <icy/turn/fivetuple.h>TURN allocation identity tuple: client remote address, server local address, and transport protocol.
The TURN 5-tuple consists of a local address, a remote address, and the transport protocol used by the client to communicate with the server.
+---------+
| |
| External|
/ | Client |
// | |
/ | |
// +---------+
/
//
+-+ /
| | /
| | //
+---------+ | | +---------+ / +---------+
| | |N| | | // | |
| TURN | | | | |/ | External|
| Client |----|A|----------| TURN |------------------| Client |
| | | |^ ^| Server |^ ^| |
| | |T|| || || || |
+---------+ | || |+---------+| |+---------+
^ | || | | |
| | || | | |
| +-+| | | |
| | | | |
|
Internal Internal External External
Client Remote Local Local Remote
Performing Transport Transport Transport Transport
Allocations Address Address Address Address
| | | |
+-----+----+ +--------+-------+
| |
| |
Internal External
5-Tuple 5-tuple| Return | Name | Description |
|---|---|---|
FiveTuple | Constructs a default FiveTuple with empty addresses and UDP transport. | |
FiveTuple | Constructs a FiveTuple from explicit addresses and transport. | |
FiveTuple | Copy constructor. | |
const net::Address & | remote const inline | #### Returns |
const net::Address & | local const inline | #### Returns |
const net::TransportType & | transport const inline | #### Returns |
void | remote inline | Sets the remote address. |
void | local inline | Sets the local address. |
void | transport inline | Sets the transport protocol. |
bool | operator== const | Equality comparison; all three components must match. |
bool | operator< const | Less-than ordering based on remote then local port; used as std::map key. |
std::string | toString const | #### Returns |
FiveTuple()Constructs a default FiveTuple with empty addresses and UDP transport.
FiveTuple(const net::Address & remote, const net::Address & local, net::TransportType transport)Constructs a FiveTuple from explicit addresses and transport.
remote Client's remote transport address (as seen by the server).
local Server's local transport address.
FiveTuple(const FiveTuple & r)Copy constructor.
const inline
inline const net::Address & remote() constThe remote (client-side) transport address.
const inline
inline const net::Address & local() constThe local (server-side) transport address.
const inline
inline const net::TransportType & transport() constThe transport protocol for this tuple.
inline
inline void remote(const net::Address & remote)Sets the remote address.
remote New remote address.inline
inline void local(const net::Address & local)Sets the local address.
local New local address.inline
inline void transport(const net::TransportType & transport)Sets the transport protocol.
transport New transport type.const
bool operator==(const FiveTuple & r) constEquality comparison; all three components must match.
const
bool operator<(const FiveTuple & r) constLess-than ordering based on remote then local port; used as std::map key.
const
std::string toString() constA human-readable string of the form "FiveTuple[remote:local:transport]".
| Return | Name | Description |
|---|---|---|
net::Address | _remote | |
net::Address | _local | |
net::TransportType | _transport |
net::Address _remotenet::Address _localnet::TransportType _transport