Skip to content

Commit

Permalink
Set LowDelayOption to true on TCP socket
Browse files Browse the repository at this point in the history
Disables Nagle's algorithm to avoid delay and bunching of small packages.
  • Loading branch information
kitswas committed Aug 1, 2024
1 parent a205158 commit e839be9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/networking/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ void Server::initServer()
void Server::handleConnection()
{
clientConnection = tcpServer->nextPendingConnection();
// disable Nagle's algorithm to avoid delay and bunching of small packages
clientConnection->setSocketOption(QAbstractSocket::LowDelayOption, 1);
isGamepadConnected = true;
QString connectionMessage;
connectionMessage =
Expand Down

0 comments on commit e839be9

Please sign in to comment.