Class AndroidMvpnClientHandler

The HttpClient class provides a base class for sending or receiving the HTTP requests or responses from a URL. It is a supported asynchronous feature of the .NET framework. Xamarin provides the AndroidClientHandler class, which is derived from the HttpClientHandler class. AndroidMvpnClientHandler.cs is a custom HttpClientHandler class. The custom HttpClientHandler class enables tunneling for incoming requests that are using HttpClient for sending HTTP/S requests. Sample code for tunneling HttpClient requests is as follows:

HttpClient httpClient = new HttpClient(new AndroidMvpnClientHandler());
<!--NeedCopy-->
Inheritance
   -> System.Object
       -> AndroidMvpnClientHandler

Namespace: Com.Citrix.Mvpn.Api

Assembly: MvpnSdkLibrary.dll

Syntax:

public class AndroidMvpnClientHandler : AndroidClientHandler
<!--NeedCopy-->

Constructors

AndroidMvpnClientHandler()

Declaration:

public AndroidMvpnClientHandler()
<!--NeedCopy-->

Methods

ConfigureCustomSSLSocketFactory(HttpsURLConnection)

Declaration:

protected override SSLSocketFactory ConfigureCustomSSLSocketFactory(HttpsURLConnection connection)
<!--NeedCopy-->

Parameters:

Type Name Description
Javax.Net.Ssl.HttpsURLConnection connection HTTPS connection to return socket factory.

Returns:

Type Description
Javax.Net.Ssl.SSLSocketFactory Instance of SSLSocketFactory ready to use with the HTTPS connection.

GetJavaProxy(Uri, CancellationToken)

Declaration:

protected override Task<Proxy> GetJavaProxy(Uri destination, CancellationToken cancellationToken)
<!--NeedCopy-->

Parameters:

Type Name Description
System.Uri destination System URI object.
System.Threading.CancellationToken cancellationToken Cancellation token.

Returns:

Type Description
System.Threading.Tasks.Task Instance of Task

GetSSLHostnameVerifier(HttpsURLConnection)

Declaration:

protected override IHostnameVerifier GetSSLHostnameVerifier(HttpsURLConnection connection)
<!--NeedCopy-->

Parameters:

Type Name Description
Javax.Net.Ssl.HttpsURLConnection connection HTTPS connection object.

Returns:

Type Description
Javax.Net.Ssl.IHostnameVerifier Instance of IHostnameVerifier to be used for this HTTPS connection.
Class AndroidMvpnClientHandler