Hi, I'm programming a libevent2 based app that measures read/write efficiency 
from a remote (TCP) server using event based paradigms.

Since I'm new to libevent's and event based paradigm, I'm also using 
'buffervevent' and 'evbuffer' interfaces to gather and push data onto sockets 
instead of plain old read/write syscalls.

My app is being limited by (it seems) a hardcoded limit of 4096 bytes when i 
fully drain a evbuffer on a single call. Instead, i would like to know if there 
is any special function/interface to modify this limit.

I know there is a specialized call 'bufferevent_setwatermark(...)' and even 
rate 
limit interfaces, that would allow a read or write event be dispatched to my 
callback whenever a low/high watermark level was being reached. The problem is 
that when using this kind of calls, libevent core aggregate and wait until this 
limit comes true what would confuse the stats i'm measuring, and also would not 
be as efficient as changing the read/write data len bucket directly and getting 
more data in a single roll/call (this premise is for my study case).

Is any other interface available on libevent 2.0 that would allow to change 
this 
4096 byte limit? If not, would be possible including it on the 2.0 release 
timeframe?

I discovered this using 'socat' program and connecting to it from my 
libevent2.0 
based test app:
$ socat TCP-LISTEN:8080,bind=localhost,fork,reuseaddr /dev/zero

BTW, i would like to congratulate the libevent devteam for the great job done 
so 
far and for the attention given to the community!

Best regards,
Raine


      

Reply via email to