INNER CODE UNIT · Rust

try_send

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

    async fn try_send(&self, data: BytesMut) -> Result<()> {
        self.send(data).await
    }
    /// Non-blocking [`send_text`](Self::send_text); see [`try_send`](Self::try_send).
    ///
    /// Defaults to delegating to [`send_text`](Self::send_text).
    async fn try_send_text(&self, text: &str) -> Result<()> {
        self.send_text(text).await
    }
    /// Polls for the next event on this data channel.
    ///
    /// Resolves when the next [`DataChannelEvent`] is available, and returns `None` once the
    /// channel is closed and no events remain — so a `while let Some(event) = dc.poll().await`
    /// loop terminates on its own.
    async fn poll(&self) -> Option<DataChannelEvent>;
    /// Closes the data channel.
    ///
    /// Moves the channel to `Closing` and starts the DCEP/SCTP teardown; closing an

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…