[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] Dynamic changes of read water mark
On Wed, Sep 01, 2010 at 10:06:44AM -0700, Gilad Benjamini wrote:
> Your sample code did not include the watermark part.
It doesn't need to.
> May I assume that at the end of the code snippet you would set the low
> watermark ?
No.
> If I set the low watermark to X, am I guaranteed that the next time I reach
> the callback at least X bytes are available ?
The key here is "at least". You can have more waiting, and you have to
take that into account.
> Is that also true if I leave some bytes in the buffer at the end of my
> processing ?
>
If you leave bytes on the buffer when a bufferevent is signaled, the
bufferevent will not signal again until something else is written to it.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.