summaryrefslogtreecommitdiffstats
path: root/tests/auto/qudpsocket
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2010-05-10 11:22:56 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2010-09-01 12:24:41 (GMT)
commitb7fae53bf12d61274de7d5131ddc15d8f356df59 (patch)
tree60bba43f4003bd58cef79dfb6f9e4bfc2c1d69f7 /tests/auto/qudpsocket
parent47d66c7855b9c315db29c82f4306de1864384ff7 (diff)
downloadQt-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.cpp6
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()));