linux - Usage of SO_REUSEPORT with multicast UDP -
in discussion on so_reuseport, following question posted reddit, there no answer. wondering if stack overflow knows answer.
can tell me how interacts multicast?
i've got application program should listen multicast udp messages, , program may started multiple times on same computer. when message comes it, listening processes should it.
i've noticed on linux, works fine if don't set so_reuseport, , if understand correctly, setting so_reuseport may wrong thing -- don't want udp messages distributed between processes, want processes copy. however, on os x, second execution of program fails find free port unless so_reuseport set.
tl;dr: expected set so_reuseport when using multicast?
with so_reuseport, 1 can bind multiple sockets same port , address. requirement earlier sockets must have set option. thus, if want 2 sockets, sock1 , sock2 bound ot same port (and address), s2 able reuse port/address if both sock1 , sock2 set so_reuseport. respect multicast, if both sock1 , sock2 recievers of same multicast group, both copy of data.
you might find answer helpful: socket options so_reuseaddr , so_reuseport, how differ? mean same across major operating systems?
Comments
Post a Comment