Partager via


SSLCertificateSocketFactory.GetHttpSocketFactory Method

Definition

Returns a socket factory (also named SSLSocketFactory, but in a different namespace) for use with the Apache HTTP stack.

[Android.Runtime.Register("getHttpSocketFactory", "(ILandroid/net/SSLSessionCache;)Lorg/apache/http/conn/ssl/SSLSocketFactory;", "")]
public static Org.Apache.Http.Conn.Ssl.SSLSocketFactory? GetHttpSocketFactory (int handshakeTimeoutMillis, Android.Net.SSLSessionCache? cache);
[<Android.Runtime.Register("getHttpSocketFactory", "(ILandroid/net/SSLSessionCache;)Lorg/apache/http/conn/ssl/SSLSocketFactory;", "")>]
static member GetHttpSocketFactory : int * Android.Net.SSLSessionCache -> Org.Apache.Http.Conn.Ssl.SSLSocketFactory

Parameters

handshakeTimeoutMillis
Int32

to use for SSL connection handshake, or 0 for none. The socket timeout is reset to 0 after the handshake.

cache
SSLSessionCache

The SSLSessionCache to use, or null for no cache.

Returns

a new SocketFactory with the specified parameters

Attributes

Remarks

Returns a socket factory (also named SSLSocketFactory, but in a different namespace) for use with the Apache HTTP stack.

This member is deprecated. Use #getDefault() along with a javax.net.ssl.HttpsURLConnection instead. The Apache HTTP client is no longer maintained and may be removed in a future release. Please visit this webpage for further details.

Java documentation for android.net.SSLCertificateSocketFactory.getHttpSocketFactory(int, android.net.SSLSessionCache).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to