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