summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-06-15 08:01:43 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-06-15 08:01:43 +0200
commit9858447fad3260cb16b1f2e56a14cfe3db737a36 (patch)
tree142df8ba4285f56ad0786d24c666fbbf1128b0b6
parentac90b7e0ba497bfec09d7a69a2e01dc6d94a9c9a (diff)
getsockopt documentation fixed
-rw-r--r--doc/zmq_getsockopt.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt
index 7886eaf..0e4cfb5 100644
--- a/doc/zmq_getsockopt.txt
+++ b/doc/zmq_getsockopt.txt
@@ -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);
----