summaryrefslogtreecommitdiff
path: root/docs/ref/compat/nn_reallocmsg.adoc
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-04-05 08:40:25 -0700
committerGarrett D'Amore <garrett@damore.org>2024-04-05 08:40:25 -0700
commit1b825b063da65fe3d88c1ca97afded0d6f6ccc14 (patch)
tree3d422dc27dc2a2c1146df0153ea9c97b17d28134 /docs/ref/compat/nn_reallocmsg.adoc
parent4d178a9eb65b973d18c80afa328a070ee09fd768 (diff)
downloadnng-1b825b063da65fe3d88c1ca97afded0d6f6ccc14.tar.gz
nng-1b825b063da65fe3d88c1ca97afded0d6f6ccc14.tar.bz2
nng-1b825b063da65fe3d88c1ca97afded0d6f6ccc14.zip
Compat pages converted.
Diffstat (limited to 'docs/ref/compat/nn_reallocmsg.adoc')
-rw-r--r--docs/ref/compat/nn_reallocmsg.adoc36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/ref/compat/nn_reallocmsg.adoc b/docs/ref/compat/nn_reallocmsg.adoc
new file mode 100644
index 00000000..7a1cb0ad
--- /dev/null
+++ b/docs/ref/compat/nn_reallocmsg.adoc
@@ -0,0 +1,36 @@
+## nn_reallocmsg
+
+Reallocate message (compatible API).
+
+### Synopsis
+
+```c
+#include <nanomsg/nn.h>
+
+void *nn_reallocmsg(void *old, size_t size);
+```
+
+### Description
+
+The `nn_reallocmsg` reallocates the message _old_, making it of size _size_.
+
+On success, the contents of _old_ are copied into the new message (truncating if appropriate), then _old_ is deallocated, and a pointer to the new message payload is returned.
+
+On failure, the _old_ message is unchanged, and the value `NULL` is returnedto the caller.
+
+### Return Values
+
+This function returns a pointer to message buffer space, or `NULL` on failure.
+
+### Errors
+
+[horizontal]
+`ENOMEM`:: Insufficient memory is available.
+`EINVAL`:: An invalid _size_ was specified.
+`ETERM`:: The library is shutting down.
+
+### See Also
+
+xref:nn_allocmsg.adoc[nn_allocmsg],
+xref:nn_freemsg.adoc[nn_freemsg],
+xref:nn_errno.adoc[nn_errno]