Java.Nio.Channels.ServerSocketChannel.Accept Method
Accepts a connection to this server-socket channel.

Syntax

[Android.Runtime.Register("accept", "()Ljava/nio/channels/SocketChannel;", "GetAcceptHandler")]
public abstract SocketChannel Accept ()

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Nio.Channels.AsynchronousCloseExceptionif this channel is closed by another thread while this method is in operation.
Java.Nio.Channels.ClosedByInterruptExceptionif 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.
Java.Nio.Channels.ClosedChannelExceptionif this channel is closed.
Java.IO.IOExceptionif another I/O error occurs.
Java.Nio.Channels.NotYetBoundExceptionif the socket has not yet been bound.

Remarks

Accepts a connection to this server-socket channel.

This method returns null when this channel is non-blocking and no connection is available, otherwise it blocks until a new connection is available or an I/O error occurs. The socket channel returned by this method will always be in blocking mode.

This method just executes the same security checks as the accept() method of the Java.Net.ServerSocket class.

[Android Documentation]

Requirements

Namespace: Java.Nio.Channels
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1