SSLSocket classes.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final List | |
| private String | peerHostname
The peer's DNS hostname if it was supplied during creation. |
| private final PeerInfoProvider | |
| private final int | peerPort
The peer's port if it was supplied during creation. |
| private int | readTimeoutMilliseconds
Local cache of timeout to avoid getsockopt on every read and write for non-wrapped sockets. |
| pack-priv final Socket |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv | |
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | addHandshakeCompletedListener(HandshakeCompletedListener
the HandShake Completed event listener listener)Implements abstract javax. |
| public void | bind(SocketAddress
the bindpoint)SocketAddress to bind toOverrides java. |
| pack-priv final void | |
| public void | |
| public final void | connect(SocketAddress
the endpoint)SocketAddressOverrides java. |
| public final void | connect(SocketAddress
the endpoint, int SocketAddressthe timeout value to be used in milliseconds. timeout)Overrides java. |
| pack-priv abstract byte[] | Returns: a value of the specified length, ornull if the handshake has not yet
completed or the connection has been closed.the label to use in calculating the exported value. This must be
an ASCII-only string. label, byte[] the application-specific context value to use in calculating the
exported value. This may be context, int null to use no application context, which is
treated differently than an empty byte array.the number of bytes of keying material to return. length)Exports a value derived from the TLS master secret as described in RFC 5705. |
| pack-priv abstract SSLSession | getActiveSession()
Called by |
| pack-priv abstract byte[] | getAlpnSelectedProtocol()
Deprecated
use
Returns the protocol agreed upon by client and server, or getApplicationProtocol() instead.
null if
no protocol was agreed upon.
|
| public abstract String | getApplicationProtocol()
Returns the most recent application protocol value negotiated for this
connection.
|
| pack-priv abstract String[] | |
| public SocketChannel | getChannel()
Overrides java. SocketChannel
object associated with this socket, if any.
|
| pack-priv abstract byte[] | Returns: channel ID ornull if not available.Gets the TLS Channel ID for this server socket. |
| public FileDescriptor | |
| public abstract String | getHandshakeApplicationProtocol()
Overrides javax. |
| public abstract SSLSession | getHandshakeSession()
Overrides javax. SSLSession being constructed during a SSL/TLS
handshake.
|
| pack-priv String | |
| pack-priv String | getHostnameOrIP()
For the purposes of an SSLSession, we want a way to represent the supplied hostname or the IP address in a textual representation. |
| public InetAddress | getInetAddress()
Overrides java. |
| public InputStream | |
| public boolean | |
| public InetAddress | getLocalAddress()
Overrides java. |
| public int | getLocalPort()
Overrides java. |
| public SocketAddress | getLocalSocketAddress()
Overrides java. |
| pack-priv byte[] | getNpnSelectedProtocol()
Deprecated
NPN is not supported
Returns null always for backward compatibility.
|
| public boolean | |
| public OutputStream | getOutputStream()
Overrides java. |
| public final int | getPort()
Overrides java. |
| public int | getReceiveBufferSize()
Overrides java. SO_RCVBUF option
for this Socket, that is the buffer size used by the platform
for input on this Socket.
|
| public SocketAddress | getRemoteSocketAddress()
Overrides java. null if it is unconnected.
|
| public boolean | |
| public int | getSendBufferSize()
Overrides java. SO_SNDBUF option
for this Socket, that is the buffer size used by the platform
for output on this Socket.
|
| public int | |
| public final int | |
| pack-priv int | |
| public boolean | |
| pack-priv abstract byte[] | |
| public int | getTrafficClass()
Overrides java.
As the underlying network implementation may ignore the
traffic class or type-of-service set using |
| public boolean | |
| public boolean | |
| public boolean | |
| private boolean | |
| public boolean | isInputShutdown()
Overrides java. |
| public boolean | isOutputShutdown()
Overrides java. |
| pack-priv final void | |
| pack-priv final PeerInfoProvider | |
| public void | removeHandshakeCompletedListener(HandshakeCompletedListener
the HandShake Completed event listener listener)Implements abstract javax. |
| public final void | sendUrgentData(int
The byte of data to send data)Overrides java. |
| pack-priv abstract void | setAlpnProtocols(String[]
the list of ALPN protocols alpnProtocols)
Deprecated
use
Sets the list of ALPN protocols.
setApplicationProtocols(String[]) instead.
|
| pack-priv abstract void | setAlpnProtocols(byte[]
the encoded form of the ALPN protocol list alpnProtocols)
Deprecated
Use
Alternate version of setApplicationProtocols(String[]) instead.
setAlpnProtocols(String[]) that directly sets the list of
ALPN in the wire-format form used by BoringSSL (length-prefixed 8-bit strings).
|
| pack-priv abstract void | setApplicationProtocols(String[]
the list of ALPN protocols protocols)Sets the list of ALPN protocols. |
| pack-priv abstract void | |
| pack-priv abstract void | setApplicationProtocolSelector(ApplicationProtocolSelector selector)
Sets an application-provided ALPN protocol selector. |
| pack-priv abstract void | |
| pack-priv abstract void | setChannelIdPrivateKey(PrivateKey
private key (enables TLS Channel ID) or privateKey)null for no key (disables
TLS Channel ID). The private key must be an Elliptic Curve (EC) key based on the NIST
P-256 curve (aka SECG secp256r1 or ANSI X9.62 prime256v1).Sets the |
| pack-priv void | |
| pack-priv void | setHostname(String
the desired SNI hostname, or null to disable hostname)This method enables Server Name Indication |
| public void | setKeepAlive(boolean
whether or not to have socket keep alive turned on. on)Overrides java. SO_KEEPALIVE.
|
| pack-priv void | setNpnProtocols(byte[] npnProtocols)
Deprecated
NPN is not supported
This method does nothing and is kept for backward compatibility.
|
| public final void | setOOBInline(boolean on)
Overrides java. SO_OOBINLINE
(receipt of TCP urgent data)
By default, this option is disabled and TCP urgent data received on a
socket is silently discarded.
|
| public void | setPerformancePreferences(int
An connectionTime, int int expressing the relative importance of a short
connection timeAn latency, int int expressing the relative importance of low
latencyAn bandwidth)int expressing the relative importance of high
bandwidthOverrides java. |
| public void | setReceiveBufferSize(int
the size to which to set the receive buffer
size. This value must be greater than 0. size)Overrides java. SO_RCVBUF option to the
specified value for this Socket.
|
| public void | setReuseAddress(boolean
whether to enable or disable the socket option on)Overrides java. SO_REUSEADDR
socket option.
|
| public void | setSendBufferSize(int
the size to which to set the send buffer
size. This value must be greater than 0. size)Overrides java. SO_SNDBUF option to the
specified value for this Socket.
|
| public void | setSoLinger(boolean
whether or not to linger on. on, int how long to linger for, if on is true. linger)Overrides java. SO_LINGER with the
specified linger time in seconds.
|
| public final void | setSoTimeout(int
the specified timeout, in milliseconds. readTimeoutMilliseconds)Overrides java. SO_TIMEOUT
with the specified timeout, in milliseconds.
|
| pack-priv void | setSoWriteTimeout(int writeTimeoutMilliseconds)
Note write timeouts are not part of the javax.net.ssl.SSLSocket API |
| public void | setTcpNoDelay(boolean
true to enable TCP_NODELAY,
false to disable.Overrides java. TCP_NODELAY
(disable/enable Nagle's algorithm).
|
| public void | setTrafficClass(int
an tc)int value for the bitset.Overrides java. |
| pack-priv abstract void | setUseSessionTickets(boolean
True to enable session tickets useSessionTickets)This method enables session ticket support. |
| public void | shutdownInput()
Overrides java. |
| public void | shutdownOutput()
Overrides java. |
| public String |