如标题

解决方案 »

  1.   

    就是给绑定的地址结构付多播的组地址,原来付的是本地地址INADDR_ANY之类的吗
      

  2.   

    多播地址不用绑定,而是要加入使用setsockopt()加入多播组具体参考Windows网络编程
      

  3.   

    I paste part of rfc2133
    here: ……  The argument type of both of these options is the ipv6_mreq   structure, defined as:        #include <netinet/in.h>        struct ipv6_mreq {           struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */           unsigned int    ipv6mr_interface; /* interface index */       };    Note that to receive multicast datagrams a process must join the   multicast group and bind the UDP port to which datagrams will be   sent.  Some processes also bind the multicast group address to the   socket, in addition to the port, to prevent other datagrams destined   to that same port from being delivered to the socket.