pub struct Candidate {
pub foundation: String,
pub component: u16,
pub transport: String,
pub priority: u32,
pub address: String,
pub port: u16,
pub typ: String,
pub related_address: Option<String>,
pub related_port: Option<u16>,
pub extensions: Vec<(String, String)>,
}Expand description
a=candidate:... (RFC 8839 section 5.1).
candidate-attribute = "candidate" ":" foundation SP component-id SP transport SP
priority SP connection-address SP port SP cand-type
[SP rel-addr] [SP rel-port] *(SP cand-extension)
foundation = 1*32ice-char
component-id = 1*3DIGIT
transport = "UDP" / transport-extension
priority = 1*10DIGIT
cand-type = "typ" SP candidate-types
candidate-types = "host" / "srflx" / "prflx" / "relay" / token
rel-addr = "raddr" SP connection-address
rel-port = "rport" SP port
cand-extension = extension-att-name SP extension-att-valueThe address is an IPv4 address, an IPv6 address or a domain name (an mDNS name ends in
.local). What follows the type is read as name and value pairs: raddr and rport
fill Candidate::related_address and Candidate::related_port, everything else
(tcptype, generation, ufrag, network-id, network-cost, …) is kept in
Candidate::extensions in the order written.
Fields§
§foundation: StringThe foundation: 1 to 32 ice-chars.
component: u16The component: 1 for RTP (and for everything when RTCP is multiplexed), 2 for RTCP.
transport: StringThe transport, as written: UDP, udp, TCP, … Compare without regard to case.
priority: u32The priority.
address: StringThe connection address.
port: u16The port.
typ: StringThe candidate type: host, srflx, prflx, relay, or another token.
raddr: the related address (the base of a reflexive candidate, the mapped address
of a relayed one).
rport: the related port.
extensions: Vec<(String, String)>The other extension attributes, as (name, value), in order.