ICE-lite (Interactive Connectivity Establishment) Implementation. More...
#include "stun.h"#include "turn.h"#include "socket.h"#include <vector>#include <string>#include <optional>#include <memory>#include <mutex>#include <functional>#include <chrono>#include <atomic>#include <thread>Go to the source code of this file.
Classes | |
| struct | librats::IceCandidate |
| ICE candidate. More... | |
| struct | librats::IceCandidatePair |
| ICE candidate pair. More... | |
| struct | librats::IceServer |
| STUN/TURN server configuration. More... | |
| struct | librats::IceConfig |
| ICE configuration. More... | |
| class | librats::IceManager |
| ICE-lite Manager for NAT traversal. More... | |
Namespaces | |
| namespace | librats |
Typedefs | |
| using | librats::IceCandidatesCallback = std::function< void(const std::vector< IceCandidate > &)> |
| Callback when candidates are gathered. | |
| using | librats::IceGatheringStateCallback = std::function< void(IceGatheringState)> |
| Callback when gathering state changes. | |
| using | librats::IceConnectionStateCallback = std::function< void(IceConnectionState)> |
| Callback when connection state changes. | |
| using | librats::IceNewCandidateCallback = std::function< void(const IceCandidate &)> |
| Callback when a new candidate is discovered (trickle ICE) | |
| using | librats::IceSelectedPairCallback = std::function< void(const IceCandidatePair &)> |
| Callback when ICE completes with selected pair. | |
Enumerations | |
| enum class | librats::IceCandidateType { librats::Host , librats::ServerReflexive , librats::PeerReflexive , librats::Relay } |
| ICE candidate type. More... | |
| enum class | librats::IceTransportProtocol { librats::UDP , librats::TCP } |
| ICE candidate transport protocol. More... | |
| enum class | librats::IceConnectionState { librats::New , librats::Gathering , librats::Checking , librats::Connected , librats::Completed , librats::Failed , librats::Disconnected , librats::Closed } |
| ICE connection state. More... | |
| enum class | librats::IceGatheringState { librats::New , librats::Gathering , librats::Complete } |
| ICE gathering state. More... | |
| enum class | librats::IceCandidatePairState { librats::Frozen , librats::Waiting , librats::InProgress , librats::Succeeded , librats::Failed } |
| ICE candidate pair state. More... | |
Variables | |
| constexpr uint32_t | librats::ICE_PRIORITY_HOST = 126 |
| Default ICE candidate priority for host candidates. | |
| constexpr uint32_t | librats::ICE_PRIORITY_SRFLX = 100 |
| Default ICE candidate priority for server-reflexive candidates | |
| constexpr uint32_t | librats::ICE_PRIORITY_RELAY = 0 |
| Default ICE candidate priority for relay candidates. | |
| constexpr int | librats::ICE_CHECK_TIMEOUT_MS = 500 |
| Connectivity check timeout (ms) | |
| constexpr int | librats::ICE_CHECK_MAX_RETRIES = 5 |
| Maximum connectivity check retries. | |
ICE-lite (Interactive Connectivity Establishment) Implementation.
Implements RFC 5245 ICE-lite for NAT traversal. Provides candidate gathering, connectivity checks, and connection establishment.
ICE-lite is a minimal implementation suitable for servers and most P2P scenarios. It doesn't perform full ICE with controlling/controlled roles negotiation.
Definition in file ice.h.