From 3f0eecc599f044dc5a4991fc621ef42a83a6c45c Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 30 Jul 2015 15:04:48 -0700 Subject: [PATCH] actually change the system socket buffer size --- libraries/networking/src/udt/Socket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index a93a4d0e9e..3dd00d0834 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -39,7 +39,7 @@ void Socket::rebind() { quint16 oldPort = _udpSocket.localPort(); _udpSocket.close(); - _udpSocket.bind(QHostAddress::AnyIPv4, oldPort); + bind(QHostAddress::AnyIPv4, oldPort); } void Socket::setSystemBufferSizes() { @@ -63,6 +63,7 @@ void Socket::setSystemBufferSizes() { int oldBufferSize = _udpSocket.socketOption(bufferOpt).toInt(); if (oldBufferSize < numBytes) { + _udpSocket.setSocketOption(bufferOpt, QVariant(numBytes)); int newBufferSize = _udpSocket.socketOption(bufferOpt).toInt(); qCDebug(networking) << "Changed socket" << bufferTypeString << "buffer size from" << oldBufferSize << "to"