1NN_REALLOCMSG(3)                 nanomsg 1.1.5                NN_REALLOCMSG(3)
2
3
4

NAME

6       nn_reallocmsg - reallocate a message
7

SYNOPSIS

9       #include <nanomsg/nn.h>
10
11       void *nn_reallocmsg (void *msg, size_t size);
12

DESCRIPTION

14       Reallocate a message previously allocated by nn_allocmsg(3) or received
15       from a peer using NN_MSG mechanism.
16
17       Note that as with the standard realloc, the operation may involve
18       copying the data in the buffer.
19

RETURN VALUE

21       If the function succeeds pointer to newly allocated buffer is returned.
22       Otherwise, NULL is returned and errno is set to to one of the values
23       defined below.
24

ERRORS

26       ENOMEM
27           Not enough memory to allocate the message.
28

EXAMPLE

30           void *buf = nn_allocmsg (12, 0);
31           void *newbuf = nn_reallocmsg (buf, 20);
32           nn_freemsg (newbuf);
33

SEE ALSO

35       nn_allocmsg(3) nn_freemsg(3) nanomsg(7)
36

AUTHORS

38       Martin Sustrik <sustrik@250bpm.com>
39
40
41
42                                  2022-01-20                  NN_REALLOCMSG(3)
Impressum