pub struct Gathering {
pub credentials: Credentials,
pub offerer: bool,
pub tiebreaker: u64,
pub stun_server: Option<SocketAddr>,
pub stun_timeout: Duration,
pub agent: Config,
}Expand description
Everything gathering needs that the sockets do not already supply.
Fields§
§credentials: CredentialsOur short-term credentials for this ICE session (RFC 8839 §5.4), which go in the offer or the answer and key every check in both directions (spec §11.2).
offerer: boolWhether sipx sent the initial offer — RFC 8445 §6.1.1’s role determination between two full agents.
tiebreaker: u64§7.1.3’s 64-bit tiebreaker, drawn once per ICE session.
stun_server: Option<SocketAddr>The STUN server to ask for a server-reflexive candidate (§5.1.1.2). None gathers host
candidates alone, which is the right answer on a network with no NAT and the only answer
when no server is configured.
stun_timeout: DurationHow long to keep asking it before giving up.
Gathering that never finishes is an offer that never goes out, so this is a deadline and not a retry count: whatever has been gathered when it expires is what is offered, and a STUN server that is down costs one call setup this long and nothing else.
agent: ConfigThe agent’s own configuration — §14’s timers and §6.1.2.5’s pair limit.
Implementations§
Source§impl Gathering
impl Gathering
Sourcepub fn new(credentials: Credentials, offerer: bool) -> Self
pub fn new(credentials: Credentials, offerer: bool) -> Self
Gather host candidates only, with a fresh tiebreaker.
The tiebreaker is drawn here rather than taken because §7.1.3 wants a random one per ICE
session and a caller that has no opinion should not have to have one; a caller that does —
a test walking §7.3.1.1’s T = V row — sets the field afterwards.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gathering
impl RefUnwindSafe for Gathering
impl Send for Gathering
impl Sync for Gathering
impl Unpin for Gathering
impl UnsafeUnpin for Gathering
impl UnwindSafe for Gathering
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more