added some comments

git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@379 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
matlabbe 2014-08-06 03:06:05 +00:00
parent da4ee8637b
commit 7b3d4460e9

View File

@ -88,6 +88,7 @@ void CameraTcpServer::incomingConnection(int socketDescriptor)
UWARN("A client is already connected. Only one connection allowed at the same time.");
QTcpSocket socket;
socket.setSocketDescriptor(socketDescriptor);
socket.close(); // close without sending an acknowledge
}
else
{
@ -96,7 +97,7 @@ void CameraTcpServer::incomingConnection(int socketDescriptor)
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(displayError(QAbstractSocket::SocketError)));
connect(socket, SIGNAL(disconnected()), this, SLOT(connectionLost()));
socket->setSocketDescriptor(socketDescriptor);
socket->write(QByteArray("1"));
socket->write(QByteArray("1")); // send acknowledge
}
}