SSLSocketFactory.IsSecure(Socket) Method

Definition

Checks whether a socket connection is secure.

[Android.Runtime.Register("isSecure", "(Ljava/net/Socket;)Z", "GetIsSecure_Ljava_net_Socket_Handler")]
public virtual bool IsSecure(Java.Net.Socket? sock);
[<Android.Runtime.Register("isSecure", "(Ljava/net/Socket;)Z", "GetIsSecure_Ljava_net_Socket_Handler")>]
abstract member IsSecure : Java.Net.Socket -> bool
override this.IsSecure : Java.Net.Socket -> bool

Parameters

sock
Socket

the connected socket

Returns

true

Implements

Attributes

Exceptions

if the argument is invalid

Remarks

Checks whether a socket connection is secure. This factory creates TLS/SSL socket connections which, by default, are considered secure. <br/> Derived classes may override this method to perform runtime checks, for example based on the cypher suite.

Java documentation for org.apache.http.conn.ssl.SSLSocketFactory.isSecure(java.net.Socket).

Portions of this page are based on work created and shared by the Apache Software Foundation and used under the terms of the Apache License, Version 2.0.

Applies to