MulticastSocket Class

Definition

The multicast datagram socket class is useful for sending and receiving IP multicast packets.

[Android.Runtime.Register("java/net/MulticastSocket", DoNotGenerateAcw=true)]
public class MulticastSocket : Java.Net.DatagramSocket
[<Android.Runtime.Register("java/net/MulticastSocket", DoNotGenerateAcw=true)>]
type MulticastSocket = class
    inherit DatagramSocket
Inheritance
MulticastSocket
Attributes

Remarks

Java documentation for java.net.MulticastSocket.

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.

Constructors

MulticastSocket()

Create a multicast socket.

MulticastSocket(Int32)

Create a multicast socket and bind it to a specific port.

MulticastSocket(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

MulticastSocket(SocketAddress)

Create a MulticastSocket bound to the specified socket address.

Properties

Broadcast

Tests if SO_BROADCAST is enabled. -or- Enable/disable SO_BROADCAST.

(Inherited from DatagramSocket)
Channel

Returns the unique java.nio.channels.DatagramChannel object associated with this datagram socket, if any.

(Inherited from DatagramSocket)
Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
InetAddress

Returns the address to which this socket is connected.

(Inherited from DatagramSocket)
Interface

Retrieve the address of the network interface used for multicast packets. -or- Set the multicast network interface used by methods whose behavior would be affected by the value of the network interface.

IsBound

Returns the binding state of the socket.

(Inherited from DatagramSocket)
IsClosed

Returns whether the socket is closed or not.

(Inherited from DatagramSocket)
IsConnected

Returns the connection state of the socket.

(Inherited from DatagramSocket)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
LocalAddress

Gets the local address to which the socket is bound.

(Inherited from DatagramSocket)
LocalPort

Returns the port number on the local host to which this socket is bound.

(Inherited from DatagramSocket)
LocalSocketAddress

Returns the address of the endpoint this socket is bound to.

(Inherited from DatagramSocket)
LoopbackMode

Get the setting for local loopback of multicast datagrams. -or- Disable/Enable local loopback of multicast datagrams The option is used by the platform's networking code as a hint for setting whether multicast data will be looped back to the local socket.

NetworkInterface

Get the multicast network interface set. -or- Specify the network interface for outgoing multicast datagrams sent on this socket.

PeerReference (Inherited from Object)
Port

Returns the port number to which this socket is connected.

(Inherited from DatagramSocket)
ReceiveBufferSize

Get value of the SO_RCVBUF option for this DatagramSocket, that is the buffer size used by the platform for input on this DatagramSocket. -or- Sets the SO_RCVBUF option to the specified value for this DatagramSocket.

(Inherited from DatagramSocket)
RemoteSocketAddress

Returns the address of the endpoint this socket is connected to, or null if it is unconnected.

(Inherited from DatagramSocket)
ReuseAddress

Tests if SO_REUSEADDR is enabled. -or- Enable/disable the SO_REUSEADDR socket option.

(Inherited from DatagramSocket)
SendBufferSize

Get value of the SO_SNDBUF option for this DatagramSocket, that is the buffer size used by the platform for output on this DatagramSocket. -or- Sets the SO_SNDBUF option to the specified value for this DatagramSocket.

(Inherited from DatagramSocket)
SoTimeout

Retrieve setting for SO_TIMEOUT. -or- Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.

(Inherited from DatagramSocket)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

TimeToLive

Get the default time-to-live for multicast packets sent out on the socket. -or- Set the default time-to-live for multicast packets sent out on this MulticastSocket in order to control the scope of the multicasts.

TrafficClass

Gets traffic class or type-of-service in the IP datagram header for packets sent from this DatagramSocket. -or- Sets traffic class or type-of-service octet in the IP datagram header for datagrams sent from this DatagramSocket.

(Inherited from DatagramSocket)
TTL
Obsolete.

Get the default time-to-live for multicast packets sent out on the socket. -or- Set the default time-to-live for multicast packets sent out on this MulticastSocket in order to control the scope of the multicasts.

Methods

Bind(SocketAddress)

Binds this DatagramSocket to a specific address and port.

(Inherited from DatagramSocket)
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Close()

Closes this datagram socket.

(Inherited from DatagramSocket)
Connect(InetAddress, Int32)

Connects the socket to a remote address for this socket.

(Inherited from DatagramSocket)
Connect(SocketAddress)

Connects this socket to a remote socket address (IP address + port number).

(Inherited from DatagramSocket)
ConnectAsync(InetAddress, Int32) (Inherited from DatagramSocket)
ConnectAsync(SocketAddress) (Inherited from DatagramSocket)
Disconnect()

Disconnects the socket.

(Inherited from DatagramSocket)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
JoinGroup(InetAddress)

Joins a multicast group.

JoinGroup(SocketAddress, NetworkInterface)

Joins the specified multicast group at the specified interface.

LeaveGroup(InetAddress)

Leave a multicast group.

LeaveGroup(SocketAddress, NetworkInterface)

Leave a multicast group on a specified local interface.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Receive(DatagramPacket)

Receives a datagram packet from this socket.

(Inherited from DatagramSocket)
ReceiveAsync(DatagramPacket) (Inherited from DatagramSocket)
Send(DatagramPacket)

Sends a datagram packet from this socket.

(Inherited from DatagramSocket)
Send(DatagramPacket, SByte)
Obsolete.

Sends a datagram packet to the destination, with a TTL (time- to-live) other than the default for the socket.

SendAsync(DatagramPacket) (Inherited from DatagramSocket)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to