mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 23:51:04 +08:00
54 lines
758 B
Plaintext
54 lines
758 B
Plaintext
|
zmq_msg_size(3)
|
||
|
===============
|
||
|
|
||
|
|
||
|
NAME
|
||
|
----
|
||
|
zmq_msg_size - retrieves size of the message content
|
||
|
|
||
|
|
||
|
SYNOPSIS
|
||
|
--------
|
||
|
'size_t zmq_msg_size (zmq_msg_t *msg);'
|
||
|
|
||
|
|
||
|
DESCRIPTION
|
||
|
-----------
|
||
|
Returns size of the message data. Always use this function to get the size,
|
||
|
never use 'zmq_msg_t' members directly.
|
||
|
|
||
|
|
||
|
RETURN VALUE
|
||
|
------------
|
||
|
Size of the message data (bytes).
|
||
|
|
||
|
|
||
|
ERRORS
|
||
|
------
|
||
|
No errors are defined.
|
||
|
|
||
|
|
||
|
EXAMPLE
|
||
|
-------
|
||
|
----
|
||
|
zmq_msg_t msg;
|
||
|
rc = zmq_msg_init (&msg);
|
||
|
assert (rc == 0);
|
||
|
rc = zmq_recv (s, &msg, 0);
|
||
|
assert (rc == 0);
|
||
|
size_t msg_size = zmq_msg_size (&msg);
|
||
|
----
|
||
|
|
||
|
|
||
|
SEE ALSO
|
||
|
--------
|
||
|
linkzmq:zmq_msg_init[3]
|
||
|
linkzmq:zmq_msg_init_size[3]
|
||
|
linkzmq:zmq_msg_init_data[3]
|
||
|
linkzmq:zmq_msg_close[3]
|
||
|
|
||
|
|
||
|
AUTHOR
|
||
|
------
|
||
|
Martin Sustrik <sustrik at 250bpm dot com>
|