pub struct DataChannelMessage {
pub association_handle: usize,
pub stream_id: u16,
pub ppi: PayloadProtocolIdentifier,
pub payload: BytesMut,
pub negotiated: bool,
}Expand description
DataChannelMessage is used to data sent over SCTP
Fields§
§association_handle: usizeIdentifies the SCTP association this message belongs to.
stream_id: u16The SCTP stream the message arrived on or should be sent on.
ppi: PayloadProtocolIdentifierThe payload protocol identifier, which distinguishes DCEP control messages from string and binary user data.
payload: BytesMutThe message bytes.
negotiated: boolMarks a DATA_CHANNEL_OPEN that belongs to an out-of-band negotiated
channel (W3C WebRTC RTCDataChannelInit.negotiated). Such a message is
only used to open and configure the local SCTP stream and must not be
transmitted to the peer, which already created its own channel with the
pre-agreed stream id. Ignored for every other message.
Trait Implementations§
Source§impl Clone for DataChannelMessage
impl Clone for DataChannelMessage
Source§fn clone(&self) -> DataChannelMessage
fn clone(&self) -> DataChannelMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataChannelMessage
impl Debug for DataChannelMessage
Source§impl Default for DataChannelMessage
impl Default for DataChannelMessage
Source§fn default() -> DataChannelMessage
fn default() -> DataChannelMessage
Source§impl Protocol<DataChannelMessage, DataChannelMessage, ()> for DataChannel
impl Protocol<DataChannelMessage, DataChannelMessage, ()> for DataChannel
Source§fn handle_read(&mut self, msg: DataChannelMessage) -> Result<()>
fn handle_read(&mut self, msg: DataChannelMessage) -> Result<()>
ReadDataChannel reads a packet of len(p) bytes. It returns the number of bytes read and
true if the data read is a string.
Source§fn handle_write(&mut self, msg: DataChannelMessage) -> Result<()>
fn handle_write(&mut self, msg: DataChannelMessage) -> Result<()>
handle_write writes len(p) bytes from p
Source§fn poll_write(&mut self) -> Option<DataChannelMessage>
fn poll_write(&mut self) -> Option<DataChannelMessage>
Returns packets to transmit
Source§fn close(&mut self) -> Result<()>
fn close(&mut self) -> Result<()>
Close closes the DataChannel and the underlying SCTP stream.