libs/StartExe/StartExe.cpp
//-------------------------------------------------------------------------------------------
// Loop while not shutting down. Will listen clients socket and administrator socket,
// will process clients and administrator requests if any.
//-------------------------------------------------------------------------------------------
Loop while not shutting down. Will listen clients socket and administrator socket,
will process clients and administrator requests if any.
Loop while not shutting down . Will listen clients socket and administrator socket will process clients and administrator requests if any .
void RequestsLoop(void) {
int sockets[3000];
   struct sockaddr s;
   socklen_t s_size = sizeof(s);
   do {
	  int amount = MakeSocketsArray(Connection.m_DriverListeningSocket,sockets);
      WaitSocket(sockets,amount); 
      if(CheckSocket(Connection.m_DriverListeningSocket)) {
	      int cli_connection = accept(Connection.m_DriverListeningSocket, &s, &s_size);
          int tmp_switch = 1;
          setsockopt(cli_connection, IPPROTO_TCP, TCP_NODELAY, (char *)&tmp_switch, sizeof(tmp_switch));
	      if(cli_connection >= 0) {
	          _DBG(fprintf(log_fd,"Connecting new client.\n"));
	          ConnectClient(cli_connection, &s);
			  continue;
		  }
	  }
      ProcessClients();
   } while(!do_shutdown);
}
void RequestsLoop ( void ) { int sockets [ 3000 ] ; struct sockaddr s ; socklen_t s_size = sizeof ( s ) ; do { int amount = MakeSocketsArray ( Connection . m_DriverListeningSocket , sockets ) ; WaitSocket ( sockets , amount ) ; if ( CheckSocket ( Connection . m_DriverListeningSocket ) ) { int cli_connection = accept ( Connection . m_DriverListeningSocket , & s , & s_size ) ; int tmp_switch = 1 ; setsockopt ( cli_connection , IPPROTO_TCP , TCP_NODELAY , ( char * ) & tmp_switch , sizeof ( tmp_switch ) ) ; if ( cli_connection >= 0 ) { _DBG ( fprintf ( log_fd , " \n " ) ) ; ConnectClient ( cli_connection , & s ) ; continue ; } } ProcessClients ( ) ; } while ( ! do_shutdown ) ; }
Loop while not shutting down.
Loop while not shutting down .
// Performing data translstion from the existing client sockets // to the existing model sockets