Struct webrtc::ice_transport::RTCIceTransport
source · [−]pub struct RTCIceTransport { /* private fields */ }
Expand description
ICETransport allows an application access to information about the ICE transport over which packets are sent and received.
Implementations
sourceimpl RTCIceTransport
impl RTCIceTransport
sourcepub async fn get_selected_candidate_pair(&self) -> Option<RTCIceCandidatePair>
pub async fn get_selected_candidate_pair(&self) -> Option<RTCIceCandidatePair>
get_selected_candidate_pair returns the selected candidate pair on which packets are sent if there is no selected pair nil is returned
sourcepub async fn start(
&self,
params: &RTCIceParameters,
role: Option<RTCIceRole>
) -> Result<()>
pub async fn start(
&self,
params: &RTCIceParameters,
role: Option<RTCIceRole>
) -> Result<()>
Start incoming connectivity checks based on its configured role.
sourcepub async fn on_selected_candidate_pair_change(
&self,
f: OnSelectedCandidatePairChangeHdlrFn
)
pub async fn on_selected_candidate_pair_change(
&self,
f: OnSelectedCandidatePairChangeHdlrFn
)
on_selected_candidate_pair_change sets a handler that is invoked when a new ICE candidate pair is selected
sourcepub async fn on_connection_state_change(&self, f: OnConnectionStateChangeHdlrFn)
pub async fn on_connection_state_change(&self, f: OnConnectionStateChangeHdlrFn)
on_connection_state_change sets a handler that is fired when the ICE connection state changes.
sourcepub async fn role(&self) -> RTCIceRole
pub async fn role(&self) -> RTCIceRole
Role indicates the current role of the ICE transport.
sourcepub async fn set_remote_candidates(
&self,
remote_candidates: &[RTCIceCandidate]
) -> Result<()>
pub async fn set_remote_candidates(
&self,
remote_candidates: &[RTCIceCandidate]
) -> Result<()>
set_remote_candidates sets the sequence of candidates associated with the remote ICETransport.
sourcepub async fn add_remote_candidate(
&self,
remote_candidate: Option<RTCIceCandidate>
) -> Result<()>
pub async fn add_remote_candidate(
&self,
remote_candidate: Option<RTCIceCandidate>
) -> Result<()>
adds a candidate associated with the remote ICETransport.
sourcepub fn state(&self) -> RTCIceTransportState
pub fn state(&self) -> RTCIceTransportState
State returns the current ice transport state.
Trait Implementations
sourceimpl Default for RTCIceTransport
impl Default for RTCIceTransport
sourcefn default() -> RTCIceTransport
fn default() -> RTCIceTransport
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for RTCIceTransport
impl Send for RTCIceTransport
impl Sync for RTCIceTransport
impl Unpin for RTCIceTransport
impl !UnwindSafe for RTCIceTransport
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more