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 Freeze for Agent
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