fn send_status(
        &mut self,
        request_id: u16,
        event_loop: &mut EventLoop<Self>) {
        let active_sessions  = self.sessions.len() as u32;
        let mut status_flags = 0;
        
        {
            let app_context = self.app_context.lock()
                .unwrap();
            
            if app_context.scanning {
                status_flags |= control::STATUS_FLAG_SCAN;
            }
        }
        
        let status_msg = StatusMessage::new(request_id, 
            status_flags, active_sessions);
        let control_msg = control::create_status_message(self.msg_id,
            status_msg);
        
        self.msg_id = self.msg_id.wrapping_add(1);
        
        log_debug!(self.logger, "sending a STATUS message...");
        
        self.send_control_message(control_msg, event_loop);
    }
/// Send status message for a given request ID.
Send status message for a given request ID.
Send status message for a given request ID .
fn send_status(
        &mut self,
        request_id: u16,
        event_loop: &mut EventLoop<Self>) {
        let active_sessions  = self.sessions.len() as u32;
        let mut status_flags = 0;
        {
            let app_context = self.app_context.lock()
                .unwrap();
            if app_context.scanning {
                status_flags |= control::STATUS_FLAG_SCAN;
            }
        }
        let status_msg = StatusMessage::new(request_id, 
            status_flags, active_sessions);
        let control_msg = control::create_status_message(self.msg_id,
            status_msg);
        self.msg_id = self.msg_id.wrapping_add(1);
        log_debug!(self.logger, "sending a STATUS message...");
        self.send_control_message(control_msg, event_loop);
    }
fn send_status ( & mut self , request_id : u16 , event_loop : & mut EventLoop < Self > ) { let active_sessions = self . sessions . len ( ) as u32 ; let mut status_flags = 0 ; { let app_context = self . app_context . lock ( ) . unwrap ( ) ; if app_context . scanning { status_flags |= control :: STATUS_FLAG_SCAN ; } } let status_msg = StatusMessage :: new ( request_id , status_flags , active_sessions ) ; let control_msg = control :: create_status_message ( self . msg_id , status_msg ) ; self . msg_id = self . msg_id . wrapping_add ( 1 ) ; log_debug ! ( self logger " " ) ; self . send_control_message ( control_msg , event_loop ) ; }
Send status message for a given request ID.
Send status message for a given request ID .
&mut self
request_id
u16
event_loop
&mut EventLoop<Self>
&mut self
request_id
u16
event_loop
&mut EventLoop<Self>