1036
<h3 id="_zmq_mcast_loop_control_multicast_loopback">ZMQ_MCAST_LOOP: Control multicast loopback</h3><div style="clear:left"></div>
1038
<h3 id="_zmq_recovery_ivl_msec_set_multicast_recovery_interval_in_milliseconds">ZMQ_RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds</h3><div style="clear:left"></div>
1039
<div class="paragraph"><p>The <em>ZMQ_RECOVERY_IVL_MSEC</em> option shall set the recovery interval, specified
1040
in milliseconds (ms) for multicast transports using the specified <em>socket</em>.
1041
The recovery interval determines the maximum time in milliseconds that a
1042
receiver can be absent from a multicast group before unrecoverable data loss
1043
will occur.</p></div>
1044
<div class="paragraph"><p>A non-zero value of the <em>ZMQ_RECOVERY_IVL_MSEC</em> option will take precedence
1045
over the <em>ZMQ_RECOVERY_IVL</em> option, but since the default for the
1046
<em>ZMQ_RECOVERY_IVL_MSEC</em> is -1, the default is to use the <em>ZMQ_RECOVERY_IVL</em>
1047
option value.</p></div>
1048
<div class="admonitionblock">
1051
<div class="title">Caution</div>
1053
<td class="content">Exercise care when setting large recovery intervals as the data
1054
needed for recovery will be held in memory. For example, a 1 minute recovery
1055
interval at a data rate of 1Gbps requires a 7GB in-memory buffer.</td>
1058
<div class="hdlist"><table>
1060
<td class="hdlist1">
1064
<td class="hdlist2">
1065
<p style="margin-top: 0;">
1071
<td class="hdlist1">
1075
<td class="hdlist2">
1076
<p style="margin-top: 0;">
1082
<td class="hdlist1">
1086
<td class="hdlist2">
1087
<p style="margin-top: 0;">
1093
<td class="hdlist1">
1094
Applicable socket types
1097
<td class="hdlist2">
1098
<p style="margin-top: 0;">
1099
all, when using multicast transports
1104
<h3 id="_zmq_mcast_loop_control_multicast_loop_back">ZMQ_MCAST_LOOP: Control multicast loop-back</h3><div style="clear:left"></div>
1037
1105
<div class="paragraph"><p>The <em>ZMQ_MCAST_LOOP</em> option shall control whether data sent via multicast
1038
1106
transports using the specified <em>socket</em> can also be received by the sending
1039
host via loopback. A value of zero disables the loopback functionality, while
1040
the default value of 1 enables the loopback functionality. Leaving multicast
1041
loopback enabled when it is not required can have a negative impact on
1107
host via loop-back. A value of zero disables the loop-back functionality, while
1108
the default value of 1 enables the loop-back functionality. Leaving multicast
1109
loop-back enabled when it is not required can have a negative impact on
1042
1110
performance. Where possible, disable <em>ZMQ_MCAST_LOOP</em> in production
1043
1111
environments.</p></div>
1044
1112
<div class="hdlist"><table>
1260
<h3 id="_zmq_linger_set_linger_period_for_socket_shutdown">ZMQ_LINGER: Set linger period for socket shutdown</h3><div style="clear:left"></div>
1261
<div class="paragraph"><p>The <em>ZMQ_LINGER</em> option shall set the linger period for the specified <em>socket</em>.
1262
The linger period determines how long pending messages which have yet to be
1263
sent to a peer shall linger in memory after a socket is closed with
1264
<a href="zmq_close.html">zmq_close(3)</a>, and further affects the termination of the socket’s
1265
context with <a href="zmq_term.html">zmq_term(3)</a>. The following outlines the different
1266
behaviours:</p></div>
1267
<div class="ulist"><ul>
1270
The default value of <em>-1</em> specifies an infinite linger period. Pending
1271
messages shall not be discarded after a call to <em>zmq_close()</em>; attempting to
1272
terminate the socket’s context with <em>zmq_term()</em> shall block until all
1273
pending messages have been sent to a peer.
1278
The value of <em>0</em> specifies no linger period. Pending messages shall be
1279
discarded immediately when the socket is closed with <em>zmq_close()</em>.
1284
Positive values specify an upper bound for the linger period in milliseconds.
1285
Pending messages shall not be discarded after a call to <em>zmq_close()</em>;
1286
attempting to terminate the socket’s context with <em>zmq_term()</em> shall block
1287
until either all pending messages have been sent to a peer, or the linger
1288
period expires, after which any pending messages shall be discarded.
1290
<div class="hdlist"><table>
1292
<td class="hdlist1">
1296
<td class="hdlist2">
1297
<p style="margin-top: 0;">
1303
<td class="hdlist1">
1307
<td class="hdlist2">
1308
<p style="margin-top: 0;">
1314
<td class="hdlist1">
1318
<td class="hdlist2">
1319
<p style="margin-top: 0;">
1325
<td class="hdlist1">
1326
Applicable socket types
1329
<td class="hdlist2">
1330
<p style="margin-top: 0;">
1338
<h3 id="_zmq_reconnect_ivl_set_reconnection_interval">ZMQ_RECONNECT_IVL: Set reconnection interval</h3><div style="clear:left"></div>
1339
<div class="paragraph"><p>The <em>ZMQ_RECONNECT_IVL</em> option shall set the initial reconnection interval for
1340
the specified <em>socket</em>. The reconnection interval is the period ØMQ
1341
shall wait between attempts to reconnect disconnected peers when using
1342
connection-oriented transports.</p></div>
1343
<div class="admonitionblock">
1346
<div class="title">Note</div>
1348
<td class="content">The reconnection interval may be randomized by ØMQ to prevent
1349
reconnection storms in topologies with a large number of peers per socket.</td>
1352
<div class="hdlist"><table>
1354
<td class="hdlist1">
1358
<td class="hdlist2">
1359
<p style="margin-top: 0;">
1365
<td class="hdlist1">
1369
<td class="hdlist2">
1370
<p style="margin-top: 0;">
1376
<td class="hdlist1">
1380
<td class="hdlist2">
1381
<p style="margin-top: 0;">
1387
<td class="hdlist1">
1388
Applicable socket types
1391
<td class="hdlist2">
1392
<p style="margin-top: 0;">
1393
all, only for connection-oriented transports
1398
<h3 id="_zmq_reconnect_ivl_max_set_maximum_reconnection_interval">ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval</h3><div style="clear:left"></div>
1399
<div class="paragraph"><p>The <em>ZMQ_RECONNECT_IVL_MAX</em> option shall set the maximum reconnection interval
1400
for the specified <em>socket</em>. This is the maximum period ØMQ shall wait between
1401
attempts to reconnect. On each reconnect attempt, the previous interval shall be
1402
doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential
1403
backoff strategy. Default value means no exponential backoff is performed and
1404
reconnect interval calculations are only based on ZMQ_RECONNECT_IVL.</p></div>
1405
<div class="admonitionblock">
1408
<div class="title">Note</div>
1410
<td class="content">Values less than ZMQ_RECONNECT_IVL will be ignored.</td>
1413
<div class="hdlist"><table>
1415
<td class="hdlist1">
1419
<td class="hdlist2">
1420
<p style="margin-top: 0;">
1426
<td class="hdlist1">
1430
<td class="hdlist2">
1431
<p style="margin-top: 0;">
1437
<td class="hdlist1">
1441
<td class="hdlist2">
1442
<p style="margin-top: 0;">
1443
0 (only use ZMQ_RECONNECT_IVL)
1448
<td class="hdlist1">
1449
Applicable socket types
1452
<td class="hdlist2">
1453
<p style="margin-top: 0;">
1454
all, only for connection-oriented transports
1459
<h3 id="_zmq_backlog_set_maximum_length_of_the_queue_of_outstanding_connections">ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections</h3><div style="clear:left"></div>
1460
<div class="paragraph"><p>The <em>ZMQ_BACKLOG</em> option shall set the maximum length of the queue of
1461
outstanding peer connections for the specified <em>socket</em>; this only applies to
1462
connection-oriented transports. For details refer to your operating system
1463
documentation for the <em>listen</em> function.</p></div>
1464
<div class="hdlist"><table>
1466
<td class="hdlist1">
1470
<td class="hdlist2">
1471
<p style="margin-top: 0;">
1477
<td class="hdlist1">
1481
<td class="hdlist2">
1482
<p style="margin-top: 0;">
1488
<td class="hdlist1">
1492
<td class="hdlist2">
1493
<p style="margin-top: 0;">
1499
<td class="hdlist1">
1500
Applicable socket types
1503
<td class="hdlist2">
1504
<p style="margin-top: 0;">
1505
all, only for connection-oriented transports.
1193
1511
<h2 id="_return_value">RETURN VALUE</h2>
1194
1512
<div class="sectionbody">