pub struct RTCSctpTransport { /* private fields */ }
Expand description
SCTPTransport provides details about the SCTP transport.
Implementations§
Source§impl RTCSctpTransport
impl RTCSctpTransport
Sourcepub fn transport(&self) -> Arc<RTCDtlsTransport>
pub fn transport(&self) -> Arc<RTCDtlsTransport>
transport returns the DTLSTransport instance the SCTPTransport is sending over.
Sourcepub fn get_capabilities(&self) -> SCTPTransportCapabilities
pub fn get_capabilities(&self) -> SCTPTransportCapabilities
get_capabilities returns the SCTPCapabilities of the SCTPTransport.
Sourcepub async fn start(&self, _remote_caps: SCTPTransportCapabilities) -> Result<()>
pub async fn start(&self, _remote_caps: SCTPTransportCapabilities) -> Result<()>
Start the SCTPTransport. Since both local and remote parties must mutually create an SCTPTransport, SCTP SO (Simultaneous Open) is used to establish a connection over SCTP.
Sourcepub fn on_error(&self, f: OnErrorHdlrFn)
pub fn on_error(&self, f: OnErrorHdlrFn)
on_error sets an event handler which is invoked when the SCTP connection error occurs.
Sourcepub fn on_data_channel(&self, f: OnDataChannelHdlrFn)
pub fn on_data_channel(&self, f: OnDataChannelHdlrFn)
on_data_channel sets an event handler which is invoked when a data channel message arrives from a remote peer.
Sourcepub fn on_data_channel_opened(&self, f: OnDataChannelOpenedHdlrFn)
pub fn on_data_channel_opened(&self, f: OnDataChannelOpenedHdlrFn)
on_data_channel_opened sets an event handler which is invoked when a data channel is opened
Sourcepub fn max_channels(&self) -> u16
pub fn max_channels(&self) -> u16
max_channels is the maximum number of RTCDataChannels that can be open simultaneously.
Sourcepub fn state(&self) -> RTCSctpTransportState
pub fn state(&self) -> RTCSctpTransportState
state returns the current state of the SCTPTransport