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 if I would have two sockets then I must create two multicast groups? Or can I joint to multicast group with two different sockets? Another solution would be to make two threads and one socket? Is it safe to use one socket for both send and recv on server and client side?What is the most efficient solution? I can not have delays because it will be in real time...do you have some advice ?