javax.net.ssl.SSLSocket
, SSLSocketImpl
Modifier and Type | Field and Description |
---|---|
private final InputStream | |
private static final String | PROP_NAME
TLS requires that a close_notify warning alert is sent before the connection is closed in order to avoid truncation attacks. |
pack-priv static final boolean | |
private final Socket |
Access | Constructor and Description |
---|---|
pack-priv | |
pack-priv | |
pack-priv |
Modifier and Type | Method and Description |
---|---|
public void | bind(SocketAddress
the bindpoint)SocketAddress to bind toOverrides java. Binds the address to the socket. |
public void | |
public final void | connect(SocketAddress
the endpoint)SocketAddress Overrides java. Connects this socket to the server. |
public final SocketChannel | getChannel()
Overrides java. Returns the unique |
public final InetAddress | getInetAddress()
Overrides java. Returns the address of the remote peer for this connection. |
public InputStream | |
public final boolean | |
public final InetAddress | Returns: the local address to which the socket is bound.Overrides java. Gets the local address to which the socket is bound. |
public final int | getLocalPort()
Overrides java. Returns the number of the local port that this connection uses. |
public SocketAddress | getLocalSocketAddress()
Overrides java. Returns the address of the endpoint this socket is connected to |
public final boolean | |
public <T> T | getOption(SocketOption<T>
The socket option name)Overrides java. Returns the value of a socket option. |
public OutputStream | getOutputStream()
Overrides java. Returns an output stream for this socket. |
public final int | getPort()
Overrides java. Returns the number of the remote port that this connection uses. |
public final int | getReceiveBufferSize()
Overrides java. Gets the value of the |
public SocketAddress | getRemoteSocketAddress()
Overrides java. Returns the address of the endpoint this socket is connected to |
public final boolean | |
public final int | getSendBufferSize()
Overrides java. Get value of the |
public final int | |
public final int | |
public final boolean | getTcpNoDelay()
Overrides java. Returns true if the Nagle optimization is disabled. |
public final int | getTrafficClass()
Overrides java. Gets traffic class or type-of-service in the IP header for packets sent from this Socket. |
public final boolean | |
public final boolean | |
public boolean | |
pack-priv boolean | |
public boolean | isOutputShutdown()
Overrides java. Returns the output state of the socket |
public final void | sendUrgentData(int
The byte of data to send data)Overrides java. Send one byte of urgent data on the socket. |
public final void | setKeepAlive(boolean
whether or not to have socket keep alive turned on. on)Overrides java. Enable/disable SO_KEEPALIVE. |
public final void | setOOBInline(boolean
true to enable SO_OOBINLINE ,
false to disable.Overrides java. Enable/disable OOBINLINE (receipt of TCP urgent data) By default, this option is disabled and TCP urgent data received on a socket is silently discarded. |
public <T> Socket | setOption(SocketOption<T>
The socket option name, T The value of the socket option. A value of value)null
may be valid for some options.Overrides java. Sets the value of a socket option. |
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. Sets performance preferences for this socket. |
public final void | setReceiveBufferSize(int
the size to which to set the receive buffer
size. This value must be greater than 0. size)Overrides java. Sets the |
public final void | setReuseAddress(boolean
whether to enable or disable the socket option on)Overrides java. Enable/disable SO_REUSEADDR. |
public final void | setSendBufferSize(int
the size to which to set the send buffer
size. This value must be greater than 0. size)Overrides java. Sets the |
public final void | setSoLinger(boolean
whether or not to linger on. flag, int how long to linger for, if on is true. linger)Overrides java. Assigns the socket's linger timeout. |
public void | setSoTimeout(int
the specified timeout, in milliseconds. timeout)Overrides java. Enable/disable |
public final void | setTcpNoDelay(boolean
true to enable TCP_NODELAY ,
false to disable.Overrides java. Enables or disables the Nagle optimization. |
public final void | setTrafficClass(int
an tc)int value for the bitset.Overrides java. Sets traffic class or type-of-service octet in the IP header for packets sent from this Socket. |
public void | shutdownInput()
Overrides java. Places the input stream for this socket at "end of stream". |
public void | shutdownOutput()
Overrides java. Disables the output stream for this socket. |
public Set | supportedOptions()
Overrides java. Returns a set of the socket options supported by this socket. |
public String |
consumedInput | back to summary |
---|---|
private final InputStream consumedInput |
PROP_NAME | back to summary |
---|---|
private static final String PROP_NAME TLS requires that a close_notify warning alert is sent before the connection is closed in order to avoid truncation attacks. Some implementations (MS IIS and others) don't do that. The property below controls whether we accept that or treat it as an error. The default is "false", i.e. tolerate the broken behavior. |
requireCloseNotify | back to summary |
---|---|
pack-priv static final boolean requireCloseNotify |
self | back to summary |
---|---|
private final Socket self |
BaseSSLSocketImpl | back to summary |
---|---|
pack-priv BaseSSLSocketImpl() |
BaseSSLSocketImpl | back to summary |
---|---|
pack-priv BaseSSLSocketImpl(Socket socket) |
BaseSSLSocketImpl | back to summary |
---|---|
pack-priv BaseSSLSocketImpl(Socket socket, InputStream consumed) |
bind | back to summary |
---|---|
public void bind(SocketAddress bindpoint) throws IOException Overrides java. Binds the address to the socket.
|
close | back to summary |
---|---|
public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this socket.
Any thread currently blocked in an I/O operation upon this socket
will throw a Once a socket has been closed, it is not available for further networking use (i.e. can't be reconnected or rebound). A new socket needs to be created. Closing this socket will also close the socket's
If this socket has an associated channel then the channel is closed as well.
|
connect | back to summary |
---|---|
public final void connect(SocketAddress endpoint) throws IOException Overrides java. Connects this socket to the server. This method is either called on an unconnected SSLSocketImpl by the application, or it is called in the constructor of a regular SSLSocketImpl. If we are layering on top on another socket, then this method should not be called, because we assume that the underlying socket is already connected by the time it is passed to us.
|
getChannel | back to summary |
---|---|
public final SocketChannel getChannel() Overrides java. Returns the unique
|
getInetAddress | back to summary |
---|---|
public final InetAddress getInetAddress() Overrides java. Returns the address of the remote peer for this connection.
|
getInputStream | back to summary |
---|---|
public InputStream getInputStream() throws IOException Overrides java. Doc from java. Returns an input stream for this socket. If this socket has an associated channel then the resulting input
stream delegates all of its operations to the channel. If the channel
is in non-blocking mode then the input stream's Reading from the input stream is interruptible in the following circumstances:
Under abnormal conditions the underlying connection may be broken by the remote host or the network software (for example a connection reset in the case of TCP connections). When a broken connection is detected by the network software the following applies to the returned input stream :-
Closing the returned
|
getKeepAlive | back to summary |
---|---|
public final boolean getKeepAlive() throws SocketException Overrides java. Tests if SO_KEEPALIVE is enabled.
|
getLocalAddress | back to summary |
---|---|
public final InetAddress getLocalAddress() Overrides java. Gets the local address to which the socket is bound.
|
getLocalPort | back to summary |
---|---|
public final int getLocalPort() Overrides java. Returns the number of the local port that this connection uses.
|
getLocalSocketAddress | back to summary |
---|---|
public SocketAddress getLocalSocketAddress() Overrides java. Returns the address of the endpoint this socket is connected to
|
getOOBInline | back to summary |
---|---|
public final boolean getOOBInline() throws SocketException Overrides java. Tests if OOBINLINE is enabled.
|
getOption | back to summary |
---|---|
public <T> T getOption(SocketOption<T> name) throws IOException Overrides java. Doc from java. Returns the value of a socket option.
|
getOutputStream | back to summary |
---|---|
public OutputStream getOutputStream() throws IOException Overrides java. Doc from java. Returns an output stream for this socket. If this socket has an associated channel then the resulting output
stream delegates all of its operations to the channel. If the channel
is in non-blocking mode then the output stream's Writing to the output stream is interruptible in the following circumstances:
Closing the returned
|
getPort | back to summary |
---|---|
public final int getPort() Overrides java. Returns the number of the remote port that this connection uses.
|
getReceiveBufferSize | back to summary |
---|---|
public final int getReceiveBufferSize() throws SocketException Overrides java. Doc from java. Gets the value of the
|
getRemoteSocketAddress | back to summary |
---|---|
public SocketAddress getRemoteSocketAddress() Overrides java. Returns the address of the endpoint this socket is connected to
|
getReuseAddress | back to summary |
---|---|
public final boolean getReuseAddress() throws SocketException Overrides java. Tests if SO_REUSEADDR is enabled.
|
getSendBufferSize | back to summary |
---|---|
public final int getSendBufferSize() throws SocketException Overrides java. Doc from java. Get value of the
|
getSoLinger | back to summary |
---|---|
public final int getSoLinger() throws SocketException Overrides java. Returns the socket's linger timeout.
|
getSoTimeout | back to summary |
---|---|
public final int getSoTimeout() throws SocketException Overrides java. Returns the socket timeout.
|
getTcpNoDelay | back to summary |
---|---|
public final boolean getTcpNoDelay() throws SocketException Overrides java. Returns true if the Nagle optimization is disabled. This relates to low-level buffering of TCP traffic, delaying the traffic to promote better throughput.
|
getTrafficClass | back to summary |
---|---|
public final int getTrafficClass() throws SocketException Overrides java. Gets traffic class or type-of-service in the IP header for packets sent from this Socket.
|
isBound | back to summary |
---|---|
public final boolean isBound() Overrides java. Returns the binding state of the socket.
|
isConnected | back to summary |
---|---|
public final boolean isConnected() Overrides java. Returns the connection state of the socket.
|
isInputShutdown | back to summary |
---|---|
public boolean isInputShutdown() Overrides java. Returns the input state of the socket
|
isLayered | back to summary |
---|---|
pack-priv boolean isLayered() |
isOutputShutdown | back to summary |
---|---|
public boolean isOutputShutdown() Overrides java. Returns the output state of the socket
|
sendUrgentData | back to summary |
---|---|
public final void sendUrgentData(int data) throws SocketException Overrides java. Send one byte of urgent data on the socket.
|
setKeepAlive | back to summary |
---|---|
public final void setKeepAlive(boolean on) throws SocketException Overrides java. Enable/disable SO_KEEPALIVE.
|
setOOBInline | back to summary |
---|---|
public final void setOOBInline(boolean on) throws SocketException Overrides java. Enable/disable OOBINLINE (receipt of TCP urgent data) By default, this option is disabled and TCP urgent data received on a socket is silently discarded.
|
setOption | back to summary |
---|---|
public <T> Socket setOption(SocketOption<T> name, T value) throws IOException Overrides java. Doc from java. Sets the value of a socket option.
|
setPerformancePreferences | back to summary |
---|---|
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) Overrides java. Sets performance preferences for this socket.
|
setReceiveBufferSize | back to summary |
---|---|
public final void setReceiveBufferSize(int size) throws SocketException Overrides java. Doc from java. Sets the Increasing the receive buffer size can increase the performance of network I/O for high-volume connection, while decreasing it can help reduce the backlog of incoming data. Because The value of
|
setReuseAddress | back to summary |
---|---|
public final void setReuseAddress(boolean on) throws SocketException Overrides java. Enable/disable SO_REUSEADDR.
|
setSendBufferSize | back to summary |
---|---|
public final void setSendBufferSize(int size) throws SocketException Overrides java. Doc from java. Sets the Because
|
setSoLinger | back to summary |
---|---|
public final void setSoLinger(boolean flag, int linger) throws SocketException Overrides java. Assigns the socket's linger timeout.
|
setSoTimeout | back to summary |
---|---|
public void setSoTimeout(int timeout) throws SocketException Overrides java. Doc from java. Enable/disable
|
setTcpNoDelay | back to summary |
---|---|
public final void setTcpNoDelay(boolean value) throws SocketException Overrides java. Enables or disables the Nagle optimization.
|
setTrafficClass | back to summary |
---|---|
public final void setTrafficClass(int tc) throws SocketException Overrides java. Sets traffic class or type-of-service octet in the IP header for packets sent from this Socket.
|
shutdownInput | back to summary |
---|---|
public void shutdownInput() throws IOException Overrides java. Places the input stream for this socket at "end of stream". Any data sent to the input stream side of the socket is acknowledged and then silently discarded.
|
shutdownOutput | back to summary |
---|---|
public void shutdownOutput() throws IOException Overrides java. Disables the output stream for this socket. For a TCP socket, any previously written data will be sent followed by TCP's normal connection termination sequence.
|
supportedOptions | back to summary |
---|---|
public Set Overrides java. Doc from java. Returns a set of the socket options supported by this socket. This method will continue to return the set of options even after the socket has been closed.
|
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Converts this socket to a |