summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qsocks5socketengine.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2010-08-05 10:48:44 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2010-09-01 12:24:46 (GMT)
commit75a56ce44908eb14ef058d111129ef3d285c5364 (patch)
treed59c138a649140a93ff86b1987e98d1a2e8a322c /src/network/socket/qsocks5socketengine.cpp
parent8082ee277b44a158ce87d646e0d2c1d11e7d8348 (diff)
downloadQt-75a56ce44908eb14ef058d111129ef3d285c5364.zip
Qt-75a56ce44908eb14ef058d111129ef3d285c5364.tar.gz
Qt-75a56ce44908eb14ef058d111129ef3d285c5364.tar.bz2
Add QUdpSocket::setMulticastInterface() and ::multicastInterface()
This API allows the programmer to set/query the outgoing interface for multicast packets for the socket. Both functions need an initialized socket to work. Autotest updated to test setting each interface in the system as the multicast interface for IPv4 and IPv6 UDP sockets.
Diffstat (limited to 'src/network/socket/qsocks5socketengine.cpp')
-rw-r--r--src/network/socket/qsocks5socketengine.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp
index dcaf561..17cf5b1 100644
--- a/src/network/socket/qsocks5socketengine.cpp
+++ b/src/network/socket/qsocks5socketengine.cpp
@@ -56,6 +56,7 @@
#include "qurl.h"
#include "qauthenticator.h"
#include <qendian.h>
+#include <qnetworkinterface.h>
QT_BEGIN_NAMESPACE
@@ -1560,6 +1561,19 @@ bool QSocks5SocketEngine::leaveMulticastGroup(const QHostAddress &,
return false;
}
+
+QNetworkInterface QSocks5SocketEngine::multicastInterface() const
+{
+ return QNetworkInterface();
+}
+
+bool QSocks5SocketEngine::setMulticastInterface(const QNetworkInterface &)
+{
+ setError(QAbstractSocket::UnsupportedSocketOperationError,
+ QLatin1String("Operation on socket is not supported"));
+ return false;
+}
+
qint64 QSocks5SocketEngine::readDatagram(char *data, qint64 maxlen, QHostAddress *addr,
quint16 *port)
{