pub fn send_packet(&mut self, p: &buffer::Buffer) {
        if self.stream_killed == true {
            return;
        }
        match self.stream().write(&p.data) {
            Ok(_) => (),
            Err(e) => match e.kind() {
                ErrorKind::ConnectionReset => (),
                ErrorKind::BrokenPipe => (),
                _ => {
                    eprintln!("Got unknown error writing packet: {}", e);
                }
            },
        }
    }
/// Writes the packet to the server
Writes the packet to the server
Writes the packet to the server
pub fn send_packet(&mut self, p: &buffer::Buffer) {
        if self.stream_killed == true {
            return;
        }
        match self.stream().write(&p.data) {
            Ok(_) => (),
            Err(e) => match e.kind() {
                ErrorKind::ConnectionReset => (),
                ErrorKind::BrokenPipe => (),
                _ => {
                    eprintln!("Got unknown error writing packet: {}", e);
                }
            },
        }
    }
pub fn send_packet ( & mut self , p : & buffer :: Buffer ) { if self . stream_killed == true { return ; } match self . stream ( ) . write ( & p . data ) { Ok ( _ ) => ( ) , Err ( e ) => match e . kind ( ) { ErrorKind :: ConnectionReset => ( ) , ErrorKind :: BrokenPipe => ( ) , _ => { eprintln ! ( " " e ) ; } } , } }
Writes the packet to the server
Writes the packet to the server
&mut self
p
&buffer::Buffer
&mut self
p
&buffer::Buffer