cmdriver/src/CMDriver.cxx
//--------------------------------------------------------------------------------------------
// This function will inspect clients list in order to determine which clients
// need to query server. The data will be forwarded from the client socket
// into model server socket and reply will be forwarded from model server socket
// to the client socket.
//--------------------------------------------------------------------------------------------
This function will inspect clients list in order to determine which clients
need to query server. The data will be forwarded from the client socket
into model server socket and reply will be forwarded from model server socket
to the client socket.
This function will inspect clients list in order to determine which clients need to query server . The data will be forwarded from the client socket into model server socket and reply will be forwarded from model server socket to the client socket .
int MakeSocketsArray(int server[m_DriversNum], int *sockets) {
    static ClientDescriptor* hang;
    for(int i=0;i<m_DriversNum;i++)
        sockets[i]=server[i];
    int amount=m_DriversNum;
    ClientDescriptor *cur = ClientDescriptor::sd_list;
    while(ClientDescriptor::sd_list!=NULL && cur != NULL) {
        sockets[amount++]=cur->m_ClientSocket;
        cur = cur->m_Next;
    }
    return amount;
}
int MakeSocketsArray ( int server [ m_DriversNum ] , int * sockets ) { static ClientDescriptor * hang ; for ( int i = 0 ; i < m_DriversNum ; i ++ ) sockets [ i ] = server [ i ] ; int amount = m_DriversNum ; ClientDescriptor * cur = ClientDescriptor :: sd_list ; while ( ClientDescriptor :: sd_list != NULL && cur != NULL ) { sockets [ amount ++ ] = cur -> m_ClientSocket ; cur = cur -> m_Next ; } return amount ; }
This function will inspect clients list in order to determine which clients
need to query server.
This function will inspect clients list in order to determine which clients need to query server .