Android.Net.SSLCertificateSocketFactory.CreateSocket Method
Creates a new socket which is connected to the remote host specified by the InetAddress address.

Syntax

[Android.Runtime.Register("createSocket", "(Ljava/net/InetAddress;ILjava/net/InetAddress;I)Ljava/net/Socket;", "GetCreateSocket_Ljava_net_InetAddress_ILjava_net_InetAddress_IHandler")]
[System.Obsolete("deprecated")]
public override Java.Net.Socket CreateSocket (Java.Net.InetAddress inaddr, int i, Java.Net.InetAddress inaddr2, int j)

Parameters

addr
the remote host address the socket has to be connected to.
port
the port number of the remote host at which the socket is connected.
localAddr
the local host address the socket is bound to.
localPort
the port number of the local host at which the socket is bound.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.IOException

Remarks

Creates a new socket which is connected to the remote host specified by the InetAddress address. The socket is bound to the local network interface specified by the InetAddress localHost on port localPort.

Warning: Hostname verification is not performed with this method. You MUST verify the server's identity after connecting the socket to avoid man-in-the-middle attacks.

[Android Documentation]

Requirements

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