SSLSocket SSLSocket Class

Definition

The extension of Socket providing secure protocols like SSL (Secure Sockets Layer) or TLS (Transport Layer Security).

[Android.Runtime.Register("javax/net/ssl/SSLSocket", ApiSince=1, DoNotGenerateAcw=true)]
public abstract class SSLSocket : Java.Net.Socket
type SSLSocket = class
    inherit Socket
Inheritance
Attributes

Remarks

Android platform documentation

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.

Constructors

SSLSocket() SSLSocket()

Only to be used by subclasses.

SSLSocket(InetAddress, Int32) SSLSocket(InetAddress, Int32)

Only to be used by subclasses.

SSLSocket(InetAddress, Int32, InetAddress, Int32) SSLSocket(InetAddress, Int32, InetAddress, Int32)

Only to be used by subclasses.

SSLSocket(IntPtr, JniHandleOwnership) SSLSocket(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

SSLSocket(String, Int32) SSLSocket(String, Int32)

Only to be used by subclasses.

SSLSocket(String, Int32, InetAddress, Int32) SSLSocket(String, Int32, InetAddress, Int32)

Only to be used by subclasses.

Properties

Channel Channel

Returns this socket's SocketChannel, if one exists.

(Inherited from Socket)
Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
EnableSessionCreation EnableSessionCreation

Returns whether new SSL sessions may be created by this socket or if existing sessions must be reused.

Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
HandshakeSession HandshakeSession
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
InetAddress InetAddress

Returns the IP address of the target host this socket is connected to, or null if this socket is not yet connected.

(Inherited from Socket)
InputStream InputStream

Returns an input stream to read data from this socket.

(Inherited from Socket)
IsBound IsBound

Returns whether this socket is bound to a local address and port.

(Inherited from Socket)
IsClosed IsClosed

Returns whether this socket is closed.

(Inherited from Socket)
IsConnected IsConnected

Returns whether this socket is connected to a remote host.

(Inherited from Socket)
IsInputShutdown IsInputShutdown

Returns whether the incoming channel of the socket has already been closed.

(Inherited from Socket)
IsOutputShutdown IsOutputShutdown

Returns whether the outgoing channel of the socket has already been closed.

(Inherited from Socket)
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
KeepAlive KeepAlive

Returns this socket's SoKeepalive setting.

(Inherited from Socket)
LocalAddress LocalAddress

Returns the local IP address this socket is bound to, or an address for which IsAnyLocalAddress returns true if the socket is closed or unbound.

(Inherited from Socket)
LocalPort LocalPort

Returns the local port this socket is bound to, or -1 if the socket is unbound.

(Inherited from Socket)
LocalSocketAddress LocalSocketAddress

Returns the local address and port of this socket as a SocketAddress or null if the socket has never been bound.

(Inherited from Socket)
NeedClientAuth NeedClientAuth

Returns true if the server socket should require client authentication.

OOBInline OOBInline

Returns this socket's SoOobinline setting.

(Inherited from Socket)
OutputStream OutputStream

Returns an output stream to write data into this socket.

(Inherited from Socket)
PeerReference PeerReference Inherited from Object
Port Port

Returns the port number of the target host this socket is connected to, or 0 if this socket is not yet connected.

(Inherited from Socket)
ReceiveBufferSize ReceiveBufferSize

Returns this socket's SoRcvbuf.

(Inherited from Socket)
RemoteSocketAddress RemoteSocketAddress

Returns the remote address and port of this socket as a SocketAddress or null if the socket is not connected.

(Inherited from Socket)
ReuseAddress ReuseAddress

Returns this socket's SoReuseaddr setting.

(Inherited from Socket)
SendBufferSize SendBufferSize

Returns this socket's SoSndbuf.

(Inherited from Socket)
Session Session

Returns the SSLSession for this connection.

SoLinger SoLinger

Returns this socket's SoLinger timeout in seconds, or -1 for no linger (i.e.

(Inherited from Socket)
SoTimeout SoTimeout

Returns this socket's SoTimeout.

(Inherited from Socket)
SSLParameters SSLParameters

Returns a new SSLParameters based on this SSLSocket's current cipher suites, protocols, and client authentication settings.

TcpNoDelay TcpNoDelay

Returns this socket's SocketOptions#TCP_NODELAY setting.

(Inherited from Socket)
ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

TrafficClass TrafficClass

Returns this socket's setting.

(Inherited from Socket)
UseClientMode UseClientMode

Returns true if this connection will act in client mode when handshaking.

WantClientAuth WantClientAuth

Returns true if the server should request client authentication.

Methods

AddHandshakeCompletedListener(IHandshakeCompletedListener) AddHandshakeCompletedListener(IHandshakeCompletedListener)

Registers the specified listener to receive notification on completion of a handshake on this connection.

Bind(SocketAddress) Bind(SocketAddress)

Binds this socket to the given local host address and port specified by the SocketAddress localAddr.

(Inherited from Socket)
Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
Close() Close()

Closes the socket.

(Inherited from Socket)
Connect(SocketAddress) Connect(SocketAddress)

Connects this socket to the given remote host address and port specified by the SocketAddress remoteAddr.

(Inherited from Socket)
Connect(SocketAddress, Int32) Connect(SocketAddress, Int32)

Connects this socket to the given remote host address and port specified by the SocketAddress remoteAddr with the specified timeout.

(Inherited from Socket)
ConnectAsync(SocketAddress) ConnectAsync(SocketAddress) Inherited from Socket
ConnectAsync(SocketAddress, Int32) ConnectAsync(SocketAddress, Int32) Inherited from Socket
Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetEnabledCipherSuites() GetEnabledCipherSuites()

Returns the names of the enabled cipher suites.

GetEnabledProtocols() GetEnabledProtocols()

Returns the names of the enabled protocols.

GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetSupportedCipherSuites() GetSupportedCipherSuites()

Returns the names of the supported cipher suites.

GetSupportedProtocols() GetSupportedProtocols()

Returns the names of the supported protocols.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
RemoveHandshakeCompletedListener(IHandshakeCompletedListener) RemoveHandshakeCompletedListener(IHandshakeCompletedListener)

Removes the specified handshake completion listener.

SendUrgentData(Int32) SendUrgentData(Int32)

Sends the given single byte data which is represented by the lowest octet of value as "TCP urgent data".

(Inherited from Socket)
SendUrgentDataAsync(Int32) SendUrgentDataAsync(Int32) Inherited from Socket
SetEnabledCipherSuites(String[]) SetEnabledCipherSuites(String[])

Sets the names of the cipher suites to be enabled.

SetEnabledProtocols(String[]) SetEnabledProtocols(String[])

Sets the names of the protocols to be enabled.

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetPerformancePreferences(Int32, Int32, Int32) SetPerformancePreferences(Int32, Int32, Int32)

Sets performance preferences for connectionTime, latency and bandwidth.

(Inherited from Socket)
SetSoLinger(Boolean, Int32) SetSoLinger(Boolean, Int32)

Sets this socket's SoLinger timeout in seconds.

(Inherited from Socket)
ShutdownInput() ShutdownInput()

Closes the input stream of this socket.

(Inherited from Socket)
ShutdownOutput() ShutdownOutput()

Closes the output stream of this socket.

(Inherited from Socket)
StartHandshake() StartHandshake()

Starts a new SSL handshake on this connection.

ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to