I am trying 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));
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
.