diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-05-10 11:22:56 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-09-01 12:24:41 (GMT) |
commit | b7fae53bf12d61274de7d5131ddc15d8f356df59 (patch) | |
tree | 60bba43f4003bd58cef79dfb6f9e4bfc2c1d69f7 /tests/auto/qudpsocket | |
parent | 47d66c7855b9c315db29c82f4306de1864384ff7 (diff) | |
download | Qt-b7fae53bf12d61274de7d5131ddc15d8f356df59.zip Qt-b7fae53bf12d61274de7d5131ddc15d8f356df59.tar.gz Qt-b7fae53bf12d61274de7d5131ddc15d8f356df59.tar.bz2 |
Implement UDP multicast on Windows
The code is very similar to the UNIX version, but not identical. It
appears the Microsoft compiler does not like the "interface" variable
name, so they have been renamed.
The autotest had a bug in it that I failed to notice before. The sender
was not sending to the multicast group, it was sending to the local
address of the receiver (which fails on Windows).
Diffstat (limited to 'tests/auto/qudpsocket')
-rw-r--r-- | tests/auto/qudpsocket/tst_qudpsocket.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qudpsocket/tst_qudpsocket.cpp b/tests/auto/qudpsocket/tst_qudpsocket.cpp index 39a7ab1..3c08cd7 100644 --- a/tests/auto/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/qudpsocket/tst_qudpsocket.cpp @@ -876,8 +876,10 @@ void tst_QUdpSocket::multicast() << QByteArray("cdef"); QUdpSocket sender; - foreach (const QByteArray &datagram, datagrams) - sender.writeDatagram(datagram, receiver.localAddress(), receiver.localPort()); + foreach (const QByteArray &datagram, datagrams) { + QCOMPARE(int(sender.writeDatagram(datagram, groupAddress, receiver.localPort())), + int(datagram.size())); + } QVERIFY2(receiver.waitForReadyRead(), qPrintable(receiver.errorString())); |