Struct webrtc::dtls_transport::RTCDtlsTransport
source · pub struct RTCDtlsTransport { /* private fields */ }
Expand description
DTLSTransport allows an application access to information about the DTLS transport over which RTP and RTCP packets are sent and received by RTPSender and RTPReceiver, as well other data such as SCTP packets sent and received by data channels.
Implementations§
source§impl RTCDtlsTransport
impl RTCDtlsTransport
sourcepub fn ice_transport(&self) -> &RTCIceTransport
pub fn ice_transport(&self) -> &RTCIceTransport
returns the currently-configured ICETransport or None if one has not been configured
sourcepub fn on_state_change(&self, f: OnDTLSTransportStateChangeHdlrFn)
pub fn on_state_change(&self, f: OnDTLSTransportStateChangeHdlrFn)
on_state_change sets a handler that is fired when the DTLS connection state changes.
sourcepub fn state(&self) -> RTCDtlsTransportState
pub fn state(&self) -> RTCDtlsTransportState
state returns the current dtls_transport transport state.
sourcepub async fn write_rtcp(
&self,
pkts: &[Box<dyn Packet + Send + Sync>]
) -> Result<usize>
pub async fn write_rtcp( &self, pkts: &[Box<dyn Packet + Send + Sync>] ) -> Result<usize>
write_rtcp sends a user provided RTCP packet to the connected peer. If no peer is connected the packet is discarded.
sourcepub fn get_local_parameters(&self) -> Result<DTLSParameters>
pub fn get_local_parameters(&self) -> Result<DTLSParameters>
get_local_parameters returns the DTLS parameters of the local DTLSTransport upon construction.
sourcepub async fn get_remote_certificate(&self) -> Bytes
pub async fn get_remote_certificate(&self) -> Bytes
get_remote_certificate returns the certificate chain in use by the remote side returns an empty list prior to selection of the remote certificate
sourcepub async fn start(&self, remote_parameters: DTLSParameters) -> Result<()>
pub async fn start(&self, remote_parameters: DTLSParameters) -> Result<()>
start DTLS transport negotiation with the parameters of the remote DTLS transport