socket.setMulticastLoopback(flag)


设置或清除 IP_MULTICAST_LOOP 套接字选项。 当设置为 true 时,本地接口也会收到多播数据包。

如果在未绑定的套接字上调用此方法将抛出 EBADF

Sets or clears the IP_MULTICAST_LOOP socket option. When set to true, multicast packets will also be received on the local interface.

This method throws EBADF if called on an unbound socket.