I'd like to receeive/send udp datagrams. These datagrams has two
components: a header and user data. The header is fixed size. My software
component provides header. So, my component adds header to outgoing user
data and removes header from incoming user data.
To use Async write, I create a new ByteBuffer, write my header to it, and
copy user data to it, and call selector handler writeTo I'd like to avoid
additional allocation and user data copy.
DataChannel has read/write method that accepts an array of ByteBuffer. This
is attractive to me because I can avoid a bytecopy of user data on the
sending side.
AsyncQueueWriter doesn't support Datachannel.write(ByteBuffer[] srcs).
What should I do?
1) forget about it? if so, why?
2) modify girzzly, say AsyncQueueWritable, AysncQueueWriter to add method
that accepts ByteBuffer[] and whatever follows from that?
3) other?
Regards,
John