November 26th, 2013, 10:15 AM
We are connected to a server that sends udp multicast packets. Whenever a gap is detected we are supposed to send a "PacketRequest" to the server to get the missing packets. The server then sends the missing packets back to us with unicast to the same socket that we get the multicast packets on.
The problem we have is that, if we have several applications on the same machine connected to the same multicast group and port, they will get the same source address. This means that the unicast data that the server is sending back to us, is sent to one of the applications, but it might not be the one that requested the data. Do anyone know how we should set up our socket in order for this to work?
code looks like this:
boost::asio::ip::udp::endpoint endpoint(interface, port);
November 27th, 2013, 09:13 AM
Have the server resend packets on the same multicast ?
If you missed a packet, it's not unreasonable to assume others missed the same packet as well.
If the server is unicasting to you, it can't simultaneously be multicasting to everyone, so it's not going to slow down the server per se.
This does make some assumptions about how the network multicast segments are organized of course, there may be reasons why unicast is really necessary.
November 27th, 2013, 09:22 AM
Originally Posted by OReubens
I am not sure what you mean. The server is sending unicast because it does not want to send duplicate packets to everyone (multicast). Instead it only sends the unicast data to those clients that have made a Request for missing packets (gaps). I think we will solve this issue by requiring one NIC per application. This means that the clients will have different source addresses.
November 28th, 2013, 07:52 AM
I did in fact mean... send the packet again to everyone over multicast.
This isn't an uncommon approach in multicast scenario's that have retransmission needs. The advantage is that if 2 or more clients need the same packet sent again, the server only needs to send each failed packed again once.
The disadvantage is that clients that did not have reception errors will get additional "clutter". Depending on the actual network topology.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!