Java.Nio.Channels.SocketChannel.Open Method
Creates a socket channel and connects it to a socket address.

Syntax

[Android.Runtime.Register("open", "(Ljava/net/SocketAddress;)Ljava/nio/channels/SocketChannel;", "")]
public static SocketChannel Open (Java.Net.SocketAddress address)

Parameters

address
the socket address to be connected to.

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 executing.
Java.Nio.Channels.ClosedByInterruptExceptionif another thread interrupts the calling thread while this operation is executing. The calling thread will have the interrupt state set and the channel will be closed.
Java.Nio.Channels.UnresolvedAddressExceptionif the address is not resolved.
Java.Nio.Channels.UnsupportedAddressTypeExceptionif the address type is not supported.
Java.IO.IOExceptionif an I/O error occurs.

Remarks

Creates a socket channel and connects it to a socket address.

This method performs a call to open() followed by a call to connect(SocketAddress).

[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