INNER CODE UNIT · Rust
protocol
webrtc-rs/webrtc · src/data_channel/mod.rs:90
async fn protocol(&self) -> Result<String>;
/// Returns whether this data channel was negotiated out-of-band by the application
/// (`true`), or established in-band over DCEP (`false`).
async fn negotiated(&self) -> Result<bool>;
/// Returns the identifier for this data channel.
///
/// The value is initially null — which is what is returned if the id was not provided
/// at channel creation time and the DTLS role of the SCTP transport has not yet been
/// negotiated. Otherwise it returns the id that was either selected by the application
/// or generated. Once set to a non-null value it does not change.
fn id(&self) -> RTCDataChannelId;
/// Returns the current state of this data channel.
async fn ready_state(&self) -> Result<RTCDataChannelState>;
/// Returns the threshold at which the buffered amount is considered to be *high*.
///
/// When the buffered amount increases from below this threshold to equal or above it,
/// the [`OnBufferedAmountHigh`](DataChannelEvent::OnBufferedAmountHigh) event fires.
/// Initially `u32::MAX` on each new channel; the application may change it at any time