socket.setMulticastLoopback(flag)
flag<boolean>
设置或清除 IP_MULTICAST_LOOP 套接字选项。当设置为 true 时,本地接口也会收到多播数据包。
¥Sets or clears the IP_MULTICAST_LOOP socket option. When set to true,
multicast packets will also be received on the local interface.
如果在未绑定的套接字上调用此方法将抛出 EBADF。
¥This method throws EBADF if called on an unbound socket.