return result; }
if (argc == 3) { totalTests = atoi(argv[1]); prefix = argv[2]; } else { usage(argv[0], "Wrong number of arguments."); }      log4cxx::BasicConfigurator::configure();    logstream log(Logger::getLogger("shortsocketserver"), Level::DEBUG);  log << "Listening on port " << PORT << LOG4CXX_ENDMSG; ServerSocket serverSocket(PORT);  MDC::put("hostID", "shortSocketServer");  for (int i = 1; i <= totalTests; i++) { std::ostringstream sbuf(prefix); sbuf <<  i  << ".properties"; PropertyConfigurator::configure(sbuf.str()); log << "Waiting to accept a new client." << LOG4CXX_ENDMSG; SocketPtr socket = serverSocket.accept(); log << "Connected to client at " << socket->getInetAddress().toString() << LOG4CXX_ENDMSG; log << "Starting new socket node." << LOG4CXX_ENDMSG; SocketNode sn(socket, LogManager::getLoggerRepository()); sn.run(); } }
int main(int argc, char **argv){    int result = EXIT_SUCCESS;    try    {		ShortSocketServer::main(argc, argv);	}	catch(Exception&)	{		result = EXIT_FAILURE;	}    return result;}