zmq_msg_init_size.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. zmq_msg_init_size(3)
  2. ====================
  3. NAME
  4. ----
  5. zmq_msg_init_size - initialise 0MQ message of a specified size
  6. SYNOPSIS
  7. --------
  8. *int zmq_msg_init_size (zmq_msg_t '*msg', size_t 'size');*
  9. DESCRIPTION
  10. -----------
  11. The _zmq_msg_init_size()_ function shall allocate any resources required to
  12. store a message 'size' bytes long and initialise the message object referenced
  13. by 'msg' to represent the newly allocated message.
  14. The implementation shall choose whether to store message content on the stack
  15. (small messages) or on the heap (large messages). For performance reasons
  16. _zmq_msg_init_size()_ shall not clear the message data.
  17. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the
  18. _zmq_msg_ family of functions.
  19. CAUTION: The functions _zmq_msg_init()_, _zmq_msg_init_data()_,
  20. _zmq_msg_init_size()_ and _zmq_msg_init_buffer()_ are mutually exclusive.
  21. Never initialise the same 'zmq_msg_t' twice.
  22. RETURN VALUE
  23. ------------
  24. The _zmq_msg_init_size()_ function shall return zero if successful. Otherwise
  25. it shall return `-1` and set 'errno' to one of the values defined below.
  26. ERRORS
  27. ------
  28. *ENOMEM*::
  29. Insufficient storage space is available.
  30. SEE ALSO
  31. --------
  32. linkzmq:zmq_msg_init_data[3]
  33. linkzmq:zmq_msg_init_buffer[3]
  34. linkzmq:zmq_msg_init[3]
  35. linkzmq:zmq_msg_close[3]
  36. linkzmq:zmq_msg_data[3]
  37. linkzmq:zmq_msg_size[3]
  38. linkzmq:zmq[7]
  39. AUTHORS
  40. -------
  41. This page was written by the 0MQ community. To make a change please
  42. read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.