pub async fn send(&self, data: &Bytes) -> Result<usize> {
        self.ensure_open()?;

        let data_channel = self.data_channel.lock().await;
        if let Some(dc) = &*data_channel {
            Ok(dc.write_data_channel(data, false).await?)
        } else {
            Err(Error::ErrClosedPipe)
        }
    }
/// send sends the binary message to the DataChannel peer
send sends the binary message to the DataChannel peer
send sends the binary message to the DataChannel peer
pub async fn send(&self, data: &Bytes) -> Result<usize> {
        self.ensure_open()?;
        let data_channel = self.data_channel.lock().await;
        if let Some(dc) = &*data_channel {
            Ok(dc.write_data_channel(data, false).await?)
        } else {
            Err(Error::ErrClosedPipe)
        }
    }
pub async fn send ( & self , data : & Bytes ) -> Result < usize > { self . ensure_open ( ) ? ; let data_channel = self . data_channel . lock ( ) . await ; if let Some ( dc ) = & * data_channel { Ok ( dc . write_data_channel ( data , false ) . await ? ) } else { Err ( Error :: ErrClosedPipe ) } }
send sends the binary message to the DataChannel peer
send sends the binary message to the DataChannel peer
&self
data
&Bytes