Set low delay tcp option for netplay.

This commit is contained in:
harry 2024-03-24 21:34:07 -04:00
parent 6e22998336
commit 84654b1c06
1 changed files with 2 additions and 0 deletions

View File

@ -1106,6 +1106,7 @@ void NetPlayClient::setSocket(QTcpSocket *s)
if (sock != nullptr) if (sock != nullptr)
{ {
sock->setSocketOption( QAbstractSocket::QAbstractSocket::LowDelayOption, 1);
sock->setSocketOption( QAbstractSocket::SendBufferSizeSocketOption, static_cast<int>(recvMsgBufSize) ); sock->setSocketOption( QAbstractSocket::SendBufferSizeSocketOption, static_cast<int>(recvMsgBufSize) );
sock->setSocketOption( QAbstractSocket::ReceiveBufferSizeSocketOption, static_cast<int>(recvMsgBufSize) ); sock->setSocketOption( QAbstractSocket::ReceiveBufferSizeSocketOption, static_cast<int>(recvMsgBufSize) );
@ -1120,6 +1121,7 @@ QTcpSocket* NetPlayClient::createSocket(void)
{ {
sock = new QTcpSocket(this); sock = new QTcpSocket(this);
sock->setSocketOption( QAbstractSocket::QAbstractSocket::LowDelayOption, 1);
sock->setSocketOption( QAbstractSocket::SendBufferSizeSocketOption, static_cast<int>(recvMsgBufSize) ); sock->setSocketOption( QAbstractSocket::SendBufferSizeSocketOption, static_cast<int>(recvMsgBufSize) );
sock->setSocketOption( QAbstractSocket::ReceiveBufferSizeSocketOption, static_cast<int>(recvMsgBufSize) ); sock->setSocketOption( QAbstractSocket::ReceiveBufferSizeSocketOption, static_cast<int>(recvMsgBufSize) );