ZMQ_MSG_MORE(3)
π ZMQ_MSG_MORE(3) π
okay bestie, pull up a chair, because we're doing a whole deep dive into zmq_msg_more from the 0MQ Manual and honestly? it's giving tiny-but-mighty. β¨
πΈ NAME πΈ
zmq_msg_more β tell you if there are more message parts left to receive π
π¦ SYNOPSIS π¦
int zmq_msg_more (zmq_msg_t *message);
β¨ DESCRIPTION β¨
so the zmq_msg_more() function is your little gossip source β it tells you whether this message is part of a multi-part message, and whether there are further parts still waiting to be received. π
and here's the slay part: this method can safely be called after zmq_msg_close(). no cap. it doesn't care, it's still gonna answer you. π
also fun fact, this method is identical to zmq_msg_get() with an argument of ZMQ_MORE. same vibe, different name. iykyk. π«Ά
π RETURN VALUE π
- returns zero if this is the final part of a multi-part message, or if it's the only part of a single-part message π
- returns 1 if there are further parts to receive π₯
π EXAMPLE π
here's us receiving a multi-part message, main character energy only:
zmq_msg_t part;
while (true) {
// Create an empty 0MQ message to hold the message part
int rc = zmq_msg_init (&part);
assert (rc == 0);
// Block until a message is available to be received from socket
rc = zmq_msg_recv (socket, &part, 0);
assert (rc != -1);
if (zmq_msg_more (&part))
fprintf (stderr, "more\n");
else {
fprintf (stderr, "end\n");
break;
}
zmq_msg_close (&part);
}
look at that loop just vibing until it hits the end. iconic. π
π SEE ALSO π
π§ AUTHORS π§
this page was written by the 0MQ community. π if you wanna make a change, please read the 0MQ Contribution Policy at http://www.zeromq.org/docs:contributing. bestie behavior fr fr.
and that's the whole page, periodt. this little gem came to you from 0MQ 4.3.5, dated 10/09/2023, filed under ZMQ_MSG_MORE(3). mwah, go forth and check your message parts π
ππ¦β¨
π¦ where this page comes from
- epel 10: zeromq 4.3.5-18.el10_0 Β· MPL-2.0 AND BSD-3-Clause AND MIT
- fedora 43: zeromq 4.3.5-22.fc43 Β· MPL-2.0 AND BSD-3-Clause AND MIT
- fedora 43: zeromq 4.3.5-22.fc43 Β· MPL-2.0 AND BSD-3-Clause AND MIT
- fedora 44: zeromq 4.3.5-22.fc43 Β· MPL-2.0 AND BSD-3-Clause AND MIT
- fedora 44: zeromq 4.3.5-22.fc43 Β· MPL-2.0 AND BSD-3-Clause AND MIT
- opensuse-leap 16.0: zeromq-devel 4.3.5-160000.2.2 Β· MPL-2.0
- opensuse-leap 16.0: zeromq-devel 4.3.5-160000.2.2 Β· MPL-2.0
- opensuse-leap 16.0: zeromq-devel 4.3.5-160000.2.2 Β· MPL-2.0
- opensuse-leap 16.0: zeromq-devel 4.3.5-160000.2.2 Β· MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms