7
zmq_msg_copy - copy content of a message to another message
12
*int zmq_msg_copy (zmq_msg_t '*dest', zmq_msg_t '*src');*
17
The _zmq_msg_copy()_ function shall copy the message object referenced by 'src'
18
to the message object referenced by 'dest'. The original content of 'dest', if
19
any, shall be released.
21
CAUTION: The implementation may choose not to physically copy the message
22
content, rather to share the underlying buffer between 'src' and 'dest'. Avoid
23
modifying message content after a message has been copied with
24
_zmq_msg_copy()_, doing so can result in undefined behaviour. If what you need
25
is an actual hard copy, allocate a new message using _zmq_msg_init_size()_ and
26
copy the message content using _memcpy()_.
28
CAUTION: Never access 'zmq_msg_t' members directly, instead always use the
29
_zmq_msg_ family of functions.
34
The _zmq_msg_copy()_ function shall return zero if successful. Otherwise it
35
shall return `-1` and set 'errno' to one of the values defined below.
46
linkzmq:zmq_msg_move[3]
47
linkzmq:zmq_msg_init[3]
48
linkzmq:zmq_msg_init_size[3]
49
linkzmq:zmq_msg_init_data[3]
50
linkzmq:zmq_msg_close[3]
56
The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
57
Martin Lucina <martin@lucina.net>.