The implementation of Common.write(ByteBuffer[] srcs, int offset, int length) is faulty in case the channel is set in non-blocking mode.
When in non-blocking mode, there is no guarantee that the write() actually writes any byte, so the loop over the buffers must exit as soon as the write is incomplete.
The implementation of
Common.write(ByteBuffer[] srcs, int offset, int length)
is faulty in case the channel is set in non-blocking mode.When in non-blocking mode, there is no guarantee that the
write()
actually writes any byte, so the loop over the buffers must exit as soon as the write is incomplete.