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§
source§impl 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 fn on_selected_candidate_pair_change(
&self,
f: OnSelectedCandidatePairChangeHdlrFn
)
pub 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 fn on_connection_state_change(&self, f: OnConnectionStateChangeHdlrFn)
pub 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.