Hi,
in TCPConnectorhandler in the read and write methods the key is only reattached if 0 is returned
by the read and write method. It would make more sense if the key is reregistered if not all
remaining bytes are written.
instead of:
if (nWrite == 0){
key.attach(callbackHandler);
selectorHandler.register(key,SelectionKey.OP_WRITE);
}
better:
if (byteBuffer.hasRemaining()){
key.attach(callbackHandler);
selectorHandler.register(key,SelectionKey.OP_WRITE);
}
Regards,
Karsten