Condividi tramite


MulticastSocket.LeaveGroup Method

Definition

Overloads

LeaveGroup(SocketAddress, NetworkInterface)

Leave a multicast group on a specified local interface.

LeaveGroup(InetAddress)

Leave a multicast group.

LeaveGroup(SocketAddress, NetworkInterface)

Leave a multicast group on a specified local interface.

[Android.Runtime.Register("leaveGroup", "(Ljava/net/SocketAddress;Ljava/net/NetworkInterface;)V", "GetLeaveGroup_Ljava_net_SocketAddress_Ljava_net_NetworkInterface_Handler")]
public virtual void LeaveGroup (Java.Net.SocketAddress? mcastaddr, Java.Net.NetworkInterface? netIf);
[<Android.Runtime.Register("leaveGroup", "(Ljava/net/SocketAddress;Ljava/net/NetworkInterface;)V", "GetLeaveGroup_Ljava_net_SocketAddress_Ljava_net_NetworkInterface_Handler")>]
abstract member LeaveGroup : Java.Net.SocketAddress * Java.Net.NetworkInterface -> unit
override this.LeaveGroup : Java.Net.SocketAddress * Java.Net.NetworkInterface -> unit

Parameters

mcastaddr
SocketAddress

is the multicast address to leave

netIf
NetworkInterface

specifies the local interface or null to defer to the interface set by MulticastSocket#setInterface(InetAddress) or MulticastSocket#setNetworkInterface(NetworkInterface)

Attributes

Exceptions

if the specified group address is not a multicast address.

if groupAddress is null.

Remarks

Leave a multicast group on a specified local interface.

If there is a security manager, this method first calls its checkMulticast method with the mcastaddr argument as its argument.

Added in 1.4.

Java documentation for java.net.MulticastSocket.leaveGroup(java.net.SocketAddress, java.net.NetworkInterface).

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

LeaveGroup(InetAddress)

Leave a multicast group.

[Android.Runtime.Register("leaveGroup", "(Ljava/net/InetAddress;)V", "GetLeaveGroup_Ljava_net_InetAddress_Handler")]
public virtual void LeaveGroup (Java.Net.InetAddress? mcastaddr);
[<Android.Runtime.Register("leaveGroup", "(Ljava/net/InetAddress;)V", "GetLeaveGroup_Ljava_net_InetAddress_Handler")>]
abstract member LeaveGroup : Java.Net.InetAddress -> unit
override this.LeaveGroup : Java.Net.InetAddress -> unit

Parameters

mcastaddr
InetAddress

is the multicast address to leave

Attributes

Exceptions

if groupAddr is null.

if the specified group address is not a multicast address.

Remarks

Leave a multicast group. Its behavior may be affected by setInterface or setNetworkInterface.

If there is a security manager, this method first calls its checkMulticast method with the mcastaddr argument as its argument.

Java documentation for java.net.MulticastSocket.leaveGroup(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