Back to Site
Loading...
Searching...
No Matches
librats::IceConfig Struct Reference

ICE configuration. More...

#include <ice.h>

Collaboration diagram for librats::IceConfig:
[legend]

Public Member Functions

 IceConfig ()=default
 
void add_stun_server (const std::string &host, uint16_t port=STUN_DEFAULT_PORT)
 Add a STUN server.
 
void add_turn_server (const std::string &host, uint16_t port, const std::string &username, const std::string &password)
 Add a TURN server with credentials.
 

Public Attributes

std::vector< IceServerice_servers
 STUN/TURN servers.
 
bool gather_host_candidates = true
 Gather host candidates.
 
bool gather_srflx_candidates = true
 Gather server-reflexive candidates.
 
bool gather_relay_candidates = false
 Gather relay candidates (requires TURN)
 
int gathering_timeout_ms = 5000
 Candidate gathering timeout.
 
int check_timeout_ms = ICE_CHECK_TIMEOUT_MS
 Connectivity check timeout.
 
int check_max_retries = ICE_CHECK_MAX_RETRIES
 Max connectivity check retries.
 
std::string software = "librats"
 Software attribute.
 

Detailed Description

ICE configuration.

Definition at line 226 of file ice.h.

Constructor & Destructor Documentation

◆ IceConfig()

librats::IceConfig::IceConfig ( )
default

Member Function Documentation

◆ add_stun_server()

void librats::IceConfig::add_stun_server ( const std::string &  host,
uint16_t  port = STUN_DEFAULT_PORT 
)
inline

Add a STUN server.

Definition at line 241 of file ice.h.

References ice_servers.

◆ add_turn_server()

void librats::IceConfig::add_turn_server ( const std::string &  host,
uint16_t  port,
const std::string &  username,
const std::string &  password 
)
inline

Add a TURN server with credentials.

Definition at line 248 of file ice.h.

References ice_servers.

Member Data Documentation

◆ check_max_retries

int librats::IceConfig::check_max_retries = ICE_CHECK_MAX_RETRIES

Max connectivity check retries.

Definition at line 233 of file ice.h.

◆ check_timeout_ms

int librats::IceConfig::check_timeout_ms = ICE_CHECK_TIMEOUT_MS

Connectivity check timeout.

Definition at line 232 of file ice.h.

◆ gather_host_candidates

bool librats::IceConfig::gather_host_candidates = true

Gather host candidates.

Definition at line 228 of file ice.h.

◆ gather_relay_candidates

bool librats::IceConfig::gather_relay_candidates = false

Gather relay candidates (requires TURN)

Definition at line 230 of file ice.h.

◆ gather_srflx_candidates

bool librats::IceConfig::gather_srflx_candidates = true

Gather server-reflexive candidates.

Definition at line 229 of file ice.h.

◆ gathering_timeout_ms

int librats::IceConfig::gathering_timeout_ms = 5000

Candidate gathering timeout.

Definition at line 231 of file ice.h.

◆ ice_servers

std::vector<IceServer> librats::IceConfig::ice_servers

STUN/TURN servers.

Definition at line 227 of file ice.h.

Referenced by add_stun_server(), and add_turn_server().

◆ software

std::string librats::IceConfig::software = "librats"

Software attribute.

Definition at line 234 of file ice.h.


The documentation for this struct was generated from the following file: