I try to understand a multicast code, and I don't understand the utilities of a little part :
int fd_socket = socket(AF_INET, SOCK_DGRAM, 0);
u_int yes = 1;
setsockopt(fd_socket, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));
For UDP sockets, setting the
SO_REUSEADDR option allows multiple sockets to be open on the same port.
If those sockets are also joined to a multicast group, any multicast packet coming in to that group and port will be delivered to all sockets open on that port.