mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 02:23:38 +02:00
actually change the system socket buffer size
This commit is contained in:
parent
e7f5bec3d0
commit
3f0eecc599
1 changed files with 2 additions and 1 deletions
|
@ -39,7 +39,7 @@ void Socket::rebind() {
|
||||||
quint16 oldPort = _udpSocket.localPort();
|
quint16 oldPort = _udpSocket.localPort();
|
||||||
|
|
||||||
_udpSocket.close();
|
_udpSocket.close();
|
||||||
_udpSocket.bind(QHostAddress::AnyIPv4, oldPort);
|
bind(QHostAddress::AnyIPv4, oldPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Socket::setSystemBufferSizes() {
|
void Socket::setSystemBufferSizes() {
|
||||||
|
@ -63,6 +63,7 @@ void Socket::setSystemBufferSizes() {
|
||||||
int oldBufferSize = _udpSocket.socketOption(bufferOpt).toInt();
|
int oldBufferSize = _udpSocket.socketOption(bufferOpt).toInt();
|
||||||
|
|
||||||
if (oldBufferSize < numBytes) {
|
if (oldBufferSize < numBytes) {
|
||||||
|
_udpSocket.setSocketOption(bufferOpt, QVariant(numBytes));
|
||||||
int newBufferSize = _udpSocket.socketOption(bufferOpt).toInt();
|
int newBufferSize = _udpSocket.socketOption(bufferOpt).toInt();
|
||||||
|
|
||||||
qCDebug(networking) << "Changed socket" << bufferTypeString << "buffer size from" << oldBufferSize << "to"
|
qCDebug(networking) << "Changed socket" << bufferTypeString << "buffer size from" << oldBufferSize << "to"
|
||||||
|
|
Loading…
Reference in a new issue