#include <nanomsg/nn.h> void *nn_allocmsg(size_t size, int type);
|This documentation is for the TIP (development tree) of NNG and may represent unreleased changes or functionality that is experimental, and is subject to change before release. The latest released version is v1.3.2. See the documentation for v1.3.2 for the most up-to-date information.|
nn_allocmsg - allocate message (compatible API)
nn_allocmsg() allocates a message structure of size size, and is
primarily used to support zero-copy send operations, making use of the
NNG_MSG special size indicator.
The value returned is a pointer to the start of the message payload buffer.
The value of size must be positive, and small enough to hold reasonable message data plus book-keeping information.
|This function is provided for API compatibility with legacy libnanomsg. Consider using the relevant modern API instead.|
The value of type must be zero. (This argument was reserved to support different kinds of memory spaces for RDMA devices, but this was never developed in the legacy API.)
This function returns a pointer to message buffer space, or
Insufficient memory is available.
An invalid size or type was specified.
The library is shutting down.