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

前端 未结 6 1512
悲哀的现实
悲哀的现实 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:13

    bind to the passive address, i.e. 0.0.0.0 for IPv4 and use ASM or SSM to pull in additional groups, e.g. IP_ADD_MEMBERSHIP as listed.

    You can only bind once.

提交回复
热议问题