From 102ecba8798b9a60ae3ef7ad6579a258c0b8583c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 27 Jan 2020 22:38:38 -0800 Subject: Publishing updates for v1.2.5 --- man/v1.2.5/nng_msg_realloc.3.html | 460 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 460 insertions(+) create mode 100644 man/v1.2.5/nng_msg_realloc.3.html (limited to 'man/v1.2.5/nng_msg_realloc.3.html') diff --git a/man/v1.2.5/nng_msg_realloc.3.html b/man/v1.2.5/nng_msg_realloc.3.html new file mode 100644 index 00000000..41e66738 --- /dev/null +++ b/man/v1.2.5/nng_msg_realloc.3.html @@ -0,0 +1,460 @@ +--- +version: v1.2.5 +layout: manpage +title: nng_msg_realloc(3) +--- + +
+{% if page.version and page.version != site.latest %} +{% if page.version == "tip" %} +{% include manpage-tip.html %} +{% else %} +{% include manpage-old.html %} +{% endif %} +{% endif %} + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_msg_realloc(nng_msg *msg, size_t size);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_msg_realloc() function re-allocates a message so that it has +a body of length size. +This message attempts to avoid extra allocations, +and will reuse the existing memory when possible.

+
+
+ + + + + +
+ + +One way to further reduce message allocations is to allocate a message +larger than needed, then use this function or +nng_msg_chop() to reduce the message size +to that actually needed. +The extra space left +over will still be present in the message, so that when the message size +needs to grow due to this function or nng_msg_append() +no actual memory allocations need to take place. +
+
+
+ + + + + +
+ + +Pointers to message body and header content obtained prior to this +function must not be in use, as the underlying memory used for the message +may have changed, particularly if the message size is increasing. +
+
+
+
+
+

RETURN VALUES

+
+
+

This function returns 0 on success, and non-zero otherwise.

+
+
+
+
+

ERRORS

+
+
+ + + + + +
+NNG_ENOMEM + +

Insufficient free memory exists to reallocate a message.

+
+
+
+
+ +
+
-- cgit v1.2.3-70-g09d2