INNER CODE UNIT · Rust

poll

webrtc-rs/webrtc · src/data_channel/mod.rs:221

    async fn poll(&self) -> Option<DataChannelEvent>;
    /// Closes the data channel.
    ///
    /// Moves the channel to `Closing` and starts the DCEP/SCTP teardown; closing an
    /// already-closed channel succeeds. Senders blocked in [`send`](Self::send) or
    /// [`writable`](Self::writable) awaiting capacity are woken with
    /// [`Error::ErrDataChannelClosed`].
    async fn close(&self) -> Result<()>;
}

/// Events that can occur on a [`DataChannel`].
#[derive(Debug, Clone)]
#[non_exhaustive]
pub enum DataChannelEvent {
    /// Data channel has opened and is ready to send/receive data.
    ///
    /// This event is fired when the data channel transitions to the "open" state.
    /// Data can now be sent through the channel.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…