socket.setMulticastLoopback(flag)


设置或清除 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.】