Sending UDP broadcast, receiving multiple messages

后端 未结 4 639
借酒劲吻你
借酒劲吻你 2020-11-30 22:52

I\'ve got 2 programs, 1 for sending an UDP broadcast message and 1 that is listening for this broadcast. My problem is that sometimes when I send a broadcast, the receiver r

4条回答
  •  再見小時候
    2020-11-30 23:01

    Keep in mind that (1) UDP packets are VERY reliable for all clients on the same router, and (2) packet duplication can occur when more than one path is available from the server to the client.

    I had this problem on a VM, and it was solved by a network guru smarter than me who added a virtual NIC to the VM and had me run "route delete" and "route add" commands.

    Specifically (on Windows 10 VM), if the new virtual NIC is 10.10.10.10: route delete 224.0.0.0 mask 240.0.0.0 route add 224.0.0.0 mask 240.0.0.0 10.10.10.10

提交回复
热议问题