nanomsg next generation NNG  
Home GitHub Documentation

This documentation is for version v1.2.2 of nng, but the latest released version is v1.8.0. see the documentation for v1.8.0 for the most up-to-date information.
nn_reallocmsg(3compat)

SYNOPSIS

#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.

This function is provided for API compatibility with legacy libnanomsg. Consider using the relevant modern API instead.

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 returned to the caller.

RETURN VALUES

This function returns a pointer to message buffer space, or NULL on failure.

ERRORS

ENOMEM

Insufficient memory is available.

EINVAL

An invalid size was specified.

ETERM

The library is shutting down.

NNG Reference Manual vv1.2.2 © 2019 Staysail Systems, Inc, © 2018 Capitar IT Group BV
This document is supplied under the MIT License.
nanomsg™ and nng™ are trademarks of Garrett D'Amore.