/// Process a Control Protocol HUP message.
Process a Control Protocol HUP message.
Process a Control Protocol HUP message .
fn process_hup_message(
        &mut self, 
        msg: &[u8], 
        event_loop: &mut EventLoop<Self>) -> SocketEventResult {
        if self.state == ProtocolState::Established {
            let msg        = try_arr!(HupMessage::from_bytes(msg));
            let session_id = msg.session_id;
            // XXX: the HUP error code should be processed here
            log_info!(self.logger, "session {:08x} closed", session_id);
            self.remove_session_context(session_id, event_loop);
            Ok(None)
        } else {
            Err(ArrowError::other("cannot handle HUP message in the Handshake state"))
        }
    }
fn process_hup_message ( & mut self , msg : & [ u8 ] , event_loop : & mut EventLoop < Self > ) -> SocketEventResult { if self . state == ProtocolState :: Established { let msg = try_arr ! ( HupMessage from_bytes ( msg ) ) ; let session_id = msg . session_id ; // XXX: the HUP error code should be processed here log_info ! ( self logger " " session_id ) ; self . remove_session_context ( session_id , event_loop ) ; Ok ( None ) } else { Err ( ArrowError :: other ( " " ) ) } }
Process a Control Protocol HUP message.
Process a Control Protocol HUP message .
&mut self
msg
&[u8]
event_loop
&mut EventLoop<Self>