diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-04-08 13:30:42 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-01-29 23:07:09 +0000 |
commit | 6b285de8ec616ec7110515f503090e5b3a5efe46 (patch) | |
tree | cf0fd954cd06e6fec6014319121e681ddc731896 /src/plugins/platforms/windows/qwindowsmousehandler.cpp | |
parent | 81514c19c1eddfbce2fd34314eab9192e31c08d7 (diff) |
Fix QSocketEngineBackend::nativeBytesAvaible for UDP sockets
On OS X ioctl(... FIONREAD) on UDP socket returns more than expected:
"SO_NREAD returns the amount of data in the input buffer that is available to be received
For datagram oriented sockets, SO_NREAD returns the size of the first packet -- this dif-
fers from the ioctl() command FIONREAD that returns the total amount of data available."
(man getsockopt). On OS X bytesAvailable for UDP socket seems to include some headers also:
for a datagram of size 1 - bytesAvailable == 17, 2 - bytesAvailable == 18 etc.
Found in a broken tst_qudpsocket test.
Change-Id: I88be827c66208835ed10b010f13d9dc70576fea4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsmousehandler.cpp')
0 files changed, 0 insertions, 0 deletions