FiveTuple
FiveTuple
#include <icy/turn/fivetuple.h>class FiveTupleDefined in src/turn/include/icy/turn/fivetuple.h:69
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-tupleList of all members
| Name | Kind | Owner |
|---|---|---|
operator<< | friend | Declared here |
FiveTuple | function | Declared here |
FiveTuple | function | Declared here |
FiveTuple | function | Declared here |
remote | function | Declared here |
local | function | Declared here |
transport | function | Declared here |
remote | function | Declared here |
local | function | Declared here |
transport | function | Declared here |
operator== | function | Declared here |
operator< | function | Declared here |
toString | function | Declared here |
_remote | variable | Declared here |
_local | variable | Declared here |
_transport | variable | Declared here |
Friends
| Name | Description |
|---|---|
operator<< inline |
operator<<
inline
friend inline std::ostream & operator<<(std::ostream & stream, const FiveTuple & tuple)Defined in src/turn/include/icy/turn/fivetuple.h:118
Public Methods
| 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 | |
const net::Address & | local const inline | |
const net::TransportType & | transport const inline | |
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 |
FiveTuple
FiveTuple()Defined in src/turn/include/icy/turn/fivetuple.h:73
Constructs a default FiveTuple with empty addresses and UDP transport.
FiveTuple
FiveTuple(const net::Address & remote, const net::Address & local, net::TransportType transport)Defined in src/turn/include/icy/turn/fivetuple.h:79
Constructs a FiveTuple from explicit addresses and transport.
Parameters
remoteClient's remote transport address (as seen by the server).localServer's local transport address.
FiveTuple
FiveTuple(const FiveTuple & r)Defined in src/turn/include/icy/turn/fivetuple.h:83
Copy constructor.
remote
const inline
inline const net::Address & remote() constDefined in src/turn/include/icy/turn/fivetuple.h:86
Returns
The remote (client-side) transport address.
local
const inline
inline const net::Address & local() constDefined in src/turn/include/icy/turn/fivetuple.h:89
Returns
The local (server-side) transport address.
transport
const inline
inline const net::TransportType & transport() constDefined in src/turn/include/icy/turn/fivetuple.h:92
Returns
The transport protocol for this tuple.
remote
inline
inline void remote(const net::Address & remote)Defined in src/turn/include/icy/turn/fivetuple.h:96
Sets the remote address.
Parameters
remoteNew remote address.
local
inline
inline void local(const net::Address & local)Defined in src/turn/include/icy/turn/fivetuple.h:100
Sets the local address.
Parameters
localNew local address.
transport
inline
inline void transport(const net::TransportType & transport)Defined in src/turn/include/icy/turn/fivetuple.h:104
Sets the transport protocol.
Parameters
transportNew transport type.
operator==
const
bool operator==(const FiveTuple & r) constDefined in src/turn/include/icy/turn/fivetuple.h:110
Equality comparison; all three components must match.
operator<
const
bool operator<(const FiveTuple & r) constDefined in src/turn/include/icy/turn/fivetuple.h:113
Less-than ordering based on remote then local port; used as std::map key.
toString
const
std::string toString() constDefined in src/turn/include/icy/turn/fivetuple.h:116
Returns
A human-readable string of the form "FiveTuple[remote:local:transport]".
Private Attributes
| Return | Name | Description |
|---|---|---|
net::Address | _remote | |
net::Address | _local | |
net::TransportType | _transport |
_remote
net::Address _remoteDefined in src/turn/include/icy/turn/fivetuple.h:126
_local
net::Address _localDefined in src/turn/include/icy/turn/fivetuple.h:127
_transport
net::TransportType _transport