Table of Contents

Class DatagramSocket

Namespace
Java.Net
Assembly
MASES.Netdroid.dll
public class DatagramSocket : Closeable, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBaseInstance>, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition, ICloseable, IAutoCloseable
Inheritance
DatagramSocket
Implements
Derived
Extension Methods

Constructors

DatagramSocket()

public DatagramSocket()

Exceptions

SocketException

DatagramSocket(SocketAddress)

public DatagramSocket(SocketAddress arg0)

Parameters

arg0 SocketAddress

SocketAddress

Exceptions

SocketException

DatagramSocket(IJVMBridgeBaseInitializer)

Initializer used internally by JCOBridge. Do not use directly.

[Obsolete("This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public DatagramSocket(IJVMBridgeBaseInitializer initializer)

Parameters

initializer IJVMBridgeBaseInitializer

DatagramSocket(int)

public DatagramSocket(int arg0)

Parameters

arg0 int

int

Exceptions

SocketException

DatagramSocket(int, InetAddress)

public DatagramSocket(int arg0, InetAddress arg1)

Parameters

arg0 int

int

arg1 InetAddress

InetAddress

Exceptions

SocketException

Properties

BridgeClassName

Java class name to be instantiated

public override string BridgeClassName { get; }

Property Value

string

IsBridgeAbstract

true if the BridgeClassName is an abstract class, i.e. cannot be created an instance

public override bool IsBridgeAbstract { get; }

Property Value

bool

IsBridgeCloseable

true if the BridgeClassName implements java.lang.AutoCloseable

public override bool IsBridgeCloseable { get; }

Property Value

bool

IsBridgeInterface

true if the BridgeClassName is an interface, i.e. does not have any public constructor

public override bool IsBridgeInterface { get; }

Property Value

bool

IsBridgeStatic

true if the BridgeClassName is a static class, i.e. does not have any public constructor

public override bool IsBridgeStatic { get; }

Property Value

bool

Methods

Bind(SocketAddress)

public void Bind(SocketAddress arg0)

Parameters

arg0 SocketAddress

SocketAddress

Exceptions

SocketException

Close()

public void Close()

Connect(InetAddress, int)

public void Connect(InetAddress arg0, int arg1)

Parameters

arg0 InetAddress

InetAddress

arg1 int

int

Connect(SocketAddress)

public void Connect(SocketAddress arg0)

Parameters

arg0 SocketAddress

SocketAddress

Exceptions

SocketException

CreatePoolableInstance()

HPA initializer for DatagramSocket()

public static DatagramSocket CreatePoolableInstance()

Returns

DatagramSocket

CreatePoolableInstance(SocketAddress)

HPA initializer for DatagramSocket(Java.Net.SocketAddress arg0)

public static DatagramSocket CreatePoolableInstance(SocketAddress arg0)

Parameters

arg0 SocketAddress

Returns

DatagramSocket

CreatePoolableInstance(int)

HPA initializer for DatagramSocket(int arg0)

public static DatagramSocket CreatePoolableInstance(int arg0)

Parameters

arg0 int

Returns

DatagramSocket

CreatePoolableInstance(int, InetAddress)

HPA initializer for DatagramSocket(int arg0, Java.Net.InetAddress arg1)

public static DatagramSocket CreatePoolableInstance(int arg0, InetAddress arg1)

Parameters

arg0 int
arg1 InetAddress

Returns

DatagramSocket

Disconnect()

public void Disconnect()

GetBroadcast()

public bool GetBroadcast()

Returns

bool

bool

Exceptions

SocketException

GetChannel()

public DatagramChannel GetChannel()

Returns

DatagramChannel

DatagramChannel

GetInetAddress()

public InetAddress GetInetAddress()

Returns

InetAddress

InetAddress

GetLocalAddress()

public InetAddress GetLocalAddress()

Returns

InetAddress

InetAddress

GetLocalPort()

public int GetLocalPort()

Returns

int

int

GetLocalSocketAddress()

public SocketAddress GetLocalSocketAddress()

Returns

SocketAddress

SocketAddress

GetOption<T>(SocketOption<T>)

public T GetOption<T>(SocketOption<T> arg0)

Parameters

arg0 SocketOption<T>

SocketOption

Returns

T

T

Type Parameters

T

Exceptions

IOException

GetPort()

public int GetPort()

Returns

int

int

GetReceiveBufferSize()

public int GetReceiveBufferSize()

Returns

int

int

Exceptions

SocketException

GetRemoteSocketAddress()

public SocketAddress GetRemoteSocketAddress()

Returns

SocketAddress

SocketAddress

GetReuseAddress()

public bool GetReuseAddress()

Returns

bool

bool

Exceptions

SocketException

GetSendBufferSize()

public int GetSendBufferSize()

Returns

int

int

Exceptions

SocketException

GetSoTimeout()

public int GetSoTimeout()

Returns

int

int

Exceptions

SocketException

GetTrafficClass()

public int GetTrafficClass()

Returns

int

int

Exceptions

SocketException

IsBound()

public bool IsBound()

Returns

bool

bool

IsClosed()

public bool IsClosed()

Returns

bool

bool

IsConnected()

public bool IsConnected()

Returns

bool

bool

JoinGroup(SocketAddress, NetworkInterface)

public void JoinGroup(SocketAddress arg0, NetworkInterface arg1)

Parameters

arg0 SocketAddress

SocketAddress

arg1 NetworkInterface

NetworkInterface

Exceptions

IOException

LeaveGroup(SocketAddress, NetworkInterface)

public void LeaveGroup(SocketAddress arg0, NetworkInterface arg1)

Parameters

arg0 SocketAddress

SocketAddress

arg1 NetworkInterface

NetworkInterface

Exceptions

IOException

Receive(DatagramPacket)

public void Receive(DatagramPacket arg0)

Parameters

arg0 DatagramPacket

DatagramPacket

Exceptions

IOException

Send(DatagramPacket)

public void Send(DatagramPacket arg0)

Parameters

arg0 DatagramPacket

DatagramPacket

Exceptions

IOException

SetBroadcast(bool)

public void SetBroadcast(bool arg0)

Parameters

arg0 bool

bool

Exceptions

SocketException

SetDatagramSocketImplFactory(DatagramSocketImplFactory)

[Obsolete("Deprecated in JVM")]
public static void SetDatagramSocketImplFactory(DatagramSocketImplFactory arg0)

Parameters

arg0 DatagramSocketImplFactory

DatagramSocketImplFactory

Exceptions

IOException

SetOption<T>(SocketOption<T>, T)

public DatagramSocket SetOption<T>(SocketOption<T> arg0, T arg1)

Parameters

arg0 SocketOption<T>

SocketOption

arg1 T

T

Returns

DatagramSocket

DatagramSocket

Type Parameters

T

Exceptions

IOException

SetReceiveBufferSize(int)

public void SetReceiveBufferSize(int arg0)

Parameters

arg0 int

int

Exceptions

SocketException

SetReuseAddress(bool)

public void SetReuseAddress(bool arg0)

Parameters

arg0 bool

bool

Exceptions

SocketException

SetSendBufferSize(int)

public void SetSendBufferSize(int arg0)

Parameters

arg0 int

int

Exceptions

SocketException

SetSoTimeout(int)

public void SetSoTimeout(int arg0)

Parameters

arg0 int

int

Exceptions

SocketException

SetTrafficClass(int)

public void SetTrafficClass(int arg0)

Parameters

arg0 int

int

Exceptions

SocketException

SupportedOptions()

public Set<SocketOption<object>> SupportedOptions()

Returns

Set<SocketOption<object>>

Set