次の方法で共有


MembershipKey.Block(InetAddress) Method

Definition

Block multicast datagrams from the given source address.

[Android.Runtime.Register("block", "(Ljava/net/InetAddress;)Ljava/nio/channels/MembershipKey;", "GetBlock_Ljava_net_InetAddress_Handler", ApiSince=26)]
public abstract Java.Nio.Channels.MembershipKey? Block (Java.Net.InetAddress? source);
[<Android.Runtime.Register("block", "(Ljava/net/InetAddress;)Ljava/nio/channels/MembershipKey;", "GetBlock_Ljava_net_InetAddress_Handler", ApiSince=26)>]
abstract member Block : Java.Net.InetAddress -> Java.Nio.Channels.MembershipKey

Parameters

source
InetAddress

The source address to block

Returns

This membership key

Attributes

Remarks

Block multicast datagrams from the given source address.

If this membership key is not source-specific, and the underlying operating system supports source filtering, then this method blocks multicast datagrams from the given source address. If the given source address is already blocked then this method has no effect. After a source address is blocked it may still be possible to receive datagrams from that source. This can arise when datagrams are waiting to be received in the socket's receive buffer.

Java documentation for java.nio.channels.MembershipKey.block(java.net.InetAddress).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to