INNER CODE UNIT · Rust

await_send_capacity

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

    async fn await_send_capacity(&self) {
        futures::select! {
            _ = self.inner.data_channel_backpressure.notified().fuse() => {}
            _ = self.inner.runtime.sleep(Duration::from_millis(50)).fuse() => {}
        }
    }
}

impl Drop for DataChannelImpl {
    fn drop(&mut self) {
        if let Some(mut data_channels) = self.inner.data_channel_events_tx.try_lock() {
            data_channels.remove(&self.id);
        }
    }
}

impl crate::sealed::Sealed for DataChannelImpl {}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…