abstract class BaseSSLSocketImpl extends SSLSocket
SSLSocket,
SSLSocketImpl| 限定符和类型 | 字段和说明 |
|---|---|
private InputStream |
consumedInput |
private static String |
PROP_NAME
TLS requires that a close_notify warning alert is sent before the
connection is closed in order to avoid truncation attacks.
|
(专用程序包) static boolean |
requireCloseNotify |
private Socket |
self |
| 构造器和说明 |
|---|
BaseSSLSocketImpl() |
BaseSSLSocketImpl(Socket socket) |
BaseSSLSocketImpl(Socket socket,
InputStream consumed) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
bind(SocketAddress bindpoint)
Binds the address to the socket.
|
void |
close() |
void |
connect(SocketAddress endpoint)
Connects this socket to the server.
|
protected void |
finalize()
Ensures that the SSL connection is closed down as cleanly
as possible, in case the application forgets to do so.
|
SocketChannel |
getChannel()
Returns the unique
SocketChannel object
associated with this socket, if any. |
InetAddress |
getInetAddress()
Returns the address of the remote peer for this connection.
|
InputStream |
getInputStream() |
boolean |
getKeepAlive()
Tests if SO_KEEPALIVE is enabled.
|
InetAddress |
getLocalAddress()
Gets the local address to which the socket is bound.
|
int |
getLocalPort()
Returns the number of the local port that this connection uses.
|
SocketAddress |
getLocalSocketAddress()
Returns the address of the endpoint this socket is connected to
|
boolean |
getOOBInline()
Tests if OOBINLINE is enabled.
|
OutputStream |
getOutputStream() |
int |
getPort()
Returns the number of the remote port that this connection uses.
|
int |
getReceiveBufferSize() |
SocketAddress |
getRemoteSocketAddress()
Returns the address of the endpoint this socket is connected to
|
boolean |
getReuseAddress()
Tests if SO_REUSEADDR is enabled.
|
int |
getSendBufferSize() |
int |
getSoLinger()
Returns the socket's linger timeout.
|
int |
getSoTimeout()
Returns the socket timeout.
|
boolean |
getTcpNoDelay()
Returns true if the Nagle optimization is disabled.
|
int |
getTrafficClass()
Gets traffic class or type-of-service in the IP header for packets
sent from this Socket.
|
boolean |
isBound()
Returns the binding state of the socket.
|
boolean |
isConnected()
Returns the connection state of the socket.
|
boolean |
isInputShutdown()
Returns the input state of the socket
|
(专用程序包) boolean |
isLayered() |
boolean |
isOutputShutdown()
Returns the output state of the socket
|
void |
sendUrgentData(int data)
Send one byte of urgent data on the socket.
|
void |
setKeepAlive(boolean on)
Enable/disable SO_KEEPALIVE.
|
void |
setOOBInline(boolean on)
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.
|
void |
setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
Sets performance preferences for this socket.
|
void |
setReceiveBufferSize(int size) |
void |
setReuseAddress(boolean on)
Enable/disable SO_REUSEADDR.
|
void |
setSendBufferSize(int size) |
void |
setSoLinger(boolean flag,
int linger)
Assigns the socket's linger timeout.
|
void |
setSoTimeout(int timeout) |
void |
setTcpNoDelay(boolean value)
Enables or disables the Nagle optimization.
|
void |
setTrafficClass(int tc)
Sets traffic class or type-of-service octet in the IP header for
packets sent from this Socket.
|
void |
shutdownInput()
Places the input stream for this socket at "end of stream".
|
void |
shutdownOutput()
Disables the output stream for this socket.
|
String |
toString() |
addHandshakeCompletedListener, getApplicationProtocol, getEnabledCipherSuites, getEnabledProtocols, getEnableSessionCreation, getHandshakeApplicationProtocol, getHandshakeApplicationProtocolSelector, getHandshakeSession, getNeedClientAuth, getSession, getSSLParameters, getSupportedCipherSuites, getSupportedProtocols, getUseClientMode, getWantClientAuth, removeHandshakeCompletedListener, setEnabledCipherSuites, setEnabledProtocols, setEnableSessionCreation, setHandshakeApplicationProtocolSelector, setNeedClientAuth, setSSLParameters, setUseClientMode, setWantClientAuth, startHandshakeconnect, isClosed, setSocketImplFactoryprivate final Socket self
private final InputStream consumedInput
private static final String PROP_NAME
static final boolean requireCloseNotify
BaseSSLSocketImpl()
BaseSSLSocketImpl(Socket socket)
BaseSSLSocketImpl(Socket socket, InputStream consumed)
public final SocketChannel getChannel()
SocketChannel object
associated with this socket, if any.getChannel 在类中 SocketSocket.getChannel()public void bind(SocketAddress bindpoint) throws IOException
bind 在类中 SocketIOExceptionSocket.bind(java.net.SocketAddress)public SocketAddress getLocalSocketAddress()
getLocalSocketAddress 在类中 SocketSocket.getLocalSocketAddress()public SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress 在类中 SocketSocket.getRemoteSocketAddress()public final void connect(SocketAddress endpoint) throws IOException
connect 在类中 Socketendpoint - the SocketAddressIOException - if an error occurs during the connectionpublic final boolean isConnected()
isConnected 在类中 SocketSocket.isConnected()public final boolean isBound()
isBound 在类中 SocketSocket.isBound()public void shutdownInput()
throws IOException
shutdownInput 在类中 SocketIOExceptionSocket.shutdownInput()public void shutdownOutput()
throws IOException
shutdownOutput 在类中 SocketIOExceptionSocket.shutdownOutput()public boolean isInputShutdown()
isInputShutdown 在类中 SocketSocket.isInputShutdown()public boolean isOutputShutdown()
isOutputShutdown 在类中 SocketSocket.isOutputShutdown()protected final void finalize()
throws Throwable
public final InetAddress getInetAddress()
getInetAddress 在类中 Socketpublic final InetAddress getLocalAddress()
getLocalAddress 在类中 Socketpublic final int getPort()
public final int getLocalPort()
getLocalPort 在类中 Socketpublic final void setTcpNoDelay(boolean value)
throws SocketException
setTcpNoDelay 在类中 SocketSocketExceptionSocket.setTcpNoDelay(boolean)public final boolean getTcpNoDelay()
throws SocketException
getTcpNoDelay 在类中 SocketSocketExceptionSocket.getTcpNoDelay()public final void setSoLinger(boolean flag,
int linger)
throws SocketException
setSoLinger 在类中 SocketSocketExceptionSocket.setSoLinger(boolean, int)public final int getSoLinger()
throws SocketException
getSoLinger 在类中 SocketSocketExceptionSocket.getSoLinger()public final void sendUrgentData(int data)
throws SocketException
public final void setOOBInline(boolean on)
throws SocketException
public final boolean getOOBInline()
throws SocketException
getOOBInline 在类中 SocketSocketExceptionSocket.getOOBInline()public final int getSoTimeout()
throws SocketException
getSoTimeout 在类中 SocketSocketExceptionSocket.getSoTimeout()public final void setSendBufferSize(int size)
throws SocketException
setSendBufferSize 在类中 SocketSocketExceptionpublic final int getSendBufferSize()
throws SocketException
getSendBufferSize 在类中 SocketSocketExceptionpublic final void setReceiveBufferSize(int size)
throws SocketException
setReceiveBufferSize 在类中 SocketSocketExceptionpublic final int getReceiveBufferSize()
throws SocketException
getReceiveBufferSize 在类中 SocketSocketExceptionpublic final void setKeepAlive(boolean on)
throws SocketException
setKeepAlive 在类中 SocketSocketExceptionSocket.setKeepAlive(boolean)public final boolean getKeepAlive()
throws SocketException
getKeepAlive 在类中 SocketSocketExceptionSocket.getKeepAlive()public final void setTrafficClass(int tc)
throws SocketException
setTrafficClass 在类中 SocketSocketExceptionSocket.setTrafficClass(int)public final int getTrafficClass()
throws SocketException
getTrafficClass 在类中 SocketSocketExceptionSocket.getTrafficClass()public final void setReuseAddress(boolean on)
throws SocketException
setReuseAddress 在类中 SocketSocketExceptionSocket.setReuseAddress(boolean)public final boolean getReuseAddress()
throws SocketException
getReuseAddress 在类中 SocketSocketExceptionSocket.getReuseAddress()public void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
public InputStream getInputStream() throws IOException
getInputStream 在类中 SocketIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream 在类中 SocketIOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 SocketIOExceptionpublic void setSoTimeout(int timeout)
throws SocketException
setSoTimeout 在类中 SocketSocketExceptionboolean isLayered()
Copyright © 2023. All rights reserved.