can you read the length header (four bytes I guess?) and keep it
somewhere in your program, and then wait for enough data to be
readable?

Regards,
Shuo Chen

On 3/31/10, Jarod Liu <[email protected]> wrote:
> Hi,
> I writing a eventbuffer socket app. My app packet have a length
> header, I want to read data only when input buffer length > packet
> length(I need to read the length header first). But it seems like I
> can't read from evbuffer without draining data. Is there a way to do
> that?
> ***********************************************************************
> To unsubscribe, send an e-mail to [email protected] with
> unsubscribe libevent-users    in the body.
>
***********************************************************************
To unsubscribe, send an e-mail to [email protected] with
unsubscribe libevent-users    in the body.

Reply via email to