diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/zmq_getsockopt.txt | 5 |
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); ---- |