Table of Contents

Class Socket

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

Constructors

Socket()

public Socket()

Socket(String, int)

public Socket(String arg0, int arg1)

Parameters

arg0 String

String

arg1 int

int

Exceptions

UnknownHostException
IOException

Socket(String, int, InetAddress, int)

public Socket(String arg0, int arg1, InetAddress arg2, int arg3)

Parameters

arg0 String

String

arg1 int

int

arg2 InetAddress

InetAddress

arg3 int

int

Exceptions

IOException

Socket(String, int, bool)

[Obsolete("Deprecated in JVM")]
public Socket(String arg0, int arg1, bool arg2)

Parameters

arg0 String

String

arg1 int

int

arg2 bool

bool

Exceptions

IOException

Socket(InetAddress, int)

public Socket(InetAddress arg0, int arg1)

Parameters

arg0 InetAddress

InetAddress

arg1 int

int

Exceptions

IOException

Socket(InetAddress, int, InetAddress, int)

public Socket(InetAddress arg0, int arg1, InetAddress arg2, int arg3)

Parameters

arg0 InetAddress

InetAddress

arg1 int

int

arg2 InetAddress

InetAddress

arg3 int

int

Exceptions

IOException

Socket(InetAddress, int, bool)

[Obsolete("Deprecated in JVM")]
public Socket(InetAddress arg0, int arg1, bool arg2)

Parameters

arg0 InetAddress

InetAddress

arg1 int

int

arg2 bool

bool

Exceptions

IOException

Socket(Proxy)

public Socket(Proxy arg0)

Parameters

arg0 Proxy

Proxy

