Android.Net.SSLCertificateSocketFactory.CreateSocket Method
Creates an SSLSocket over the specified socket that is connected to the specified host at the specified port.

Syntax

[Android.Runtime.Register("createSocket", "(Ljava/net/Socket;Ljava/lang/String;IZ)Ljava/net/Socket;", "GetCreateSocket_Ljava_net_Socket_Ljava_lang_String_IZHandler")]
public override Java.Net.Socket CreateSocket (Java.Net.Socket socket, string s, int i, bool flag)

Parameters

k
the socket.
host
the host.
port
the port number.
close
true if socket s should be closed when the created socket is closed, false if the socket s should be left open.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.IOException

Remarks

Creates an SSLSocket over the specified socket that is connected to the specified host at the specified 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