qaengine/src/ClientInterface.cxx
//------------------------------------------------------------------------------
// Loop while not shutting down. Will listen clients sockets
// and process clients requests if any.
//------------------------------------------------------------------------------
Loop while not shutting down. Will listen clients sockets
and process clients requests if any.
Loop while not shutting down . Will listen clients sockets and process clients requests if any .
void ClientInterface::requestsLoop() {
    struct sockaddr s;
    int s_size = sizeof(s);
    m_Shutdown = 0;
    do {
	    WaitForAnyInput();
	    if (CheckSocket(m_Socket)) {
	       int connection = accept(m_Socket, &s, &s_size);
	       int tmp_switch = 1;
	       setsockopt(connection, IPPROTO_TCP, TCP_NODELAY, (char *)&tmp_switch, sizeof(tmp_switch));
	       if(connection >= 0) {
			   m_Clients[connection] = new ClientInfo();
		   }
		} else {
		   processClientRequest();
		}
		m_Shutdown = m_Shutdown || !IsServerRunning();
    } while(!m_Shutdown);
}
void ClientInterface :: requestsLoop ( ) { struct sockaddr s ; int s_size = sizeof ( s ) ; m_Shutdown = 0 ; do { WaitForAnyInput ( ) ; if ( CheckSocket ( m_Socket ) ) { int connection = accept ( m_Socket , & s , & s_size ) ; int tmp_switch = 1 ; setsockopt ( connection , IPPROTO_TCP , TCP_NODELAY , ( char * ) & tmp_switch , sizeof ( tmp_switch ) ) ; if ( connection >= 0 ) { m_Clients [ connection ] = new ClientInfo ( ) ; } } else { processClientRequest ( ) ; } m_Shutdown = m_Shutdown || ! IsServerRunning ( ) ; } while ( ! m_Shutdown ) ; }
Loop while not shutting down.
Loop while not shutting down .
// Request to the listening socket - new client try to connect //			   cout << "New client created."<<endl; // Request to the client socket - client exec query.  