class NIONetSocket extends NIONetSocketBase
NetSocket.NetSocketFactory
Modifier and Type | Field and Description |
---|---|
protected java.nio.ByteBuffer |
rbuf
read buffer
|
channel
LOG, TRACE_LM
Constructor and Description |
---|
NIONetSocket(java.nio.channels.SocketChannel channel)
Constructor
|
Modifier and Type | Method and Description |
---|---|
javax.net.ssl.SSLSession |
getSession()
Gets the SSL session.
|
protected byte[] |
readFully()
Read next data chunk from the channel
|
protected void |
write(java.nio.ByteBuffer bb)
Send the data to the channel
|
close, getLocalAddr, getLocalSockAddr, getMaxMessageSize, getRemoteAddr, getRemoteSockAddr, isClosed, read, readBoolean, readBytes, readInt, readUTF, write, writeBoolean, writeBytes, writeInt, writeUTF
addSessionListener, getSessionListeners
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSessionListener, flush, getSessionListeners, tracef, traceln
public NIONetSocket(java.nio.channels.SocketChannel channel) throws java.io.IOException
channel
- underlying SocketChanneljava.io.IOException
- on errorpublic javax.net.ssl.SSLSession getSession()
null
if the socket is not
secure.protected void write(java.nio.ByteBuffer bb) throws java.io.IOException
write
in class NIONetSocketBase
bb
- data to be sentjava.io.IOException
- on errorprotected byte[] readFully() throws java.io.IOException, java.io.EOFException
readFully
in class NIONetSocketBase
java.io.IOException
- on errorjava.io.EOFException
- if no data can be read