ZeroMQ official address:http://api.zeromq.org/4-1:zmq_msg_copy
Zmq_msg_copy (3) ØMQ Manual-ømq/3.2.5
Name
Zmq_msg_copy-Copy the contents of one message into another message
Synopsis
int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);
Description
The Zmq_msg_copy () function copies the contents of the message object specified in SRC to the dest specified Message object. If there is data in the Dest, the original data will be released.
The function does not actually replicate data in implementation, but rather prioritizes the sharing of storage between SRC and dest. You should avoid using the zmq_msg_copy () function to copy a message and then modify its contents, which throws an unknown error. If you really want to implement hard copy, assign a new message and use the Zmq_msg_init_size () function to request a new message and copy its contents with memcpy ().
You should never directly manipulate the zmq_msg_t object directly, but instead use the ZMQ_MSG function family to do so.
Return value
If the Zmq_msg_move () function executes successfully, return 0. Otherwise, 1 is returned, and the value of errno is set to the value defined below.
Errors
Efault
The message is not available.
See Also
Zmq_msg_move (3) zmq_msg_init (3) zmq_msg_init_size (3) zmq_msg_init_data (3) zmq_msg_close (3) ZMQ (7)
Authors
THISØMQ manual page was written by Martin Sustrik <[email Protected]> and Martin Lucina <[email Protected]>.
WEB site design and content is copyright (c) 2007-2012 Imatix Corporation. Contact us for professional support. Site content licensed under the Creative Commons attribution-share alike 3.0 License. ØMQ is copyright (c) Copyright (c) 2007-2012 Imatix Corporation and Contributors. ØMQ is free software licensed under the LGPL. ØMQ, ZeroMQ, and 0MQ are trademarks of Imatix Corporation. Terms of Use-privacy
Policy
more ZeroMQ API :http://www.cnblogs.com/fengbohello/p/4230135.html
Translation: The Storm
Mail: [Email protected]
Zeromq interface function: zmq_msg_copy-Copy the contents of one message into another message