From 56619463ac26dc6c3e576d2fbf6b544eebeb5148 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Sun, 20 May 2012 11:24:59 +0200 Subject: Imported Upstream version 2.2.0 --- doc/zmq_setsockopt.html | 335 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 252 insertions(+), 83 deletions(-) (limited to 'doc/zmq_setsockopt.html') diff --git a/doc/zmq_setsockopt.html b/doc/zmq_setsockopt.html index d3b17ca..5467997 100644 --- a/doc/zmq_setsockopt.html +++ b/doc/zmq_setsockopt.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_setsockopt(3) - +
+

SYNOPSIS

int zmq_setsockopt (void *socket, int option_name, const void *option_value, size_t option_len);

Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE and ZMQ_LINGER, only take effect for subsequent socket bind/connects.

+
+

DESCRIPTION

The zmq_setsockopt() function shall set the option specified by the @@ -593,7 +612,8 @@ ZMQ_LINGER, only take effect for subsequent socket bind/connects.

for the ØMQ socket pointed to by the socket argument. The option_len argument is the size of the option value in bytes.

The following socket options can be set with the zmq_setsockopt() function:

-

ZMQ_HWM: Set high water mark

+
+

ZMQ_HWM: Set high water mark

The ZMQ_HWM option shall set the high water mark for the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the specified @@ -650,7 +670,9 @@ all

-

ZMQ_SWAP: Set disk offload size

+
+
+

ZMQ_SWAP: Set disk offload size

The ZMQ_SWAP option shall set the disk offload (swap) size for the specified socket. A socket which has ZMQ_SWAP set to a non-zero value may exceed its high water mark; in this case outstanding messages shall be offloaded to @@ -702,7 +724,9 @@ all

-

ZMQ_AFFINITY: Set I/O thread affinity

+
+
+

ZMQ_AFFINITY: Set I/O thread affinity

The ZMQ_AFFINITY option shall set the I/O thread affinity for newly created connections on the specified socket.

Affinity determines which threads from the ØMQ I/O thread pool associated with @@ -760,7 +784,9 @@ N/A

-

ZMQ_IDENTITY: Set socket identity

+
+
+

ZMQ_IDENTITY: Set socket identity

The ZMQ_IDENTITY option shall set the identity of the specified socket. Socket identity determines if existing ØMQ infrastructure (message queues, forwarding devices) shall be identified with a specific application and @@ -818,7 +844,9 @@ all

-

ZMQ_SUBSCRIBE: Establish message filter

+
+
+

ZMQ_SUBSCRIBE: Establish message filter

The ZMQ_SUBSCRIBE option shall establish a new message filter on a ZMQ_SUB socket. Newly created ZMQ_SUB sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter.

@@ -873,7 +901,9 @@ ZMQ_SUB
-

ZMQ_UNSUBSCRIBE: Remove message filter

+
+
+

ZMQ_UNSUBSCRIBE: Remove message filter

The ZMQ_UNSUBSCRIBE option shall remove an existing message filter on a ZMQ_SUB socket. The filter specified must match an existing filter previously established with the ZMQ_SUBSCRIBE option. If the socket has several @@ -925,7 +955,117 @@ ZMQ_SUB

-

ZMQ_RATE: Set multicast data rate

+
+
+

ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN

+

Sets the timeout for receive operation on the socket. If the value is 0, +zmq_recv(3) will return immediately, with a EAGAIN error if there is no +message to receive. If the value is -1, it will block until a message is +available. For all other values, it will wait for a message for that amount +of time before returning with an EAGAIN error.

+
+ + + + + + + + + + + + + + + + +
+Option value type +
+
+

+int +

+
+Option value unit +
+
+

+milliseconds +

+
+Default value +
+
+

+-1 (infinite) +

+
+Applicable socket types +
+
+

+all +

+
+
+
+

ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN

+

Sets the timeout for send operation on the socket. If the value is 0, +zmq_send(3) will return immediately, with a EAGAIN error if the message +cannot be sent. If the value is -1, it will block until the message is sent. +For all other values, it will try to send the message for that amount of time +before returning with an EAGAIN error.

