fn clear_socket(&self) {
        let mut stack = self.stack.borrow_mut();
        let mut socket = self.socket.borrow_mut();

        loop {
            let mut local_buffer: [u8; 32] = [0; 32];

            match stack.receive(socket.deref_mut(), &mut local_buffer) {
                Ok(_) => {}
                Err(_) => {
                    break;
                }
            }
        }

        self.buffer.borrow_mut().clear();
    }
/// Clears buffer and pending socket data
Clears buffer and pending socket data
Clears buffer and pending socket data
fn clear_socket(&self) {
        let mut stack = self.stack.borrow_mut();
        let mut socket = self.socket.borrow_mut();
        loop {
            let mut local_buffer: [u8; 32] = [0; 32];
            match stack.receive(socket.deref_mut(), &mut local_buffer) {
                Ok(_) => {}
                Err(_) => {
                    break;
                }
            }
        }
        self.buffer.borrow_mut().clear();
    }
fn clear_socket ( & self ) { let mut stack = self . stack . borrow_mut ( ) ; let mut socket = self . socket . borrow_mut ( ) ; loop { let mut local_buffer : [ u8 ; 32 ] = [ 0 ; 32 ] ; match stack . receive ( socket . deref_mut ( ) , & mut local_buffer ) { Ok ( _ ) => { } Err ( _ ) => { break ; } } } self . buffer . borrow_mut ( ) . clear ( ) ; }
Clears buffer and pending socket data
Clears buffer and pending socket data
&self
&self