summaryrefslogtreecommitdiff
path: root/doc/zmq_getsockopt.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/zmq_getsockopt.txt')
-rw-r--r--doc/zmq_getsockopt.txt87
1 files changed, 86 insertions, 1 deletions
diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt
index 1e36a2a..40a99b1 100644
--- a/doc/zmq_getsockopt.txt
+++ b/doc/zmq_getsockopt.txt
@@ -26,6 +26,19 @@ value stored in the buffer.
The following options can be retrieved with the _zmq_getsockopt()_ function:
+ZMQ_TYPE: Retrieve socket type.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The 'ZMQ_TYPE' option shall retrieve the socket type for the specified
+'socket'. The socket type is specified at socket creation time and
+cannot be modified afterwards.
+
+[horizontal]
+Option value type:: int
+Option value unit:: N/A
+Default value:: N/A
+Applicable socket types:: all
+
+
ZMQ_RCVMORE: More message parts to follow
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RCVMORE' option shall return a boolean value indicating if the
@@ -108,7 +121,7 @@ Applicable socket types:: N/A
ZMQ_IDENTITY: Retrieve socket identity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_IDENTITY' option shall retrieve the identity of the specified
-'socket'. Socket identity determines if existing 0MQ infastructure (_message
+'socket'. Socket identity determines if existing 0MQ infrastructure (_message
queues_, _forwarding devices_) shall be identified with a specific application
and persist across multiple runs of the application.
@@ -199,6 +212,76 @@ Default value:: 0
Applicable socket types:: all
+ZMQ_LINGER: Retrieve linger period for socket shutdown
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The 'ZMQ_LINGER' option shall retrieve the period for pending outbound
+messages to linger in memory after closing the socket. Value of -1 means
+infinite. Pending messages will be kept until they are fully transferred to
+the peer. Value of 0 means that all the pending messages are dropped immediately
+when socket is closed. Positive value means number of milliseconds to keep
+trying to send the pending messages before discarding them.
+
+[horizontal]
+Option value type:: int
+Option value unit:: milliseconds
+Default value:: -1
+Applicable socket types:: all
+
+ZMQ_RECONNECT_IVL: Retrieve reconnect period for connection-based transports
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The 'ZMQ_RECONNECT_IVL' option shall retrieve the period indicating how long it
+takes for a disconnected underlying connection to attempt to reconnect.
+
+[horizontal]
+Option value type:: int
+Option value unit:: milliseconds
+Default value:: 100
+Applicable socket types:: all
+
+
+ZMQ_BACKLOG: Retrieve maximum length of the queue of pending connections
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The 'ZMQ_BACKLOG' option shall retrieve maximum size of the
+pending connection backlog for connection-based transports. For details
+refer to your operating system documentation for the 'listen' function.
+
+[horizontal]
+Option value type:: int
+Option value unit:: connections
+Default value:: 100
+Applicable socket types:: all
+
+
+ZMQ_FD: Retrieve file descriptor associated with the socket
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The 'ZMQ_FD' option shall retrieve file descriptor associated with the 0MQ
+socket. The descriptor can be used to integrate 0MQ socket into an existing
+event loop. It should never be used for anything else than polling -- such as
+reading or writing. The descriptor signals edge-triggered IN event when
+something has happened within the 0MQ socket. It does not necessarily mean that
+the messages can be read or written. Check ZMQ_EVENTS option to find out whether
+the 0MQ socket is readable or writeable.
+
+[horizontal]
+Option value type:: int on POSIX systems, SOCKET on Windows
+Option value unit:: N/A
+Default value:: N/A
+Applicable socket types:: all
+
+
+ZMQ_EVENTS: Check whether socket is readable and/or writeable
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The 'ZMQ_EVENTS' option shall retrieve event flags for the specified socket.
+If a message can be read from the socket ZMQ_POLLIN flag is set. If message can
+be written to the socket ZMQ_POLLOUT flag is set.
+
+[horizontal]
+Option value type:: uint32_t
+Option value unit:: N/A (flags)
+Default value:: N/A
+Applicable socket types:: all
+
+
RETURN VALUE
------------
The _zmq_getsockopt()_ function shall return zero if successful. Otherwise it
@@ -216,6 +299,8 @@ option value.
The 0MQ 'context' associated with the specified 'socket' was terminated.
*EFAULT*::
The provided 'socket' was not valid (NULL).
+*EINTR*::
+The operation was interrupted by delivery of a signal.
EXAMPLE