Question

I'm creating multicast server/client udp application in C in which server is sending data to multicast group of clients, and if data is not received, clients request for retransmission. I thought to create two sockets on server and client side. On server side one socket for sending multicast and another for receiving replies from clients. And on client side one socket for receiving data and another for reply back to server. What is confusing me is because socket is connected to multicast group...client join on that group with socket. Can I use two sockets and one multicast group or should I create two groups ? What is the most efficient solution? I can not have delays because it will be in real time...do you have some advice ?

Thx

Was it helpful?

Solution

On server side one socket for sending multicast and another for receiving replies from clients.

Definitely not.

And on client side one socket for receiving data and another for reply back to server.

Definitely not.

Peers will always want to respond back to the IP:port the request came from. If you add another port you add an endless configuration difficulty. If you only use one port it's easy. There is no performance or architectural reason to use two ports per process for this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top