Java.Net.Socket.Connect Method
Connects this socket to the given remote host address and port specified by the SocketAddress remoteAddr.

Syntax

[Android.Runtime.Register("connect", "(Ljava/net/SocketAddress;)V", "GetConnect_Ljava_net_SocketAddress_Handler")]
public virtual void Connect (SocketAddress remoteAddr)

Parameters

remoteAddr
the address and port of the remote host to connect to.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif the given SocketAddress is invalid or not supported.
Java.IO.IOExceptionif the socket is already connected or an error occurs while connecting.

Remarks

Connects this socket to the given remote host address and port specified by the SocketAddress remoteAddr.

[Android Documentation]

Requirements

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