+
+ + + + + + + + + + + + + + + + +
+Option value type +
+
+

+int +

+
+Option value unit +
+
+

+milliseconds +

+
+Default value +
+
+

+-1 (infinite) +

+
+Applicable socket types +
+
+

+all +

+
+
+
+

ZMQ_RATE: Set multicast data rate

The ZMQ_RATE option shall set the maximum send or receive data rate for multicast transports such as zmq_pgm(7) using the specified socket.

@@ -974,7 +1114,9 @@ all, when using multicast transports
-

ZMQ_RECOVERY_IVL: Set multicast recovery interval

+
+
+

ZMQ_RECOVERY_IVL: Set multicast recovery interval

The ZMQ_RECOVERY_IVL option shall set the recovery interval for multicast transports using the specified socket. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group @@ -1035,7 +1177,9 @@ all, when using multicast transports

-

ZMQ_RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds

+
+
+

ZMQ_RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds

The ZMQ_RECOVERY_IVL_MSEC option shall set the recovery interval, specified in milliseconds (ms) for multicast transports using the specified socket. The recovery interval determines the maximum time in milliseconds that a @@ -1101,7 +1245,9 @@ all, when using multicast transports

-

ZMQ_MCAST_LOOP: Control multicast loop-back

+
+
+

ZMQ_MCAST_LOOP: Control multicast loop-back

The ZMQ_MCAST_LOOP option shall control whether data sent via multicast transports using the specified socket can also be received by the sending host via loop-back. A value of zero disables the loop-back functionality, while @@ -1155,7 +1301,9 @@ all, when using multicast transports

-

ZMQ_SNDBUF: Set kernel transmit buffer size

+
+
+

ZMQ_SNDBUF: Set kernel transmit buffer size

The ZMQ_SNDBUF option shall set the underlying kernel transmit buffer size for the socket to the specified size in bytes. A value of zero means leave the OS default unchanged. For details please refer to your operating system @@ -1206,7 +1354,9 @@ all

-

ZMQ_RCVBUF: Set kernel receive buffer size

+
+
+

ZMQ_RCVBUF: Set kernel receive buffer size

The ZMQ_RCVBUF option shall set the underlying kernel receive buffer size for the socket to the specified size in bytes. A value of zero means leave the OS default unchanged. For details refer to your operating system documentation @@ -1257,7 +1407,9 @@ all

-

ZMQ_LINGER: Set linger period for socket shutdown

+
+
+

ZMQ_LINGER: Set linger period for socket shutdown

The ZMQ_LINGER option shall set the linger period for the specified socket. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with @@ -1335,7 +1487,9 @@ all

-

ZMQ_RECONNECT_IVL: Set reconnection interval

+
+
+

ZMQ_RECONNECT_IVL: Set reconnection interval

The ZMQ_RECONNECT_IVL option shall set the initial reconnection interval for the specified socket. The reconnection interval is the period ØMQ shall wait between attempts to reconnect disconnected peers when using @@ -1395,7 +1549,9 @@ all, only for connection-oriented transports

-

ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval

+
+
+

ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval

The ZMQ_RECONNECT_IVL_MAX option shall set the maximum reconnection interval for the specified socket. This is the maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be @@ -1456,7 +1612,9 @@ all, only for connection-oriented transports

-

ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections

+
+
+

ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections

The ZMQ_BACKLOG option shall set the maximum length of the queue of outstanding peer connections for the specified socket; this only applies to connection-oriented transports. For details refer to your operating system @@ -1508,11 +1666,16 @@ all, only for connection-oriented transports.

+ + +

RETURN VALUE

The zmq_setsockopt() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

+
+

ERRORS

@@ -1551,6 +1714,8 @@ The operation was interrupted by delivery of a signal.
+
+

EXAMPLE

@@ -1580,23 +1745,27 @@ rc = zmq_bind (socket, "tcp://lo:5556"); assert (rc);
+ +

SEE ALSO

+
+

AUTHORS

-

This ØMQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and -Martin Lucina <mato@kotelna.sk>.

+

This manual page was written by the ØMQ community.

+

-- cgit v1.2.3