init("4560", "logconfig.xml");
init(_T("4560"), _T("logconfig.xml"));
int main(int argc, char * argv[]){	if(argc == 3)	{		USES_CONVERSION;		init(A2T(argv[1]), A2T(argv[2]));	}	else	{		USES_CONVERSION;		init("4560", "logconfig.xml");//		usage(_T("Wrong number of arguments."));//		return 1;	}	try	{		LoggerPtr logger = Logger::getLogger(_T("SimpleSocketServer"));				LOG4CXX_INFO(logger, _T("Listening on port ") << port);			ServerSocket serverSocket(port);		while(true)		{			LOG4CXX_INFO(logger, _T("Waiting to accept a new client."));			SocketPtr socket = serverSocket.accept();						LOG4CXX_INFO(logger, _T("Connected to client at ")				<< socket->getInetAddress().toString());			LOG4CXX_INFO(logger, _T("Starting new socket node."));						Thread * thread = new Thread(new SocketNode(socket,				LogManager::getLoggerRepository()));			thread->start();		}	}	catch(SocketException& e)	{		tcout << _T("SocketException: ") << e.getMessage() << std::endl;	}	return 0;}