Table of Contents

Class DatagramSocket

Namespace
Java.Net
Assembly
MASES.Netdroid.dll
public class DatagramSocket : Closeable, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition, ICloseable, IAutoCloseable
Inheritance
JVMBridgeBase
JVMBridgeBase<AutoCloseable>
DatagramSocket
Implements
IJVMBridgeCore
IJVMBridgeBaseStatic
IJVMBridgeBase
IJVMBridgeDefinition
Derived
Inherited Members
JVMBridgeBase<AutoCloseable>.IsAssignableFrom(IJavaType)
JVMBridgeBase<AutoCloseable>.IsAssignableFrom<T>()
JVMBridgeBase<AutoCloseable>.Execute<T>(params T[])
JVMBridgeBase<AutoCloseable>.DynBridgeClazz
JVMBridgeBase<AutoCloseable>.BridgeClazz
JVMBridgeBase.RuntimeClassNameOf<T>()
JVMBridgeBase.ClassNameOf<T>()
JVMBridgeBase.ClassOf<T>()
JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)
JVMBridgeBase.MonitorEnter()
JVMBridgeBase.MonitorExit()
JVMBridgeBase.IsInstanceOf(IJavaType)
JVMBridgeBase.IsInstanceOf<T>()
JVMBridgeBase.RuntimeIsInstanceOf<T>()
JVMBridgeBase.CastTo<TNewClass>()
JVMBridgeBase.CastDirect<TNewClass>()
JVMBridgeBase.Dispose()
JVMBridgeBase.ToString()
JVMBridgeBase.GetHashCode()
JVMBridgeBase.Notify()
JVMBridgeBase.NotifyAll()
JVMBridgeBase.Wait()
JVMBridgeBase.DynBridgeInstance
JVMBridgeBase.BridgeInstance
JVMBridgeBase.IsBridgeListener
Extension Methods

Constructors

DatagramSocket()

Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge

public DatagramSocket()

DatagramSocket(SocketAddress)

public DatagramSocket(SocketAddress arg0)

Parameters

arg0 SocketAddress

SocketAddress

Exceptions

SocketException

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

DatagramSocket(params object[])

Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class

public DatagramSocket(params object[] args)

Parameters

args object[]

Properties

BridgeClassName

public override string BridgeClassName { get; }

Property Value

string

IsBridgeAbstract

public override bool IsBridgeAbstract { get; }

Property Value

bool

IsBridgeCloseable

public override bool IsBridgeCloseable { get; }

Property Value

bool

IsBridgeInterface

public override bool IsBridgeInterface { get; }

Property Value

bool

IsBridgeStatic

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

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]
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