Share via


ServerSocketChannel.Open Method

Definition

Opens a server-socket channel.

[Android.Runtime.Register("open", "()Ljava/nio/channels/ServerSocketChannel;", "")]
public static Java.Nio.Channels.ServerSocketChannel? Open ();
[<Android.Runtime.Register("open", "()Ljava/nio/channels/ServerSocketChannel;", "")>]
static member Open : unit -> Java.Nio.Channels.ServerSocketChannel

Returns

A new socket channel

Attributes

Exceptions

if an I/O error occurs.

Remarks

Opens a server-socket channel.

The new channel is created by invoking the java.nio.channels.spi.SelectorProvider#openServerSocketChannel openServerSocketChannel method of the system-wide default java.nio.channels.spi.SelectorProvider object.

The new channel's socket is initially unbound; it must be bound to a specific address via one of its socket's java.net.ServerSocket#bind(SocketAddress) bind methods before connections can be accepted.

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

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