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

ICE candidate. More...

#include <ice.h>

Collaboration diagram for librats::IceCandidate:
[legend]

Public Member Functions

 IceCandidate ()
 
std::string to_sdp_attribute () const
 Format candidate as SDP attribute string (a=candidate:...)
 
std::string type_string () const
 Get candidate type as string.
 
std::string address_string () const
 Get address:port string.
 
bool operator== (const IceCandidate &other) const
 

Static Public Member Functions

static uint32_t compute_priority (IceCandidateType type, uint32_t local_preference=65535, uint32_t component_id=1)
 Compute candidate priority (RFC 5245 Section 4.1.2.1)
 
static std::string generate_foundation (IceCandidateType type, const std::string &base_address, const std::string &server_address="")
 Generate foundation string.
 
static std::optional< IceCandidatefrom_sdp_attribute (const std::string &sdp)
 Parse candidate from SDP attribute string.
 

Public Attributes

IceCandidateType type
 
std::string foundation
 Unique identifier for candidate.
 
uint32_t component_id
 Component ID (typically 1 for RTP)
 
IceTransportProtocol transport
 
uint32_t priority
 Candidate priority.
 
std::string address
 IP address.
 
uint16_t port
 Port number.
 
std::string related_address
 Related address (for srflx/relay)
 
uint16_t related_port
 Related port.
 

Detailed Description

ICE candidate.

Definition at line 96 of file ice.h.

Constructor & Destructor Documentation

◆ IceCandidate()

librats::IceCandidate::IceCandidate ( )
inline

Definition at line 107 of file ice.h.

Member Function Documentation

◆ address_string()

std::string librats::IceCandidate::address_string ( ) const
inline

Get address:port string.

Definition at line 143 of file ice.h.

References address, and port.

Referenced by librats::IceCandidatePair::key().

◆ compute_priority()

static uint32_t librats::IceCandidate::compute_priority ( IceCandidateType  type,
uint32_t  local_preference = 65535,
uint32_t  component_id = 1 
)
static

Compute candidate priority (RFC 5245 Section 4.1.2.1)

◆ from_sdp_attribute()

static std::optional< IceCandidate > librats::IceCandidate::from_sdp_attribute ( const std::string &  sdp)
static

Parse candidate from SDP attribute string.

◆ generate_foundation()

static std::string librats::IceCandidate::generate_foundation ( IceCandidateType  type,
const std::string &  base_address,
const std::string &  server_address = "" 
)
static

Generate foundation string.

◆ operator==()

bool librats::IceCandidate::operator== ( const IceCandidate other) const
inline

Definition at line 147 of file ice.h.

References address, port, transport, and type.

◆ to_sdp_attribute()

std::string librats::IceCandidate::to_sdp_attribute ( ) const

Format candidate as SDP attribute string (a=candidate:...)

◆ type_string()

std::string librats::IceCandidate::type_string ( ) const

Get candidate type as string.

Member Data Documentation

◆ address

std::string librats::IceCandidate::address

IP address.

Definition at line 102 of file ice.h.

Referenced by address_string(), and operator==().

◆ component_id

uint32_t librats::IceCandidate::component_id

Component ID (typically 1 for RTP)

Definition at line 99 of file ice.h.

◆ foundation

std::string librats::IceCandidate::foundation

Unique identifier for candidate.

Definition at line 98 of file ice.h.

◆ port

uint16_t librats::IceCandidate::port

Port number.

Definition at line 103 of file ice.h.

Referenced by address_string(), and operator==().

◆ priority

uint32_t librats::IceCandidate::priority

Candidate priority.

Definition at line 101 of file ice.h.

◆ related_address

std::string librats::IceCandidate::related_address

Related address (for srflx/relay)

Definition at line 104 of file ice.h.

◆ related_port

uint16_t librats::IceCandidate::related_port

Related port.

Definition at line 105 of file ice.h.

◆ transport

IceTransportProtocol librats::IceCandidate::transport

Definition at line 100 of file ice.h.

Referenced by operator==().

◆ type

IceCandidateType librats::IceCandidate::type

Definition at line 97 of file ice.h.

Referenced by operator==().


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