changed option name. +documentation changes

This commit is contained in:
shripchenko 2013-05-24 07:09:53 -07:00
parent aec989fb5d
commit f805e4dd03
4 changed files with 9 additions and 7 deletions

View File

@ -421,19 +421,21 @@ Default value:: 0
Applicable socket types:: ZMQ_ROUTER
ZMQ_PROBE_NEW_PEERS: automatically send empty packet to every established connection
ZMQ_PROBE: automatically send empty packet to every established connection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sets the 'ROUTER' & 'DEALER' sockets behavior to automatically send an empty packet
Sets the compatible sockets behavior to automatically send an empty packet
to any new connection made (or accepted) by socket. It could help sockets to
auto discovery themself. It especially important in 'ROUTER' <-> 'ROUTER' connections
auto discovery them-self. It especially important in 'ROUTER' <-> 'ROUTER' connections
where it solves 'who will write first' problems.
NOTE: Don't set this options for sockets working with ZMQ_REP, ZMQ_REQ sockets.
It will interfere with their strict synchronous logic and framing.
[horizontal]
Option value type:: int
Option value unit:: 0, 1
Default value:: 0
Applicable socket types:: ZMQ_ROUTER, ZMQ_DEALER
Applicable socket types:: ZMQ_ROUTER, ZMQ_DEALER, ZMQ_REP, ZMQ_REQ
ZMQ_XPUB_VERBOSE: provide all subscription messages on XPUB sockets

View File

@ -274,7 +274,7 @@ ZMQ_EXPORT int zmq_msg_set (zmq_msg_t *msg, int option, int optval);
#define ZMQ_CURVE_SERVER 47
#define ZMQ_CURVE_PUBLICKEY 48
#define ZMQ_CURVE_SERVERKEY 49
#define ZMQ_PROBE_NEW_PEERS 50
#define ZMQ_PROBE 50
/* Message options */
#define ZMQ_MORE 1

View File

@ -65,7 +65,7 @@ int zmq::dealer_t::xsetsockopt (int option_, const void *optval_,
int value = is_int? *((int *) optval_): 0;
switch (option_) {
case ZMQ_PROBE_NEW_PEERS:
case ZMQ_PROBE:
if (is_int && value >= 0) {
probe_new_peers = value;
return 0;

View File

@ -95,7 +95,7 @@ int zmq::router_t::xsetsockopt (int option_, const void *optval_,
printf ("E: invalid option value (int=%d value=%d)\n", is_int, value);
break;
case ZMQ_PROBE_NEW_PEERS:
case ZMQ_PROBE:
if (is_int && value >= 0) {
probe_new_peers = value;
return 0;