On Tue, Nov 15, 2016 at 9:12 PM, Devi Prasad Ivaturi <[email protected]> wrote:
> How can I modify a byte or two directly in evbuffer data?

Hi,

If you don't want to use pullup, you can use something like (but only
if you data at the beginning of the buffer, otherwise it is like
pullup):
  evbuffer_remove(buf, data, bytes);
  data[1] = 'x';
  evbuffer_prepend(buf, data, bytes);

Or
  evbuffer_ptr_evbuffer_search() # but be aware of continuous

But I'm not sure that this is optimal though.

  Azat.
***********************************************************************
To unsubscribe, send an e-mail to [email protected] with
unsubscribe libevent-users    in the body.

Reply via email to