ZMQ_MSG_MOVE(3)
π ZMQ_MSG_MOVE(3) β the 0MQ manual, but make it cute
okay bestie, welcome to the 0MQ manual page for zmq_msg_move, and no this is not a drill, we're moving message content around and it's gonna be so clean β¨
β¨ NAME β¨
zmq_msg_move β move content of a message to another message π«Ά
the vibe? you got two message objects and you're handing the goods from one to the other. no duplicating, no messy copies, just a lil handoff. iconic behavior honestly.
πΈ SYNOPSIS πΈ
int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src);
two pointers, one function call, zero drama (until the error section, but we'll get there π₯²).
π¦ DESCRIPTION π¦
so here's the tea, bestie. The zmq_msg_move() function shall move the content of the message object referenced by src to the message object referenced by dest.
and the way that it does this?? no actual copying of message content is performed β dest is simply updated to reference the new content. it's giving "you're not carrying the box, you're just changing who's holding it" energy π
src becomes an empty message after calling zmq_msg_move(). yes, fr fr, emptied out. ghosted. the content has left the building.
and the original content of dest, if any, shall be released. it's not being saved, it's not being stored, it's just gone. say goodbye π
Caution π¨ Never accesszmq_msg_tmembers directly, instead always use thezmq_msgfamily of functions. like literally never. do not touch the internals. do not peek. use the functions, they exist for a reason, i am begging you π
β RETURN VALUE β
The zmq_msg_move() function shall return zero if successful. otherwise it shall return -1 and set errno to one of the values defined below. slay when it works, -1 when it doesn't, and errno will tell you exactly what went wrong π
π ERRORS π
EFAULTβ Invalid message. π
that's the whole list bestie, one singular error, very low-maintenance of it honestly.
π SEE ALSO π
zmq_msg_copy(3)zmq_msg_init(3)zmq_msg_init_size(3)zmq_msg_init_buffer(3)zmq_msg_init_data(3)zmq_msg_close(3)zmq(7)
the whole zmq_msg friend group, go say hi to all of them π«Ά
π AUTHORS π
This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at http://www.zeromq.org/docs:contributing.
community-written, community-loved, and if you wanna contribute you absolutely can, the door is open, come through πͺβ¨
and that's the whole page bestie!! this was 0MQ version 4.3.5, dated 10/09/2023, brought to you from the 0MQ Manual β mwah, love u, go move some messages responsibly π
π¦ 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