Socket(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 Socket(IJVMBridgeBaseInitializer initializer)

Parameters

initializer IJVMBridgeBaseInitializer

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

IOException

Close()

public void Close()

Exceptions

IOException

Connect(SocketAddress)

public void Connect(SocketAddress arg0)

Parameters

arg0 SocketAddress

SocketAddress

Exceptions

IOException

Connect(SocketAddress, int)

public void Connect(SocketAddress arg0, int arg1)

Parameters

arg0 SocketAddress

SocketAddress

arg1 int

int

Exceptions

IOException

CreatePoolableInstance()

HPA initializer for Socket()

public static Socket CreatePoolableInstance()

Returns

Socket

CreatePoolableInstance(String, int)

HPA initializer for Socket(Java.Lang.String arg0, int arg1)

public static Socket CreatePoolableInstance(String arg0, int arg1)

Parameters

arg0 String
arg1 int

Returns

Socket

CreatePoolableInstance(String, int, InetAddress, int)

HPA initializer for Socket(Java.Lang.String arg0, int arg1, Java.Net.InetAddress arg2, int arg3)

public static Socket CreatePoolableInstance(String arg0, int arg1, InetAddress arg2, int arg3)

Parameters

arg0 String
arg1 int
arg2 InetAddress
arg3 int

Returns

Socket

CreatePoolableInstance(String, int, bool)

HPA initializer for Socket(Java.Lang.String arg0, int arg1, bool arg2)

public static Socket CreatePoolableInstance(String arg0, int arg1, bool arg2)

Parameters

arg0 String
arg1 int
arg2 bool

Returns

Socket

CreatePoolableInstance(InetAddress, int)

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

public static Socket CreatePoolableInstance(InetAddress arg0, int arg1)

Parameters

arg0 InetAddress
arg1 int

Returns

Socket

CreatePoolableInstance(InetAddress, int, InetAddress, int)

HPA initializer for Socket(Java.Net.InetAddress arg0, int arg1, Java.Net.InetAddress arg2, int arg3)

public static Socket CreatePoolableInstance(InetAddress arg0, int arg1, InetAddress arg2, int arg3)

Parameters

arg0 InetAddress
arg1 int
arg2 InetAddress
arg3 int

Returns

Socket

CreatePoolableInstance(InetAddress, int, bool)

HPA initializer for Socket(Java.Net.InetAddress arg0, int arg1, bool arg2)

public static Socket CreatePoolableInstance(InetAddress arg0, int arg1, bool arg2)

Parameters

arg0 InetAddress
arg1 int
arg2 bool

Returns

Socket

CreatePoolableInstance(Proxy)

HPA initializer for Socket(Java.Net.Proxy arg0)

public static Socket CreatePoolableInstance(Proxy arg0)

Parameters

arg0 Proxy

Returns

Socket

GetChannel()

public SocketChannel GetChannel()

Returns

SocketChannel

SocketChannel

GetInetAddress()

public InetAddress GetInetAddress()

Returns

InetAddress

InetAddress

GetInputStream()

public InputStream GetInputStream()

Returns

InputStream

InputStream

Exceptions

IOException

GetKeepAlive()

public bool GetKeepAlive()

Returns

bool

bool

Exceptions

SocketException

GetLocalAddress()

public InetAddress GetLocalAddress()

Returns

InetAddress

InetAddress

GetLocalPort()

public int GetLocalPort()

Returns

int

int

GetLocalSocketAddress()

public SocketAddress GetLocalSocketAddress()

Returns

SocketAddress

SocketAddress

GetOOBInline()

public bool GetOOBInline()

Returns

bool

bool

Exceptions

SocketException

GetOption<T>(SocketOption<T>)

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

Parameters

arg0 SocketOption<T>

SocketOption

Returns

T

T

Type Parameters

T

Exceptions

IOException

GetOutputStream()

public OutputStream GetOutputStream()

Returns

OutputStream

OutputStream

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

GetSoLinger()

public int GetSoLinger()

Returns

int

int

Exceptions

SocketException

GetSoTimeout()

public int GetSoTimeout()

Returns

int

int

Exceptions

SocketException

GetTcpNoDelay()

public bool GetTcpNoDelay()

Returns

bool

bool

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

IsInputShutdown()

public bool IsInputShutdown()

Returns

bool

bool

IsOutputShutdown()

public bool IsOutputShutdown()

Returns

bool

bool

SendUrgentData(int)

public void SendUrgentData(int arg0)

Parameters

arg0 int

int

Exceptions

IOException

SetKeepAlive(bool)

public void SetKeepAlive(bool arg0)

Parameters

arg0 bool

bool

Exceptions

SocketException

SetOOBInline(bool)

public void SetOOBInline(bool arg0)

Parameters

arg0 bool

bool

Exceptions

SocketException

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

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

Parameters

arg0 SocketOption<T>

SocketOption

arg1 T

T

Returns

Socket

Socket

Type Parameters

T

Exceptions

IOException

SetPerformancePreferences(int, int, int)

public void SetPerformancePreferences(int arg0, int arg1, int arg2)

Parameters

arg0 int

int

arg1 int

int

arg2 int

int

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

SetSoLinger(bool, int)

public void SetSoLinger(bool arg0, int arg1)

Parameters

arg0 bool

bool

arg1 int

int

Exceptions

SocketException

SetSoTimeout(int)

public void SetSoTimeout(int arg0)

Parameters

arg0 int

int

Exceptions

SocketException

SetSocketImplFactory(SocketImplFactory)

[Obsolete("Deprecated in JVM")]
public static void SetSocketImplFactory(SocketImplFactory arg0)

Parameters

arg0 SocketImplFactory

SocketImplFactory

Exceptions

IOException

SetTcpNoDelay(bool)

public void SetTcpNoDelay(bool arg0)

Parameters

arg0 bool

bool

Exceptions

SocketException

SetTrafficClass(int)

public void SetTrafficClass(int arg0)

Parameters

arg0 int

int

Exceptions

SocketException

ShutdownInput()

public void ShutdownInput()

Exceptions

IOException

ShutdownOutput()

public void ShutdownOutput()

Exceptions

IOException

SupportedOptions()

public Set<SocketOption<object>> SupportedOptions()

Returns

Set<SocketOption<object>>

Set