From 9858447fad3260cb16b1f2e56a14cfe3db737a36 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 15 Jun 2010 08:01:43 +0200 Subject: getsockopt documentation fixed --- doc/zmq_getsockopt.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/zmq_getsockopt.txt') 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); ---- -- cgit v1.2.3