diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-08-05 10:48:44 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-09-01 12:24:46 (GMT) |
commit | 75a56ce44908eb14ef058d111129ef3d285c5364 (patch) | |
tree | d59c138a649140a93ff86b1987e98d1a2e8a322c /src/network/socket/qudpsocket.h | |
parent | 8082ee277b44a158ce87d646e0d2c1d11e7d8348 (diff) | |
download | Qt-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/qudpsocket.h')
-rw-r--r-- | src/network/socket/qudpsocket.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/socket/qudpsocket.h b/src/network/socket/qudpsocket.h index 54f82c9..b277d3f 100644 --- a/src/network/socket/qudpsocket.h +++ b/src/network/socket/qudpsocket.h @@ -84,6 +84,9 @@ public: bool leaveMulticastGroup(const QHostAddress &groupAddress, const QNetworkInterface &iface); + QNetworkInterface multicastInterface() const; + void setMulticastInterface(const QNetworkInterface &iface); + bool hasPendingDatagrams() const; qint64 pendingDatagramSize() const; qint64 readDatagram(char *data, qint64 maxlen, QHostAddress *host = 0, quint16 *port = 0); |