fn process_service_request(
        &mut self, 
        service_id: u16,
        session_id: u32,
        event_loop: &mut EventLoop<Self>) -> SocketEventResult {
        if self.state == ProtocolState::Established {
            let request = match self.req_parser.body() {
                Some(body) => body.to_vec(),
                None => panic!("incomplete message")
            };
            
            self.req_parser.clear();
            
            let send_hup = match self.create_session_context(
                service_id, session_id, event_loop) {
                None      => true,
                Some(ctx) => {
                    ctx.send_message(&request, event_loop);
                    false
                }
            };
            
            if send_hup {
                self.send_hup_message(session_id, 1, event_loop);
            }
            
            Ok(None)
        } else {
            Err(ArrowError::other("cannot handle service requests in the Handshake state"))
        }
    }
/// Process request for a remote service.
Process request for a remote service.
Process request for a remote service .
fn process_service_request(
        &mut self, 
        service_id: u16,
        session_id: u32,
        event_loop: &mut EventLoop<Self>) -> SocketEventResult {
        if self.state == ProtocolState::Established {
            let request = match self.req_parser.body() {
                Some(body) => body.to_vec(),
                None => panic!("incomplete message")
            };
            self.req_parser.clear();
            let send_hup = match self.create_session_context(
                service_id, session_id, event_loop) {
                None      => true,
                Some(ctx) => {
                    ctx.send_message(&request, event_loop);
                    false
                }
            };
            if send_hup {
                self.send_hup_message(session_id, 1, event_loop);
            }
            Ok(None)
        } else {
            Err(ArrowError::other("cannot handle service requests in the Handshake state"))
        }
    }
fn process_service_request ( & mut self , service_id : u16 , session_id : u32 , event_loop : & mut EventLoop < Self > ) -> SocketEventResult { if self . state == ProtocolState :: Established { let request = match self . req_parser . body ( ) { Some ( body ) => body . to_vec ( ) , None => panic ! ( " " ) } ; self . req_parser . clear ( ) ; let send_hup = match self . create_session_context ( service_id , session_id , event_loop ) { None => true , Some ( ctx ) => { ctx . send_message ( & request , event_loop ) ; false } } ; if send_hup { self . send_hup_message ( session_id , 1 , event_loop ) ; } Ok ( None ) } else { Err ( ArrowError :: other ( " " ) ) } }
Process request for a remote service.
Process request for a remote service .
&mut self
service_id
u16
session_id
u32
event_loop
&mut EventLoop<Self>
&mut self
service_id
u16
session_id
u32
event_loop
&mut EventLoop<Self>