public class TcpListener extends NetObject implements java.lang.AutoCloseable
.NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Net.Sockets.TcpListener
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Net.Sockets, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
|
static java.lang.String |
assemblyShortName
Assembly name: System.Net.Sockets
|
static java.lang.String |
className
Qualified class name: System.Net.Sockets.TcpListener
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
TcpListener() |
TcpListener(int port) |
TcpListener(IPAddress localaddr,
int port) |
TcpListener(IPEndPoint localEP) |
TcpListener(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Socket |
AcceptSocket() |
TcpClient |
AcceptTcpClient() |
void |
AllowNatTraversal(boolean allowed) |
IAsyncResult |
BeginAcceptSocket(AsyncCallback callback,
NetObject state) |
IAsyncResult |
BeginAcceptTcpClient(AsyncCallback callback,
NetObject state) |
static TcpListener |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into TcpListener, a cast assert is made to check if types are compatible. |
void |
close() |
static TcpListener |
Create(int port) |
void |
Dispose() |
Socket |
EndAcceptSocket(IAsyncResult asyncResult) |
TcpClient |
EndAcceptTcpClient(IAsyncResult asyncResult) |
boolean |
getExclusiveAddressUse() |
java.lang.String |
getJCOAssemblyName()
Returns the reflected Assembly name
|
java.lang.String |
getJCOClassName()
Returns the reflected Class name
|
java.lang.Object |
getJCOInstance()
Returns the instantiated class
|
java.lang.String |
getJCOObjectName()
Returns the reflected Class name used to build the object
|
JCType |
getJCOType()
Returns the instantiated class Type
|
EndPoint |
getLocalEndpoint() |
Socket |
getServer() |
boolean |
Pending() |
void |
setExclusiveAddressUse(boolean ExclusiveAddressUse) |
void |
setJCOInstance(JCObject instance) |
void |
Start() |
void |
Start(int backlog) |
void |
Stop() |
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public TcpListener()
throws java.lang.Throwable
java.lang.Throwablepublic TcpListener(int port)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
CultureNotFoundException,
ObjectDisposedException,
IndexOutOfRangeException,
OutOfMemoryException,
FormatException,
EventSourceException,
SocketException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionCultureNotFoundExceptionObjectDisposedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionSocketExceptionpublic TcpListener(IPAddress localaddr, int port) throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, IndexOutOfRangeException, OutOfMemoryException, ArrayTypeMismatchException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, FormatException, EventSourceException, KeyNotFoundException, ObjectDisposedException, SocketException
java.lang.ThrowablePlatformNotSupportedExceptionNotSupportedExceptionArgumentExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionArrayTypeMismatchExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionFormatExceptionEventSourceExceptionKeyNotFoundExceptionObjectDisposedExceptionSocketExceptionpublic TcpListener(IPEndPoint localEP) throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, IndexOutOfRangeException, OutOfMemoryException, ArrayTypeMismatchException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, FormatException, EventSourceException, KeyNotFoundException, ObjectDisposedException, SocketException
java.lang.ThrowablePlatformNotSupportedExceptionNotSupportedExceptionArgumentExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionArrayTypeMismatchExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionFormatExceptionEventSourceExceptionKeyNotFoundExceptionObjectDisposedExceptionSocketExceptionpublic TcpListener(java.lang.Object instance)
throws java.lang.Throwable
java.lang.Throwablepublic Socket AcceptSocket() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, InvalidOperationException, SocketException, OutOfMemoryException, FormatException, IndexOutOfRangeException, ArrayTypeMismatchException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionObjectDisposedExceptionInvalidOperationExceptionSocketExceptionOutOfMemoryExceptionFormatExceptionIndexOutOfRangeExceptionArrayTypeMismatchExceptionpublic TcpClient AcceptTcpClient() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, InvalidOperationException, SocketException, OutOfMemoryException, FormatException, IndexOutOfRangeException, ArrayTypeMismatchException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionObjectDisposedExceptionInvalidOperationExceptionSocketExceptionOutOfMemoryExceptionFormatExceptionIndexOutOfRangeExceptionArrayTypeMismatchExceptionpublic void AllowNatTraversal(boolean allowed)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
PlatformNotSupportedException,
NotSupportedException,
ArgumentOutOfRangeException,
CultureNotFoundException,
ObjectDisposedException,
InvalidOperationException,
OutOfMemoryException,
SocketException
public IAsyncResult BeginAcceptSocket(AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, NullReferenceException, NotSupportedException, ObjectDisposedException, ArrayTypeMismatchException, SocketException, EventSourceException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionInvalidOperationExceptionNullReferenceExceptionNotSupportedExceptionObjectDisposedExceptionArrayTypeMismatchExceptionSocketExceptionEventSourceExceptionpublic IAsyncResult BeginAcceptTcpClient(AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, NullReferenceException, NotSupportedException, ArrayTypeMismatchException, SocketException, EventSourceException
public static TcpListener cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into TcpListener, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedTcpListener instancejava.lang.Throwable - in case of error during cast operationpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic static TcpListener Create(int port) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, CultureNotFoundException, ObjectDisposedException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, SocketException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionCultureNotFoundExceptionObjectDisposedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionSocketExceptionpublic void Dispose()
throws java.lang.Throwable,
ArgumentNullException,
PlatformNotSupportedException,
OutOfMemoryException,
ArgumentException,
InvalidOperationException,
FormatException,
ArgumentOutOfRangeException,
EventSourceException,
NotSupportedException,
ObjectDisposedException,
ArrayTypeMismatchException,
NullReferenceException
java.lang.ThrowableArgumentNullExceptionPlatformNotSupportedExceptionOutOfMemoryExceptionArgumentExceptionInvalidOperationExceptionFormatExceptionArgumentOutOfRangeExceptionEventSourceExceptionNotSupportedExceptionObjectDisposedExceptionArrayTypeMismatchExceptionNullReferenceExceptionpublic Socket EndAcceptSocket(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, TaskSchedulerException, TaskCanceledException, AggregateException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionTaskSchedulerExceptionTaskCanceledExceptionAggregateExceptionpublic TcpClient EndAcceptTcpClient(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, TaskSchedulerException, TaskCanceledException, AggregateException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionTaskSchedulerExceptionTaskCanceledExceptionAggregateExceptionpublic boolean getExclusiveAddressUse()
throws java.lang.Throwable,
PlatformNotSupportedException,
ObjectDisposedException,
ArgumentNullException,
OutOfMemoryException,
ArgumentOutOfRangeException,
ArgumentException,
FormatException,
InvalidOperationException,
EventSourceException,
SocketException
public java.lang.String getJCOAssemblyName()
IJCOBridgeReflectedgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectString representing the Fullname of reflected Assemblypublic java.lang.String getJCOClassName()
IJCOBridgeReflectedgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectString representing the Fullname of reflected Classpublic java.lang.Object getJCOInstance()
IJCOBridgeReflectedgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectObject representing the CLR instance of the instantiated Classpublic java.lang.String getJCOObjectName()
IJCOBridgeReflectedgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectString representing the name used to allocated the object
in CLR contextpublic JCType getJCOType()
IJCOBridgeReflectedgetJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectJCType representing the CLR Type of the instantiated Classpublic EndPoint getLocalEndpoint() throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, ObjectDisposedException, SocketException, OutOfMemoryException, InvalidOperationException, FormatException, EventSourceException, ArgumentOutOfRangeException, ArrayTypeMismatchException
public Socket getServer() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, OutOfMemoryException, NotSupportedException, InvalidOperationException, FormatException, EventSourceException, SocketException, ObjectDisposedException
public boolean Pending()
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
PlatformNotSupportedException,
NotSupportedException,
ArgumentOutOfRangeException,
CultureNotFoundException,
ObjectDisposedException,
InvalidOperationException,
IndexOutOfRangeException,
OutOfMemoryException,
FormatException,
EventSourceException,
SocketException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionObjectDisposedExceptionInvalidOperationExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionSocketExceptionpublic void setExclusiveAddressUse(boolean ExclusiveAddressUse)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
PlatformNotSupportedException,
NotSupportedException,
ArgumentOutOfRangeException,
CultureNotFoundException,
ObjectDisposedException,
InvalidOperationException,
OutOfMemoryException,
FormatException,
EventSourceException,
SocketException,
ArrayTypeMismatchException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionObjectDisposedExceptionInvalidOperationExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionSocketExceptionArrayTypeMismatchExceptionpublic void setJCOInstance(JCObject instance)
setJCOInstance in class NetObjectpublic void Start()
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
FormatException,
OutOfMemoryException,
EventSourceException,
SocketException,
NullReferenceException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionEventSourceExceptionSocketExceptionNullReferenceExceptionpublic void Start(int backlog)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException,
OutOfMemoryException,
FormatException,
EventSourceException,
SocketException,
NullReferenceException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionSocketExceptionNullReferenceExceptionpublic void Stop()
throws java.lang.Throwable,
NotSupportedException,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
IndexOutOfRangeException,
OutOfMemoryException,
ArgumentOutOfRangeException,
InvalidOperationException,
FormatException,
EventSourceException,
ObjectDisposedException,
ArrayTypeMismatchException
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionFormatExceptionEventSourceExceptionObjectDisposedExceptionArrayTypeMismatchException