Qt 6.11 is out! See what's new in the release
blog
Qt Multicast and Broadcast
General and Desktop
1
Posts
1
Posters
639
Views
1
Watching
-
In my code,receive two kinds of data broadcast and multicast.If using multicast, broadcast data sent to bind port, multicast will receive.I don't know Why?I don't want to receive the broadcast data.
Someone encountered this problem?
@
if (doMulticast){m_recvRawSock.bind(Port, QUdpSocket::ShareAddress); m_recvRawSock.joinMulticastGroup(QHostAddress(groupAddress)); connect(&m_recvRawSock,SIGNAL(readyRead()),this,SLOT(process()));}
else {m_recvRawSock.bind(QHostAddress::Any,Port); connect(&m_recvRawSock,SIGNAL(readyRead()),this,SLOT(process()));}@