Subscribing to multiple multicast groups on one socket (Linux, C)

前端 未结 6 1518
悲哀的现实
悲哀的现实 2020-12-31 15:29

Is it possible to receive data from more than one multicast group on a single socket?

For example:

void AddGroup(int sock,
              const char*          


        
6条回答
  •  既然无缘
    2020-12-31 16:02

    You can join as many multicast groups as you like, using the appropriate setsockopt() call with the IP_ADD_MEMBERSHIP option, rather than bind().

提交回复
热议问题