Commit f7975d8a authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

fixed issue #50: ensure that tcp_nodelay is set

parent b106f762
......@@ -19,6 +19,7 @@ RemoteClient::RemoteClient(QObject *parent)
connect(timer, SIGNAL(timeout()), this, SLOT(ping()));
socket = new QTcpSocket(this);
socket->setSocketOption(QAbstractSocket::LowDelayOption, 1);
connect(socket, SIGNAL(connected()), this, SLOT(slotConnected()));
connect(socket, SIGNAL(readyRead()), this, SLOT(readData()));
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(slotSocketError(QAbstractSocket::SocketError)));
......
......@@ -44,6 +44,7 @@ void Servatrice_GameServer::incomingConnection(int socketDescriptor)
} else {
QTcpSocket *socket = new QTcpSocket;
socket->setSocketDescriptor(socketDescriptor);
socket->setSocketOption(QAbstractSocket::LowDelayOption, 1);
ServerSocketInterface *ssi = new ServerSocketInterface(server, socket);
logger->logMessage(QString("incoming connection: %1").arg(socket->peerAddress().toString()), ssi);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment