Hi Grizzly community.
I look at many different NIO frameworks and chose Grizzly as a favor.
During analyzing of most famous NIO frameworks I notice that it does not
provide the possibility to use read(ByteBuffer[] dsts)/write(ByteBuffer[]
srcs) or read(ByteBuffer[] dsts, int offset, int length)/write(ByteBuffer[]
srcs, int offset, int length) methods of java.nio.channels.DatagramChannel
or java.nio.channels.SocketChannel classes.
I look deeper in source code of sun jdk1.6 (JNI part) and saw that this
methods implements by OS function (recvmsg/sendmsg on Linux/Solaris and
WSARecv/WSASend on Windows). So it will improve the performance in such task
as mine - some type of proxy.
Target: process UDP package with some my protocol headers + raw data, and if
I can use read(ByteBuffer[] dsts)/write(ByteBuffer[] srcs) methods, I will
pass arrays of two ByteBuffer for read and write where second ByteBuffer
(raw data) must not wanted any change and even copy (only flip or rewind if
needed)!
What are you think about such functionality? Cat it be added to Grizzly
framework?
Truly yours, Yuriy.