Hello,
I agree, for OP_WRITE it makes sense, for OP_READ - not.
WBR,
Alexey.
Jeanfrancois Arcand wrote:
> Hi Karsten,
>
> Karsten Ohme wrote:
>> 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);
>> }
>
> I agree. Will apply your patch.
>
> Thanks
>
> -- Jeanfrancois
>
>
>>
>> Regards,
>> Karsten
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>