wammder - 9 months ago 60
C Question

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;



I don't understand the utilities of the setsockopt function. I understand that, this function permits to modify the socket in the kernel, and
SOL_SOCKET
is because my modification is about the level of the socket and not of the level of a protocol. I don't understand
SO_REUSEADDR
.

For UDP sockets, setting the SO_REUSEADDR option allows multiple sockets to be open on the same port.