fn send_message(&self, message: TestMessage) -> usize {
        let mut payload = TransportPayload(serialize(&message).unwrap());
        let mut qfull = 0;
        loop {
            match self.transport.send(
                self.client_type,
                &self.peer,
                FlowTag::from(FLOW_TAG),
                payload,
            ) {
                Ok(()) => return qfull,
                Err(TransportErrorCode::TransportBusy(unsent)) => {
                    qfull += 1;
                    payload = unsent;
                    thread::sleep(Duration::from_micros(QFULL_DELAY_USEC));
                }
                Err(e) => {
                    warn!(
                        self.log,
                        "client(): failed to send message: peer = {:?} \
                            err = {:?}",
                        self.peer,
                        e
                    );
                    exit(1);
                }
            }
        }
    }
// Sends the given message to the peer, with retries on qfull. Returns the
// number of qfulls.
Sends the given message to the peer, with retries on qfull. Returns the
number of qfulls.
Sends the given message to the peer with retries on qfull . Returns the number of qfulls .
fn send_message(&self, message: TestMessage) -> usize {
        let mut payload = TransportPayload(serialize(&message).unwrap());
        let mut qfull = 0;
        loop {
            match self.transport.send(
                self.client_type,
                &self.peer,
                FlowTag::from(FLOW_TAG),
                payload,
            ) {
                Ok(()) => return qfull,
                Err(TransportErrorCode::TransportBusy(unsent)) => {
                    qfull += 1;
                    payload = unsent;
                    thread::sleep(Duration::from_micros(QFULL_DELAY_USEC));
                }
                Err(e) => {
                    warn!(
                        self.log,
                        "client(): failed to send message: peer = {:?} \
                            err = {:?}",
                        self.peer,
                        e
                    );
                    exit(1);
                }
            }
        }
    }
fn send_message ( & self , message : TestMessage ) -> usize { let mut payload = TransportPayload ( serialize ( & message ) . unwrap ( ) ) ; let mut qfull = 0 ; loop { match self . transport . send ( self . client_type , & self . peer , FlowTag :: from ( FLOW_TAG ) , payload , ) { Ok ( ( ) ) => return qfull , Err ( TransportErrorCode :: TransportBusy ( unsent ) ) => { qfull += 1 ; payload = unsent ; thread :: sleep ( Duration :: from_micros ( QFULL_DELAY_USEC ) ) ; } Err ( e ) => { warn ! ( self log " \
 " self peer e ) ; exit ( 1 ) ; } } } }
Sends the given message to the peer, with retries on qfull.
Sends the given message to the peer with retries on qfull .
&self
message
TestMessage
&self
message
TestMessage