Allow autobound UDP sockets to send to IPv4 and IPv6
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Thu, 15 Mar 2012 17:58:22 +0000 (17:58 +0000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 22 Mar 2012 17:59:45 +0000 (18:59 +0100)
commitcae5299f48d950ab924e8b78452d25535bd8b811
treebba1f53b34cbd2b1ffbb8ef9368b7a1f2ed6f9aa
parentfa8e18c3860d8c43795152da1d4c38dc1471f320
Allow autobound UDP sockets to send to IPv4 and IPv6

When writeDatagram is called without first binding the UDP socket,
then bind it as QHostAddress::Any.
This allows the same socket to be used to sent to both IPv4 and
IPv6 destination addresses.

Allowing the OS to autobind the socket inside sendTo() may
result in a single protocol socket.

Task-number: QTBUG-5275
Change-Id: I2b76507e8a8a38369c6eafb61ce4191d1d6cc930
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
src/network/socket/qnativesocketengine_unix.cpp
src/network/socket/qnativesocketengine_win.cpp
src/network/socket/qudpsocket.cpp
tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp