Beispiel #1
0
	void HttpServer::newConnection(int s)
	{
		QSocket* socket = new QSocket(this);
		socket->setSocket(s);
	
		connect(socket, SIGNAL(readyRead()), this, SLOT(slotSocketReadyToRead()));
		connect(socket, SIGNAL(delayedCloseFinished()), this, SLOT(slotConnectionClosed()));
		connect(socket, SIGNAL(connectionClosed()), this, SLOT(slotConnectionClosed()));
	
		HttpClientHandler* handler = new HttpClientHandler(this,socket);
		clients.insert(socket,handler);
		Out(SYS_WEB|LOG_NOTICE) << "connection from "<< socket->peerAddress().toString()  << endl;
	}