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

NAME

6       nn_freemsg - deallocate a message
7

SYNOPSIS

9       #include <nanomsg/nn.h>
10
11       int nn_freemsg (void *msg);
12

DESCRIPTION

14       Deallocates a message allocated using nn_allocmsg(3) function or
15       received via nn_recv(3) or nn_recvmsg(3) function. While nn_recv(3) and
16       nn_recvmsg(3) allow to receive data into arbitrary buffers, using
17       library-allocated buffers can be more efficient for large messages as
18       it allows for using zero-copy techniques.
19

RETURN VALUE

21       If the function succeeds zero is returned. Otherwise, -1 is returned
22       and errno is set to to one of the values defined below.
23

ERRORS

25       EFAULT
26           The message pointer is invalid.
27

EXAMPLE

29           void *buf;
30           nn_recv (s, &buf, NN_MSG, 0);
31           nn_freemsg (buf);
32

SEE ALSO

34       nn_allocmsg(3) nn_reallocmsg(3) nn_recv(3) nn_recvmsg(3) nanomsg(7)
35

AUTHORS

37       Martin Sustrik <sustrik@250bpm.com>
38
39
40
41                                  2022-07-22                     NN_FREEMSG(3)
Impressum