Closed gaurang-lakesidetrading closed 2 years ago
a) If the subscribed receiver is closed/destructed, the subscribed fd will be closed and automatically drop membership. b) Yes, if you are receiving from multiple addresses, you need to init multpile receivers and poll them all.
Got it, thanks. So if I wanted to rejoin a mcast group, i would just create a new receiver that subscribed to that group again.
Or you can close a receiver to unsubscribe the group, and later re-init it to join again.
Also note that UdpReiever is not copyable (although not prohibited for now). So if you are using vector to hold the objects, remember to call reserve()
so reallocation and copy can be avoided.
Thank you for the tips!
First of all, thanks for the project - I've been looking for an opensource ef_vi implementation to use!
I had a couple of questions: a) Is there an equivalent to the unix raw sockets IP_DROP_MEMBERSHIP to leave a multicast group so that the nic/application do not receive the data at all? b) If I need to initialize multiple UDP sockets receiving multicast data, would the usage pattern basically be (given the reads are non blocking):