[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] bufferevents and write signalling
On Thu, Aug 05, 2010 at 02:09:50PM -0400, Nick Mathewson wrote:
> Right. The read callback is invoked when more data *arrives,* not
> whenever there is data.
>
> If you want it to handle all the data, why not just use a loop:
>
> while (evbuffer_get_length(data) >= some_size) {
> /* ... */
> }
>
> That way you avoid the arbitrary recursion.
Good call, thanks!
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.