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

STUN/TURN server configuration. More...

#include <ice.h>

Collaboration diagram for librats::IceServer:
[legend]

Public Member Functions

 IceServer ()=default
 
 IceServer (const std::string &u)
 
 IceServer (const std::string &u, const std::string &user, const std::string &pass)
 
bool is_stun () const
 Check if this is a STUN server.
 
bool is_turn () const
 Check if this is a TURN server.
 
bool parse_url (std::string &host, uint16_t &port) const
 Parse host and port from URL.
 

Public Attributes

std::string url
 Server URL (stun:host:port or turn:host:port)
 
std::string username
 Username (for TURN)
 
std::string password
 Password/credential (for TURN)
 

Detailed Description

STUN/TURN server configuration.

Definition at line 197 of file ice.h.

Constructor & Destructor Documentation

◆ IceServer() [1/3]

librats::IceServer::IceServer ( )
default

◆ IceServer() [2/3]

librats::IceServer::IceServer ( const std::string &  u)
inline

Definition at line 203 of file ice.h.

◆ IceServer() [3/3]

librats::IceServer::IceServer ( const std::string &  u,
const std::string &  user,
const std::string &  pass 
)
inline

Definition at line 204 of file ice.h.

Member Function Documentation

◆ is_stun()

bool librats::IceServer::is_stun ( ) const
inline

Check if this is a STUN server.

Definition at line 210 of file ice.h.

References url.

◆ is_turn()

bool librats::IceServer::is_turn ( ) const
inline

Check if this is a TURN server.

Definition at line 215 of file ice.h.

References url.

◆ parse_url()

bool librats::IceServer::parse_url ( std::string &  host,
uint16_t &  port 
) const

Parse host and port from URL.

Member Data Documentation

◆ password

std::string librats::IceServer::password

Password/credential (for TURN)

Definition at line 200 of file ice.h.

◆ url

std::string librats::IceServer::url

Server URL (stun:host:port or turn:host:port)

Definition at line 198 of file ice.h.

Referenced by is_stun(), and is_turn().

◆ username

std::string librats::IceServer::username

Username (for TURN)

Definition at line 199 of file ice.h.


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