Zeromq interface function: zmq_msg_copy-Copy the contents of one message into another message

Source: Internet
Author: User
Tags creative commons attribution

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.