[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] evbuffer_pullup contain buffer which contain header information of next packet
On Wed, Jul 26, 2017 at 8:01 PM, ravi chandran <ravigct27@xxxxxxxxx> wrote:
> Sorry, I actually forget to inform you that the packet header contain the
> length of the payload data. I have a buffer event filter function which
> returns BEV_OK after ensuring that event buffer contains data of atleast
> length bytes excluding header length. Once the filter function return BEV_OK
> , libevent is invoking my callback function inside which I do a
> evbuffer_pullup passing lenght of the payload data as argument.
How do you use data after evbuffer_pullup() with evbuffer_get_length() or not?
with evbuffer_get_length():
write(2, evbuffer_pullup(evbuf, -1), evbuffer_get_length(evbuf));
without:
puts(evbuffer_pullup(evbuf, -1));
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.