Struct rtc_ice::agent::Agent

source ·
pub struct Agent { /* private fields */ }
Expand description

Represents the ICE agent.

Implementations§

source§

impl Agent

source

pub fn get_candidate_pairs_stats(&self) -> Vec<CandidatePairStats>

Returns a list of candidate pair stats.

source

pub fn get_local_candidates_stats(&self) -> Vec<CandidateStats>

Returns a list of local candidates stats.

source

pub fn get_remote_candidates_stats(&self) -> Vec<CandidateStats>

Returns a list of remote candidates stats.

source§

impl Agent

source

pub fn new(config: AgentConfig) -> Result<Self>

Creates a new Agent.

source

pub fn add_local_candidate(&mut self, c: Candidate) -> Result<()>

Adds a new local candidate.

source

pub fn add_remote_candidate(&mut self, c: Candidate) -> Result<()>

Adds a new remote candidate.

source

pub fn set_remote_credentials( &mut self, remote_ufrag: String, remote_pwd: String ) -> Result<()>

Sets the credentials of the remote agent.

source

pub async fn get_remote_credentials(&self) -> Option<&Credentials>

Returns the remote credentials.

source

pub fn get_local_credentials(&self) -> &Credentials

Returns the local credentials.

source

pub fn handle_read(&mut self, msg: Transmit<BytesMut>) -> Result<()>

source

pub fn poll_transmit(&mut self) -> Option<Transmit<BytesMut>>

source

pub fn handle_timeout(&mut self, now: Instant)

source

pub fn poll_timeout(&self) -> Option<Instant>

source

pub fn poll_event(&mut self) -> Option<Event>

source

pub fn close(&mut self) -> Result<()>

Cleans up the Agent.

source

pub fn get_selected_candidate_pair(&self) -> Option<(Candidate, Candidate)>

Returns the selected pair (local_candidate, remote_candidate) or none

source

pub fn start_connectivity_checks( &mut self, is_controlling: bool, remote_ufrag: String, remote_pwd: String ) -> Result<()>

start connectivity checks

source

pub fn restart( &mut self, ufrag: String, pwd: String, keep_local_candidates: bool ) -> Result<()>

Restarts the ICE Agent with the provided ufrag/pwd If no ufrag/pwd is provided the Agent will generate one itself.

Auto Trait Implementations§

§

impl RefUnwindSafe for Agent

§

impl Send for Agent

§

impl Sync for Agent

§

impl Unpin for Agent

§

impl UnwindSafe for Agent

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more