socket.dropMembership(multicastAddress[, multicastInterface])
指示内核使用 IP_DROP_MEMBERSHIP
套接字选项离开 multicastAddress
处的多播组。
当套接字关闭或进程终止时,内核会自动调用此方法,因此大多数应用程序永远没有理由调用此方法。
如果未指定 multicastInterface
,则操作系统将尝试删除所有有效接口上的成员资格。
Instructs the kernel to leave a multicast group at multicastAddress
using the
IP_DROP_MEMBERSHIP
socket option. This method is automatically called by the
kernel when the socket is closed or the process terminates, so most apps will
never have reason to call this.
If multicastInterface
is not specified, the operating system will attempt to
drop membership on all valid interfaces.