2
.\" Title: zmq_getmsgopt
3
.\" Author: [see the "AUTHORS" section]
4
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
10
.TH "ZMQ_GETMSGOPT" "3" "12/18/2011" "0MQ 3\&.1\&.0" "0MQ Manual"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
25
.\" disable justification (adjust text to left margin only)
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
31
zmq_getmsgopt \- retrieve message option
34
\fBint zmq_getmsgopt (zmq_msg_t \fR\fB\fI*message\fR\fR\fB, int \fR\fB\fIoption_name\fR\fR\fB, void \fR\fB\fI*option_value\fR\fR\fB, size_t \fR\fB\fI*option_len\fR\fR\fB);\fR
37
The \fIzmq_getmsgopt()\fR function shall retrieve the value for the option specified by the \fIoption_name\fR argument for the message pointed to by the \fImessage\fR argument, and store it in the buffer pointed to by the \fIoption_value\fR argument\&. The \fIoption_len\fR argument is the size in bytes of the buffer pointed to by \fIoption_value\fR; upon successful completion \fIzmq_getsockopt()\fR shall modify the \fIoption_len\fR argument to indicate the actual size of the option value stored in the buffer\&.
39
The following options can be retrieved with the \fIzmq_getmsgopt()\fR function:
43
Indicates that there are more message parts to follow after the
48
The \fIzmq_getmsgopt()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&.
55
is unknown, or the requested
59
is invalid, or the size of the buffer pointed to by
60
\fIoption_value\fR, as specified by
61
\fIoption_len\fR, is insufficient for storing the option value\&.
65
\fBReceiving a multi-part message\fR.
73
size_t more_size = sizeof (more);
75
/* Create an empty 0MQ message to hold the message part */
76
int rc = zmq_msg_init (&part);
78
/* Block until a message is available to be received from socket */
79
rc = zmq_recvmsg (socket, &part, 0);
81
rc = getmsgopt (&part, ZMQ_MORE, &more, &more_size);
84
fprintf (stderr, "more\en");
87
fprintf (stderr, "end\en");
99
\fBzmq_msg_data\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7)
102
The 0MQ documentation was written by Chuck Remes <\m[blue]\fBcremes@mac\&.com\fR\m[]\&\s-2\u[1]\d\s+2>\&.
107
\%mailto:cremes@mac.com