From 92a5808b86cf8fb11d5c29a48ec770800839be17 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 23 Jan 2020 23:48:47 -0800 Subject: Publishing updates for v1.2.1 --- man/v1.2.1/nng_msg_realloc.3.html | 138 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 man/v1.2.1/nng_msg_realloc.3.html (limited to 'man/v1.2.1/nng_msg_realloc.3.html') diff --git a/man/v1.2.1/nng_msg_realloc.3.html b/man/v1.2.1/nng_msg_realloc.3.html new file mode 100644 index 00000000..42c6e47e --- /dev/null +++ b/man/v1.2.1/nng_msg_realloc.3.html @@ -0,0 +1,138 @@ +--- +version: v1.2.1 +layout: refman +--- + + + + + + + +nng_msg_realloc(3) + + + + + + +
+
+

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.

+
+
+
+
+ +
+ + + \ No newline at end of file -- cgit v1.2.3-70-g09d2