socket.dropSourceSpecificMembership(sourceAddress, groupAddress[, multicastInterface])
指示内核使用 IP_DROP_SOURCE_MEMBERSHIP
套接字选项在给定的 sourceAddress
和 groupAddress
处保留特定于源的多播通道。
当套接字关闭或进程终止时,内核会自动调用此方法,因此大多数应用程序永远没有理由调用此方法。
如果未指定 multicastInterface
,则操作系统将尝试删除所有有效接口上的成员资格。
Instructs the kernel to leave a source-specific multicast channel at the given
sourceAddress
and groupAddress
using the IP_DROP_SOURCE_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.