mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 16:13:28 +02:00
increase NodeList send buffer size by default to 128KB
This commit is contained in:
parent
34634af975
commit
db757e9e7b
1 changed files with 11 additions and 0 deletions
|
@ -83,6 +83,17 @@ NodeList::NodeList(char newOwnerType, unsigned short int newSocketListenPort) :
|
|||
// clear our NodeList when logout is requested
|
||||
connect(&AccountManager::getInstance(), &AccountManager::logoutComplete , this, &NodeList::reset);
|
||||
|
||||
// change the socket send buffer size to be 128KB
|
||||
const int LARGER_SNDBUF_SIZE = 131072;
|
||||
|
||||
setsockopt(_nodeSocket.socketDescriptor(), SOL_SOCKET, SO_SNDBUF, &LARGER_SNDBUF_SIZE, sizeof(LARGER_SNDBUF_SIZE));
|
||||
|
||||
int newBufferSize = 0;
|
||||
unsigned int sizeOfInt = sizeof(newBufferSize);
|
||||
getsockopt(_nodeSocket.socketDescriptor(), SOL_SOCKET, SO_SNDBUF, &newBufferSize, &sizeOfInt);
|
||||
|
||||
qDebug() << "Changed socket send buffer size to" << newBufferSize << "bytes";
|
||||
|
||||
_packetStatTimer.start();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue