pub struct IceAgent {
pub role: IceRole,
pub policy: PathPolicy,
pub tables: CandidateTables,
pub slot: ConnSlot,
pub schedule: Schedule,
}Fields§
§role: IceRole§policy: PathPolicy§tables: CandidateTables§slot: ConnSlot§schedule: ScheduleImplementations§
Source§impl IceAgent
impl IceAgent
Sourcepub fn new(
role: IceRole,
policy: PathPolicy,
has_v6: bool,
has_v4: bool,
) -> Self
pub fn new( role: IceRole, policy: PathPolicy, has_v6: bool, has_v4: bool, ) -> Self
Creates a default IceAgent.
Sourcepub fn mark_checked(&mut self, kind: CandidateKind) -> bool
pub fn mark_checked(&mut self, kind: CandidateKind) -> bool
Record that a real STUN/TURN transaction succeeded for kind.
Sourcepub fn nominate(&mut self, kind: CandidateKind, now_ms: u64) -> bool
pub fn nominate(&mut self, kind: CandidateKind, now_ms: u64) -> bool
Nominate only a pair that already passed a connectivity check.
Sourcepub fn has_succeeded(&self) -> bool
pub fn has_succeeded(&self) -> bool
true when succeeded present.
Sourcepub fn apply_role_conflict(&mut self, local_tie: u64, remote_tie: u64)
pub fn apply_role_conflict(&mut self, local_tie: u64, remote_tie: u64)
RFC 8445 role conflict: larger tie-breaker stays controlling.
Sourcepub fn nominated_may_send(&self, last_ok_ms: u64, now_ms: u64) -> bool
pub fn nominated_may_send(&self, last_ok_ms: u64, now_ms: u64) -> bool
RFC 7675: a nominated pair without fresh consent cannot keep sending.
Auto Trait Implementations§
impl Freeze for IceAgent
impl RefUnwindSafe for IceAgent
impl Send for IceAgent
impl Sync for IceAgent
impl Unpin for IceAgent
impl UnsafeUnpin for IceAgent
impl UnwindSafe for IceAgent
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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