rtci-datachannel
WebRTC data channels and the Data Channel Establishment Protocol (RFC 8831, RFC 8832), sans-I/O. 8 public modules, 21 items at 0.5.0.
cargo add [email protected] · crates.io · docs.rs · README on GitHub· MSRV 1.89
README
WebRTC data channels over SCTP: the Data Channel Establishment Protocol (the DATA_CHANNEL_OPEN / DATA_CHANNEL_ACK handshake), the reliability and ordering parameters of a channel, and the payload protocol identifiers that tell string, binary and empty messages apart.
Specifications
- RFC 8831, WebRTC Data Channels
- RFC 8832, WebRTC Data Channel Establishment Protocol
Clause-by-clause status, with the test that proves each clause: rfc8831, rfc8832.
Use
Most applications use data channels through the root crate (rtci, RTCPeerConnection::create_data_channel), which runs this crate over rtci-sctp. Used on its own, data_channel holds one channel's state over an SCTP stream and message the DCEP messages.
Sans-I/O
It reads and writes SCTP stream data through rtci-sctp's association; it opens no socket and starts no timer. The crate does no I/O and reads no clock: every call that depends on time takes an Instant from the caller.
Licence
Licensed under either of the MIT licence or the Apache License, Version 2.0, at your option.
This crate is part of the rtci workspace, which descends from webrtc-rs/rtc and is developed independently; FORK.md lists what it carries over upstream. Upstream's licence and copyright notices are retained.
rtci_datachannel
WebRTC data channels over SCTP.
- mod
data_channelOne data channel's state and its read/write surface over an SCTP stream. - mod
messageThe DCEP messages exchanged to open, acknowledge and close a channel.
rtci_datachannel::data_channel
One data channel's state and its read/write surface over an SCTP stream.
- struct
DataChannelDataChannel represents a data channel - struct
DataChannelConfigDataChannelConfig is used to configure the data channel. - struct
DataChannelMessageDataChannelMessage is used for data sent over SCTP.
rtci_datachannel::message
The DCEP messages exchanged to open, acknowledge and close a channel.
- mod
message_channel_ackTheDATA_CHANNEL_ACKmessage, which confirms a channel was opened. - mod
message_channel_closeAn internal close notification (not a DCEP message). - mod
message_channel_openTheDATA_CHANNEL_OPENmessage and the channel parameters it carries. - mod
message_channel_thresholdInternal buffered-amount threshold notifications. - mod
message_typeThe one-byte message type that prefixes every DCEP message. - enum
MessageA parsed DataChannel message
rtci_datachannel::message::message_channel_ack
The DATA_CHANNEL_ACK message, which confirms a channel was opened.
- struct
DataChannelAckThe data-part of an data-channel ACK message without the message type.
rtci_datachannel::message::message_channel_close
An internal close notification (not a DCEP message).
- struct
DataChannelCloseThe data-part of an data-channel CLOSE message without the message type.
rtci_datachannel::message::message_channel_open
The DATA_CHANNEL_OPEN message and the channel parameters it carries.
- struct
DataChannelOpenThe data-part of an data-channel OPEN message without the message type. - enum
ChannelTypeThe reliability and ordering guarantees a data channel is opened with. - const
CHANNEL_PRIORITY_BELOW_NORMALChannelPriority - const
CHANNEL_PRIORITY_EXTRA_HIGHThe highest channel priority defined by the spec. - const
CHANNEL_PRIORITY_HIGHA higher-than-default channel priority. - const
CHANNEL_PRIORITY_NORMALThe default channel priority.
rtci_datachannel::message::message_channel_threshold
Internal buffered-amount threshold notifications.
- enum
DataChannelThresholdThe data-part of an data-channel CLOSE message without the message type.
rtci_datachannel::message::message_type
The one-byte message type that prefixes every DCEP message.
- enum
MessageTypeThe one-byte type that prefixes a DCEP message.
Generated from the sources of rtci-datachannel 0.5.0 at its release tag. Items made by macros and methods are on docs.rs.