fn receive<N, S>(&mut self, socket: &mut S, network: &mut N) -> nb::Result<(), NetworkError>
    where
        N: TcpClientStack<TcpSocket = S> + ?Sized,
    {
        let buffer = self.buffer();
        let len = network.receive(socket, buffer).map_err(|e| {
            if matches!(e, nb::Error::WouldBlock) {
                nb::Error::WouldBlock
            } else {
                mqtt_log!(error, "[receive] NetworkError::Read");
                nb::Error::Other(NetworkError::Read)
            }
        })?;
        self.range.end += len;
        Ok(())
    }
/// Receives bytes from a network socket in non-blocking mode. If incoming
/// bytes found, the range gets extended covering them.
Receives bytes from a network socket in non-blocking mode. If incoming
bytes found, the range gets extended covering them.
Receives bytes from a network socket in non - blocking mode . If incoming bytes found the range gets extended covering them .
fn receive<N, S>(&mut self, socket: &mut S, network: &mut N) -> nb::Result<(), NetworkError>
    where
        N: TcpClientStack<TcpSocket = S> + ?Sized,
    {
        let buffer = self.buffer();
        let len = network.receive(socket, buffer).map_err(|e| {
            if matches!(e, nb::Error::WouldBlock) {
                nb::Error::WouldBlock
            } else {
                mqtt_log!(error, "[receive] NetworkError::Read");
                nb::Error::Other(NetworkError::Read)
            }
        })?;
        self.range.end += len;
        Ok(())
    }
fn receive < N , S > ( & mut self , socket : & mut S , network : & mut N ) -> nb :: Result < ( ) , NetworkError > where N : TcpClientStack < TcpSocket = S > + ? Sized , { let buffer = self . buffer ( ) ; let len = network . receive ( socket , buffer ) . map_err ( | e | { if matches ! ( e nb Error WouldBlock ) { nb :: Error :: WouldBlock } else { mqtt_log ! ( error " " ) ; nb :: Error :: Other ( NetworkError :: Read ) } } ) ? ; self . range . end += len ; Ok ( ( ) ) }
Receives bytes from a network socket in non-blocking mode.
Receives bytes from a network socket in non - blocking mode .
&mut self
socket
&mut S
network
&mut N
&mut self
socket
&mut S
network
&mut N