|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.net.Socket | +--mngttest.JSSELocalClient.JSSEClientSocket
Field Summary | |
(package private) org.ssonet.net.SSONETContext |
ctx
|
(package private) javax.net.ssl.SSLSocket |
socket
|
Fields inherited from class java.net.Socket |
|
Constructor Summary | |
(package private) |
JSSELocalClient.JSSEClientSocket(javax.net.ssl.SSLSocket socket,
org.ssonet.net.SSONETContext ctx)
|
Method Summary | |
void |
close()
Closes the SSONETServerClientSocket. |
org.ssonet.net.SSONETContext |
getContext()
|
java.net.InetAddress |
getInetAddress()
Returns the address to which the socket is connected. |
java.io.InputStream |
getInputStream()
Returns the InputStream of this Socket. |
boolean |
getKeepAlive()
Tests if SO_KEEPALIVE is enabled. |
java.net.InetAddress |
getLocalAddress()
Gets the local address to which the socket is bound. |
int |
getLocalPort()
Returns the local port to which this socket is bound. |
java.io.OutputStream |
getOutputStream()
Returns the OutputStream of this Socket. |
int |
getPort()
Returns the remote port to which this socket is connected. |
int |
getReceiveBufferSize()
Gets the value of the SO_RCVBUF option for this Socket, that is the buffer size used by the platform for input on this Socket. |
int |
getSendBufferSize()
Get value of the SO_SNDBUF option for this Socket, that is the buffer size used by the platform for output on this Socket. |
int |
getSoLinger()
Returns setting for SO_LINGER. |
int |
getSoTimeout()
Returns setting for SO_TIMEOUT. |
boolean |
getTcpNoDelay()
Tests if TCP_NODELAY is enabled. |
void |
setKeepAlive(boolean on)
Enable/disable SO_KEEPALIVE. |
void |
setReceiveBufferSize(int size)
Sets the SO_RCVBUF option to the specified value for this Socket. |
void |
setSendBufferSize(int size)
Sets the SO_SNDBUF option to the specified value for this Socket. |
void |
setSoLinger(boolean on,
int linger)
Enable/disable SO_LINGER with the specified linger time in seconds. |
void |
setSoTimeout(int timeout)
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. |
void |
setTcpNoDelay(boolean on)
Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm). |
void |
shutdownInput()
Places the input stream for this socket at "end of stream". |
void |
shutdownOutput()
Disables the output stream for this socket. |
java.lang.String |
toString()
Converts this socket to a String . |
Methods inherited from class java.net.Socket |
bind, connect, connect, getChannel, getLocalSocketAddress, getOOBInline, getRemoteSocketAddress, getReuseAddress, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setReuseAddress, setSocketImplFactory, setTrafficClass |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
javax.net.ssl.SSLSocket socket
org.ssonet.net.SSONETContext ctx
Constructor Detail |
JSSELocalClient.JSSEClientSocket(javax.net.ssl.SSLSocket socket, org.ssonet.net.SSONETContext ctx)
Method Detail |
public org.ssonet.net.SSONETContext getContext()
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in class java.net.Socket
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in class java.net.Socket
java.io.IOException
public void close() throws java.io.IOException
close
in class java.net.Socket
java.io.IOException
public java.net.InetAddress getInetAddress()
getInetAddress
in class java.net.Socket
public java.net.InetAddress getLocalAddress()
getLocalAddress
in class java.net.Socket
public int getPort()
getPort
in class java.net.Socket
public int getLocalPort()
getLocalPort
in class java.net.Socket
public void setTcpNoDelay(boolean on) throws java.net.SocketException
setTcpNoDelay
in class java.net.Socket
on
- true
to enable TCP_NODELAY,
false to disable.
- Throws:
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.- Since:
- JDK1.1
- See Also:
getTcpNoDelay()
public boolean getTcpNoDelay() throws java.net.SocketException
getTcpNoDelay
in class java.net.Socket
boolean
indicating whether or not TCP_NODELAY is enabled.
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.setTcpNoDelay(boolean)
public void setSoLinger(boolean on, int linger) throws java.net.SocketException
setSoLinger
in class java.net.Socket
on
- whether or not to linger on.linger
- how to linger for, if on is true.
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.
java.lang.IllegalArgumentException
- if the linger value is negative.getSoLinger()
public int getSoLinger() throws java.net.SocketException
getSoLinger
in class java.net.Socket
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.setSoLinger(boolean, int)
public void setSoTimeout(int timeout) throws java.net.SocketException
setSoTimeout
in class java.net.Socket
timeout
- the specified timeout, in milliseconds.
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.getSoTimeout()
public int getSoTimeout() throws java.net.SocketException
getSoTimeout
in class java.net.Socket
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.setSoTimeout(int)
public void setSendBufferSize(int size) throws java.net.SocketException
Increasing 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. For UDP, this sets the maximum size of a packet that may be sent on this Socket.
Because SO_SNDBUF is a hint, applications that want to
verify what size the buffers were set to should call
getSendBufferSize()
.
setSendBufferSize
in class java.net.Socket
size
- the size to which to set the send buffer
size. This value must be greater than 0.
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.
java.lang.IllegalArgumentException
- if the
value is 0 or is negative.getSendBufferSize()
public int getSendBufferSize() throws java.net.SocketException
getSendBufferSize
in class java.net.Socket
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.setSendBufferSize(int)
public void setReceiveBufferSize(int size) throws java.net.SocketException
Increasing 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. For UDP, this sets the maximum size of a packet that may be sent on this Socket.
Because SO_RCVBUF is a hint, applications that want to
verify what size the buffers were set to should call
getReceiveBufferSize()
.
setReceiveBufferSize
in class java.net.Socket
size
- the size to which to set the receive buffer
size. This value must be greater than 0.
java.lang.IllegalArgumentException
- if the value is 0 or is
negative.
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.getReceiveBufferSize()
public int getReceiveBufferSize() throws java.net.SocketException
getReceiveBufferSize
in class java.net.Socket
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.setReceiveBufferSize(int)
public void setKeepAlive(boolean on) throws java.net.SocketException
setKeepAlive
in class java.net.Socket
on
- whether or not to have socket keep alive turned on.
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.getKeepAlive()
public boolean getKeepAlive() throws java.net.SocketException
getKeepAlive
in class java.net.Socket
boolean
indicating whether or not SO_KEEPALIVE is enabled.
java.net.SocketException
- if there is an error
in the underlying protocol, such as a TCP error.setKeepAlive(boolean)
public void shutdownInput() throws java.io.IOException
shutdownInput
in class java.net.Socket
java.io.IOException
- if an I/O error occurs when shutting down this
socket.Socket.shutdownOutput()
,
Socket.close()
,
Socket.setSoLinger(boolean, int)
public void shutdownOutput() throws java.io.IOException
shutdownOutput
in class java.net.Socket
java.io.IOException
- if an I/O error occurs when shutting down this
socket.Socket.shutdownInput()
,
Socket.close()
,
Socket.setSoLinger(boolean, int)
public java.lang.String toString()
String
.
toString
in class java.net.Socket
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |