Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QUdpSocket broadcast messages with more ip address
Forum Updated to NodeBB v4.3 + New Features

QUdpSocket broadcast messages with more ip address

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 268 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • KaguroK Offline
    KaguroK Offline
    Kaguro
    wrote on last edited by
    #1

    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!

    kshegunovK 1 Reply Last reply
    0
    • KaguroK Kaguro

      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!

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      @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.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved