Android.Net.SSLCertificateSocketFactory.CreateSocket Method
Creates a new socket which is connected to the remote host specified by the parameters host and port.

Syntax

[Android.Runtime.Register("createSocket", "(Ljava/lang/String;I)Ljava/net/Socket;", "GetCreateSocket_Ljava_lang_String_IHandler")]
public override Java.Net.Socket CreateSocket (string s, int i)

Parameters

host
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.

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 parameters host and port. The socket is bound to any available local address and port.

This method verifies the peer's certificate hostname after connecting (unless created with SSLCertificateSocketFactory.GetInsecure(int, Android.Net.SSLSessionCache)).

[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