serverspy/src/serverspy.cxx
//------------------------------------------------------------------------------
// This function will process all administrator requests
//------------------------------------------------------------------------------
This function will process all administrator requests
This function will process all administrator requests
void ProcessAdministrators(void) {
    AdminDescriptor *cur = AdminDescriptor::admin_list;
    while(cur != NULL){
                if(CheckSocket(cur->m_Socket)) {
                        if(ProcessAdministratorCommand(cur->m_Socket)==0) {
                            AdminDescriptor::RemoveAdmin(cur);
                                return;
                        }
        }
            cur = cur->m_Next;
    }
}
void ProcessAdministrators ( void ) { AdminDescriptor * cur = AdminDescriptor :: admin_list ; while ( cur != NULL ) { if ( CheckSocket ( cur -> m_Socket ) ) { if ( ProcessAdministratorCommand ( cur -> m_Socket ) == 0 ) { AdminDescriptor :: RemoveAdmin ( cur ) ; return ; } } cur = cur -> m_Next ; } }
This function will process all administrator requests
This function will process all administrator requests
// If some client send a request we need to forward this request // to the server // If an error was generated during the attempt to read // from the admin socket we will remove this administrator // from the administrators list and we will colse connected // server port