[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] evbuffer_pullup(x,-1): garbage at end?



(Sorry if you receive this mail twice, I screwed up earlier).

Frank Denis wrote:
  This is totally expected.
evbuffer_pullup() makes the data continuous, but doesn't change anything
to the data itself. It's treated as binary data, not as a zero-terminated
string.

Ah right, that explains. And is actually documented (although not that
obvious), sorry for that.

  Not sure about what you're trying to achieve, but if you can consider data
as a buffer pointer + buffer size, it's a good way to improve the overall
performance of your app (zero copy) over using C-strings.

Nothing special, I just wanted to print out the received data for
debugging purposes, nothing permanent that would end up in the final code.

***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.