Clean up multicast examples
They're small, not much to polish. Pick-to: 6.5 Change-Id: Iada573504de557ab18381370bb9760b1f60cc2e4 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
7c23aa6bc5
commit
58dfb10781
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
BIN
examples/network/doc/images/multicastreceiver-example.webp
Normal file
BIN
examples/network/doc/images/multicastreceiver-example.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 21 KiB |
BIN
examples/network/doc/images/multicastsender-example.webp
Normal file
BIN
examples/network/doc/images/multicastsender-example.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
@ -3,10 +3,12 @@
|
||||
|
||||
/*!
|
||||
\example multicastreceiver
|
||||
\title Multicast Receiver Example
|
||||
\title Multicast Receiver
|
||||
\meta category {Networking}
|
||||
\meta tags {network,multicast,ipv6,ipv4,udp}
|
||||
\ingroup examples-network
|
||||
\brief Demonstrates how to receive information sent to a multicast group.
|
||||
|
||||
This example demonstrates how to receive messages sent to a multicast group
|
||||
\image multicastreceiver-example.png
|
||||
This example demonstrates how to receive messages sent to a multicast group.
|
||||
\image multicastreceiver-example.webp
|
||||
*/
|
||||
|
@ -3,12 +3,14 @@
|
||||
|
||||
/*!
|
||||
\example multicastsender
|
||||
\title Multicast Sender Example
|
||||
\title Multicast Sender
|
||||
\meta category {Networking}
|
||||
\meta tags {network,multicast,ipv6,ipv4,udp}
|
||||
\ingroup examples-network
|
||||
\brief Demonstrates how to send messages to a multicast group.
|
||||
|
||||
This example demonstrates how to send messages to the clients of a
|
||||
multicast group.
|
||||
|
||||
\image multicastsender-example.png
|
||||
\image multicastsender-example.webp
|
||||
*/
|
||||
|
@ -47,7 +47,7 @@ void Receiver::processPendingDatagrams()
|
||||
|
||||
// using QUdpSocket::readDatagram (API since Qt 4)
|
||||
while (udpSocket4.hasPendingDatagrams()) {
|
||||
datagram.resize(int(udpSocket4.pendingDatagramSize()));
|
||||
datagram.resize(qsizetype(udpSocket4.pendingDatagramSize()));
|
||||
udpSocket4.readDatagram(datagram.data(), datagram.size());
|
||||
statusLabel->setText(tr("Received IPv4 datagram: \"%1\"")
|
||||
.arg(datagram.constData()));
|
||||
|
Loading…
Reference in New Issue
Block a user