pub struct Agent { /* private fields */ }
Expand description
Represents the ICE agent.
Implementations§
source§impl Agent
impl Agent
sourcepub fn get_candidate_pairs_stats(&self) -> Vec<CandidatePairStats>
pub fn get_candidate_pairs_stats(&self) -> Vec<CandidatePairStats>
Returns a list of candidate pair stats.
sourcepub fn get_local_candidates_stats(&self) -> Vec<CandidateStats>
pub fn get_local_candidates_stats(&self) -> Vec<CandidateStats>
Returns a list of local candidates stats.
sourcepub fn get_remote_candidates_stats(&self) -> Vec<CandidateStats>
pub fn get_remote_candidates_stats(&self) -> Vec<CandidateStats>
Returns a list of remote candidates stats.
source§impl Agent
impl Agent
sourcepub fn new(config: AgentConfig) -> Result<Self>
pub fn new(config: AgentConfig) -> Result<Self>
Creates a new Agent.
sourcepub fn add_local_candidate(&mut self, c: Candidate) -> Result<()>
pub fn add_local_candidate(&mut self, c: Candidate) -> Result<()>
Adds a new local candidate.
sourcepub fn add_remote_candidate(&mut self, c: Candidate) -> Result<()>
pub fn add_remote_candidate(&mut self, c: Candidate) -> Result<()>
Adds a new remote candidate.
sourcepub fn set_remote_credentials(
&mut self,
remote_ufrag: String,
remote_pwd: String
) -> Result<()>
pub fn set_remote_credentials( &mut self, remote_ufrag: String, remote_pwd: String ) -> Result<()>
Sets the credentials of the remote agent.
sourcepub async fn get_remote_credentials(&self) -> Option<&Credentials>
pub async fn get_remote_credentials(&self) -> Option<&Credentials>
Returns the remote credentials.
sourcepub fn get_local_credentials(&self) -> &Credentials
pub fn get_local_credentials(&self) -> &Credentials
Returns the local credentials.
pub fn handle_read(&mut self, msg: Transmit<BytesMut>) -> Result<()>
pub fn poll_transmit(&mut self) -> Option<Transmit<BytesMut>>
pub fn handle_timeout(&mut self, now: Instant)
pub fn poll_timeout(&self) -> Option<Instant>
pub fn poll_event(&mut self) -> Option<Event>
sourcepub fn get_selected_candidate_pair(&self) -> Option<(Candidate, Candidate)>
pub fn get_selected_candidate_pair(&self) -> Option<(Candidate, Candidate)>
Returns the selected pair (local_candidate, remote_candidate) or none
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> 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