ServerSocketChannel.Accept Method

Definition

Accepts a connection made to this channel's socket.

[Android.Runtime.Register("accept", "()Ljava/nio/channels/SocketChannel;", "GetAcceptHandler")]
public abstract Java.Nio.Channels.SocketChannel? Accept ();
[<Android.Runtime.Register("accept", "()Ljava/nio/channels/SocketChannel;", "GetAcceptHandler")>]
abstract member Accept : unit -> Java.Nio.Channels.SocketChannel

Returns

SocketChannel

The socket channel for the new connection, or null if this channel is in non-blocking mode and no connection is available to be accepted

Attributes

Exceptions

if this channel is closed by another thread while this method is in operation.

if another thread interrupts the calling thread while this operation is in progress. The interrupt state of the calling thread is set and the channel is closed.

if this channel is closed.

if another I/O error occurs.

if the socket has not yet been bound.

Remarks

Java documentation for java.nio.channels.ServerSocketChannel.accept().

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.

Applies to