fn send_bytes(&mut self, token: &Token) -> net::Result<()> {
        if self.consumer.is_empty() {
            return Ok(());
        }
        let result: net::Result<()> = loop {
            match self.consumer.write_into(&mut self.stream, None) {
                Ok(n) => {
                    self.send_count += n;
                    break Ok(());
                },
                Err(ref err) if would_block(err) => {
                    self.is_ready = false;
                    break Ok(());
                },
                Err(ref err) if interrupted(err) => (),
                Err(err) => break Err(Box::new(err)),
            }
        };
        // if we've sent 1/2 our capacity without a report, send a report
        if self.send_count > MAX_BYTES / 2 {
            self.send_count = 0;
            send_cmd(&self.sender, NetCmd::SendReady(token.0, self.producer.remaining()));
        }
        result
    }
// send bytes in the ring buffer, we'll allow a partial write
send bytes in the ring buffer, we'll allow a partial write
send bytes in the ring buffer we ' ll allow a partial write
fn send_bytes(&mut self, token: &Token) -> net::Result<()> {
        if self.consumer.is_empty() {
            return Ok(());
        }
        let result: net::Result<()> = loop {
            match self.consumer.write_into(&mut self.stream, None) {
                Ok(n) => {
                    self.send_count += n;
                    break Ok(());
                },
                Err(ref err) if would_block(err) => {
                    self.is_ready = false;
                    break Ok(());
                },
                Err(ref err) if interrupted(err) => (),
                Err(err) => break Err(Box::new(err)),
            }
        };
        // if we've sent 1/2 our capacity without a report, send a report
        if self.send_count > MAX_BYTES / 2 {
            self.send_count = 0;
            send_cmd(&self.sender, NetCmd::SendReady(token.0, self.producer.remaining()));
        }
        result
    }
fn send_bytes ( & mut self , token : & Token ) -> net :: Result < ( ) > { if self . consumer . is_empty ( ) { return Ok ( ( ) ) ; } let result : net :: Result < ( ) > = loop { match self . consumer . write_into ( & mut self . stream , None ) { Ok ( n ) => { self . send_count += n ; break Ok ( ( ) ) ; } , Err ( ref err ) if would_block ( err ) => { self . is_ready = false ; break Ok ( ( ) ) ; } , Err ( ref err ) if interrupted ( err ) => ( ) , Err ( err ) => break Err ( Box :: new ( err ) ) , } } ; // if we've sent 1/2 our capacity without a report, send a report if self . send_count > MAX_BYTES / 2 { self . send_count = 0 ; send_cmd ( & self . sender , NetCmd :: SendReady ( token . 0 , self . producer . remaining ( ) ) ) ; } result }
send bytes in the ring buffer, we'll allow a partial write
send bytes in the ring buffer we ' ll allow a partial write
&mut self
token
&Token