Zeromq interface function: Zmq_msg_init_size-Initializes a ZMQ message object with a specified space size

Source: Internet
Author: User
Tags creative commons attribution

ZeroMQ official address:http://api.zeromq.org/4-1:zmq_msg_init_size

Zmq_msg_init_size (3) ØMQ Manual-ømq/3.2.5

Name

Zmq_msg_init_size-initializes the ZMQ Message Object with a specified space size

Synopsis

int zmq_msg_init_size (zmq_msg_t *msg, size_t size);

Description

The zmq_msg_init_size () function allocates any requested resource to store a size byte message, and initializes The message specified by the MSG parameter. Used to represent the newly assigned message.

When the function executes, it will choose whether to store the message in the stack (small message) or in the heap (Big message). For performance reasons, thezmq_msg_init_size () function does not clear the message data.

You should never directly manipulate the zmq_msg_t object directly, but instead use the zmq_msg function family to do so.

The three functions of Zmq_msg_init (),zmq_msg_init_data () , and zmq_msg_init_size () are mutually exclusive. Never initialize a zmq_msg_t object two of times.

Return value

function zmq_msg_init_size () returns 0 when execution succeeds . Otherwise , 1is returned, and the value of errno is set to the value defined below.

Errors

  Enomem

There is not enough storage space.

See Also

Zmq_msg_init_data (3) zmq_msg_init (3) zmq_msg_close (3) zmq_msg_data (3) zmq_msg_size (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_init_size-Initializes a ZMQ message object with a specified space size

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.