1ZMQ_MSG_COPY(3) 0MQ Manual ZMQ_MSG_COPY(3)
2
3
4
6 zmq_msg_copy - copy content of a message to another message
7
9 int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);
10
12 The zmq_msg_copy() function shall copy the message object referenced by
13 src to the message object referenced by dest. The original content of
14 dest, if any, shall be released.
15
16 Caution
17 The implementation may choose not to physically copy the message
18 content, rather to share the underlying buffer between src and
19 dest. Avoid modifying message content after a message has been
20 copied with zmq_msg_copy(), doing so can result in undefined
21 behaviour. If what you need is an actual hard copy, allocate a new
22 message using zmq_msg_init_size() and copy the message content
23 using memcpy().
24
25 Caution
26 Never access zmq_msg_t members directly, instead always use the
27 zmq_msg family of functions.
28
30 The zmq_msg_copy() function shall return zero if successful. Otherwise
31 it shall return -1 and set errno to one of the values defined below.
32
34 No errors are defined.
35
37 zmq_msg_move(3) zmq_msg_init(3) zmq_msg_init_size(3)
38 zmq_msg_init_data(3) zmq_msg_close(3) zmq(7)
39
41 This 0MQ manual page was written by Martin Sustrik
42 <sustrik@250bpm.com[1]> and Martin Lucina <mato@kotelna.sk[2]>.
43
45 1. sustrik@250bpm.com
46 mailto:sustrik@250bpm.com
47
48 2. mato@kotelna.sk
49 mailto:mato@kotelna.sk
50
51
52
530MQ 2.1.4 03/30/2011 ZMQ_MSG_COPY(3)