mongoose/docs/c-api/mbuf.h/mbuf_append_and_free.md
Deomid Ryabkov 9a70abef24 Add mbuf_append_and_free() and mbuf_move()
CL: Add mbuf_append_and_free() and mbuf_move()

PUBLISHED_FROM=bdf73906dd93b2ebeace160596508e15480b54b4
2018-12-05 21:49:01 +00:00

360 B

title decl_name symbol_kind signature
mbuf_append_and_free() mbuf_append_and_free func size_t mbuf_append_and_free(struct mbuf *, void *data, size_t data_size);

Appends data to the Mbuf and frees it (data must be heap-allocated).

Returns the number of bytes appended or 0 if out of memory. data is freed irrespective of return value.