From f9c07da7b6c167820a71d2c840b7be70c393457a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 12 Dec 2017 13:55:32 -0800 Subject: Examples: Update multicast sender and receiver examples for IPv6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's the right thing to do, as we're in 2017, not 1997. Also, this takes care to indicate that QAbstractSocket::MulticastTtlOption makes sense mostly for IPv4, even though it's implemented for both families. In IPv4, it's used to indicatae the scope, whereas in IPv6 it's stored in bits 12-15 of the address. Task-number: QTBUG-46046 Change-Id: I9741f017961b410c910dfffd14ffaabe0a2024d8 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Timur Pocheptsov --- examples/network/multicastsender/sender.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/network/multicastsender/sender.h') diff --git a/examples/network/multicastsender/sender.h b/examples/network/multicastsender/sender.h index 5d8769790e..0af6f9aaec 100644 --- a/examples/network/multicastsender/sender.h +++ b/examples/network/multicastsender/sender.h @@ -70,9 +70,11 @@ private slots: private: QLabel *statusLabel = nullptr; QPushButton *startButton = nullptr; - QUdpSocket udpSocket; + QUdpSocket udpSocket4; + QUdpSocket udpSocket6; QTimer timer; - QHostAddress groupAddress; + QHostAddress groupAddress4; + QHostAddress groupAddress6; int messageNo = 1; }; -- cgit v1.2.3