'\" t .\" Title: nn_freemsg .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-02-21 .\" Manual: nanomsg 1.2.1 .\" Source: \ \& .\" Language: English .\" .TH "NN_FREEMSG" "3" "2024-02-21" "\ \&" "nanomsg 1.2.1" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" nn_freemsg \- deallocate a message .SH "SYNOPSIS" .sp \fB#include \fP .sp \fBint nn_freemsg (void \fI*msg\fP);\fP .SH "DESCRIPTION" .sp Deallocates a message allocated using nn_allocmsg(3) function or received via nn_recv(3) or nn_recvmsg(3) function. While nn_recv(3) and nn_recvmsg(3) allow one to receive data into arbitrary buffers, using library\-allocated buffers can be more efficient for large messages as it allows for using zero\-copy techniques. .SH "RETURN VALUE" .sp If the function succeeds zero is returned. Otherwise, \-1 is returned and \fIerrno\fP is set to to one of the values defined below. .SH "ERRORS" .sp \fBEFAULT\fP .RS 4 The message pointer is invalid. .RE .SH "EXAMPLE" .sp .if n .RS 4 .nf .fam C void *buf; nn_recv (s, &buf, NN_MSG, 0); nn_freemsg (buf); .fam .fi .if n .RE .SH "SEE ALSO" .sp nn_allocmsg(3) nn_reallocmsg(3) nn_recv(3) nn_recvmsg(3) nanomsg(7) .SH "AUTHORS" .sp .MTO "sustrik\(at250bpm.com" "Martin Sustrik" ""