c api socket SO_REUSEADDR -


i try understand multicast code, , don't understand utilities of 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 utilities of setsockopt function. understand that, function permits modify socket in kernel, , sol_socket because modification level of socket , not of level of protocol. don't understand so_reuseaddr.

for udp sockets, setting so_reuseaddr option allows multiple sockets open on same port.

if sockets joined multicast group, multicast packet coming in group , port delivered sockets open on port.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -