fn process_ack_message(
        &mut self, 
        msg_id: u16, 
        msg: &[u8],
        event_loop: &mut EventLoop<Self>) -> SocketEventResult {
        let expected_ack = self.expected_acks.pop_front();
        
        if self.expected_acks.is_empty() {
            self.ack_tout.clear();
        } else {
            self.ack_tout.set(CONNECTION_TIMEOUT);
        }
        
        if let Some(expected_ack) = expected_ack {
            if msg_id == expected_ack {
                if self.state == ProtocolState::Handshake {
                    self.process_handshake_ack(msg, event_loop)
                } else {
                    Ok(None)
                }
            } else {
                Err(ArrowError::other("unexpected ACK message ID"))
            }
        } else {
            Err(ArrowError::other("no ACK message expected"))
        }
    }
/// Process a Control Protocol ACK message.
Process a Control Protocol ACK message.
Process a Control Protocol ACK message .
fn process_ack_message(
        &mut self, 
        msg_id: u16, 
        msg: &[u8],
        event_loop: &mut EventLoop<Self>) -> SocketEventResult {
        let expected_ack = self.expected_acks.pop_front();
        if self.expected_acks.is_empty() {
            self.ack_tout.clear();
        } else {
            self.ack_tout.set(CONNECTION_TIMEOUT);
        }
        if let Some(expected_ack) = expected_ack {
            if msg_id == expected_ack {
                if self.state == ProtocolState::Handshake {
                    self.process_handshake_ack(msg, event_loop)
                } else {
                    Ok(None)
                }
            } else {
                Err(ArrowError::other("unexpected ACK message ID"))
            }
        } else {
            Err(ArrowError::other("no ACK message expected"))
        }
    }
fn process_ack_message ( & mut self , msg_id : u16 , msg : & [ u8 ] , event_loop : & mut EventLoop < Self > ) -> SocketEventResult { let expected_ack = self . expected_acks . pop_front ( ) ; if self . expected_acks . is_empty ( ) { self . ack_tout . clear ( ) ; } else { self . ack_tout . set ( CONNECTION_TIMEOUT ) ; } if let Some ( expected_ack ) = expected_ack { if msg_id == expected_ack { if self . state == ProtocolState :: Handshake { self . process_handshake_ack ( msg , event_loop ) } else { Ok ( None ) } } else { Err ( ArrowError :: other ( " " ) ) } } else { Err ( ArrowError :: other ( " " ) ) } }
Process a Control Protocol ACK message.
Process a Control Protocol ACK message .
&mut self
msg_id
u16
msg
&[u8]
event_loop
&mut EventLoop<Self>
&mut self
msg_id
u16
msg
&[u8]
event_loop
&mut EventLoop<Self>