[zeromq-dev] ByteBuffer API for JZMQ

Yu Dongmin miniway at gmail.com
Mon May 13 19:31:05 CEST 2013


Hi,

I'm basically agree to have bytebuffer API. JZMQ application would have more options for their purpose.

And it would be excellent if we have a benchmark result using bytebuffer compared to byte[].


Thanks
Min

On May 13, 2013, at 9:58 AM, Trevor Bernard <trevor.bernard at gmail.com> wrote:

> In the next couple of days I will be writing a ByteByffer API for JZMQ I would like to hear the communities thoughts.
> 
> I was thinking of something along the lines of:
> 
> int sendByteBuffer(ByteBuffer bb, int flags);
> int recvByteBuffer(ByteBuffer bb, int flags);
> int recvByteBuffer(int flags);
> 
> Implementation seems straightforward enough. Though it really only makes sense to use a Direct ByteBuffer since it's allocated off the heap and can be passed to libzmq without a copy. Otherwise you'd have to copy the underlying byte[].
> 
> So does it make sense to only support a direct bytebuffer?
> 
> Thoughts?
> 
> -Trev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev




More information about the zeromq-dev mailing list