|Modifier and Type||Method and Description|
Reports input received on the
Reports that the
void handleOpen(AsyncSocket socket)
socketis connected to the remote end. This callback is made if
true, then the connection was completed by
open. If the connect attempt failed, then
handleCloseis called instead.
socket- The now connect socket.
void handleInput(java.nio.ByteBuffer buffer, AsyncSocket socket)
AsyncSocketobject. The buffer is positioned at zero and
Buffer.remaining()is the number of valid bytes in
If the listener needs to reference
contents after returning, then the listener must store the
desired bytes to a new location prior to returning.
Do not flip or compact
This is automatically performed by
net.sf.eBus.net.AsyncSocket upon return.
buffer- buffer containing bytes read from the socket.
inputbytes read from this
void handleOutputAvailable(AsyncSocket socket)
socket's output buffer is no longer full and the listener may again call
AsyncSocket.send(int)methods. This method is called only after a
sendmethod threw a
socket- this socket output buffer is no longer full.
void handleClose(java.lang.Throwable t, AsyncSocket socket)
Socketis now closed. If the socket closed due to an exception, the exception is forwarded in