(I'm new to network programming, and I am working on C in Linux) I followed Beej's guide for a simple UDP listener-talker and I know how to create a socket and send that to a destination (with calls to getaddrinfo() and socket() using SOCK_DGRAM) See http://beej.us/guide/bgnet/output/html/multipage/clientserver.html#datagram.
In my distributed app, I will need to send a message to multiple peers (reliable multicast). My question is: do I need to create a socket for each of the peers? I'm worried about scalability. Or should I create the socket, use it and destroy it (close it) after each message?
In summary, is there a good way to send a UDP packet to multiple destinations, periodically? Thanks for the help!