QUdpSocket broadcast messages with more ip address
-
Hi Guys!
In my company we want to receive and send broadcast messages. But we were faced with very strange phenomena (we used the QT example broadcastreciever and sender). If someone has more IP addresses (for virtualmachine etc...) then they didnt get any messages but if some has just one ip address then he could send messages to everyone and recieve from everyone. If we set QHostAddress::Broadcast to 10.0.10.255 (this is our IP range) then everything is working correctly for everyone.
So the question is how does it work? And how we can use the udpsocket broadcast messages in a right way?
Thanks your help! -
Hi Guys!
In my company we want to receive and send broadcast messages. But we were faced with very strange phenomena (we used the QT example broadcastreciever and sender). If someone has more IP addresses (for virtualmachine etc...) then they didnt get any messages but if some has just one ip address then he could send messages to everyone and recieve from everyone. If we set QHostAddress::Broadcast to 10.0.10.255 (this is our IP range) then everything is working correctly for everyone.
So the question is how does it work? And how we can use the udpsocket broadcast messages in a right way?
Thanks your help!@Kaguro said in QUdpSocket broadcast messages with more ip address:
If someone has more IP addresses (for virtualmachine etc...) then they didnt get any messages but if some has just one ip address then he could send messages to everyone and recieve from everyone. If we set QHostAddress::Broadcast to 10.0.10.255 (this is our IP range) then everything is working correctly for everyone.
Sounds like you didn't bind to the correct address on the receiver side.
So the question is how does it work?
Well, you could use a multicast group with UDP, to mix and match the different interfaces you have defined.