#include <icy/turn/permission.h>A single TURN permission entry associating a peer IP with a 5-minute expiry timer. Per RFC 5766 section 8, permissions last exactly 300 seconds and must be refreshed via a new CreatePermission request before they expire.
| Return | Name | Description |
|---|---|---|
std::string | ip | IPv4 address string of the permitted peer. |
Key | key | Binary IP key for allocation hot-path comparisons. |
Timeout | timeout | Countdown timer; expires after PERMISSION_LIFETIME milliseconds. |
std::string ipIPv4 address string of the permitted peer.
Key keyBinary IP key for allocation hot-path comparisons.
Timeout timeoutCountdown timer; expires after PERMISSION_LIFETIME milliseconds.
| Return | Name | Description |
|---|---|---|
Permission inline | Constructs a permission for ip and immediately starts the expiry timer. | |
Permission inline | Constructs a permission from a binary socket address. | |
void | refresh inline | Resets the expiry timer, extending the permission lifetime by another 300 seconds. |
bool | operator== const inline | Equality comparison against an IP string. |
bool | matches const inline | Binary IP comparison used on the TURN relay hot path. |
inline
inline Permission(const std::string & ip)Constructs a permission for ip and immediately starts the expiry timer.
ip IPv4 address string of the permitted peer.inline
inline Permission(const net::Address & address)Constructs a permission from a binary socket address.
address Peer IP address; port is ignored.inline
inline void refresh()Resets the expiry timer, extending the permission lifetime by another 300 seconds.
const inline
inline bool operator==(std::string_view r) constEquality comparison against an IP string.
r IPv4 address string to compare against.true if this permission's IP matches r.
const inline
inline bool matches(const net::Address & address) constBinary IP comparison used on the TURN relay hot path.