pub async fn send(&mut self, messages: BytesMut) -> Result<(), Error> {
        self.stats
            .data_sent(messages.len(), self.process_id, self.address.id);

        match write_all_half(&mut self.write, messages).await {
            Ok(_) => Ok(()),
            Err(err) => {
                error!("Terminating server because of: {:?}", err);
                self.bad = true;
                Err(err)
            }
        }
    }
/// Send messages to the server from the client.
Send messages to the server from the client.
Send messages to the server from the client .
pub async fn send(&mut self, messages: BytesMut) -> Result<(), Error> {
        self.stats
            .data_sent(messages.len(), self.process_id, self.address.id);
        match write_all_half(&mut self.write, messages).await {
            Ok(_) => Ok(()),
            Err(err) => {
                error!("Terminating server because of: {:?}", err);
                self.bad = true;
                Err(err)
            }
        }
    }
pub async fn send ( & mut self , messages : BytesMut ) -> Result < ( ) , Error > { self . stats . data_sent ( messages . len ( ) , self . process_id , self . address . id ) ; match write_all_half ( & mut self . write , messages ) . await { Ok ( _ ) => Ok ( ( ) ) , Err ( err ) => { error ! ( " " err ) ; self . bad = true ; Err ( err ) } } }
Send messages to the server from the client.
Send messages to the server from the client .
&mut self
messages
BytesMut
&mut self
messages
BytesMut