Commit 9858447f authored by Martin Sustrik's avatar Martin Sustrik

getsockopt documentation fixed

parent ac90b7e0
......@@ -20,7 +20,7 @@ specified by the 'option_name' argument for the 0MQ socket pointed to by the
'socket' argument, and store it in the buffer pointed to by the 'option_value'
argument. The 'option_len' argument is the size in bytes of the buffer pointed
to by 'option_value'; upon successful completion _zmq_getsockopt()_ shall
modify the 'option_value' argument to indicate the actual size of the option
modify the 'option_len' argument to indicate the actual size of the option
value stored in the buffer.
The following options can be retrieved with the _zmq_getsockopt()_ function:
......@@ -222,7 +222,8 @@ EXAMPLE
----
/* Retrieve high water mark into hwm */
int64_t hwm;
rc = zmq_getsockopt (socket, ZMQ_HWM, &hwm, sizeof hwm);
size_t hwm_size = sizeof (hwm);
rc = zmq_getsockopt (socket, ZMQ_HWM, &hwm, &hwm_size);
assert (rc == 0);
----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment