Commit 8ad0d589 authored by Bill Torpey's avatar Bill Torpey Committed by Luca Boccassi

prevent duplicate connections from PUB sockets also (see https://gith… (#3117)

* Update zmq_connect documentation to mention issue of multiple connects to the same endpoint
parent c178193c
...@@ -49,6 +49,14 @@ linkzmq:zmq_socket[3]. A ZMQ_ROUTER socket enters its normal 'ready' state ...@@ -49,6 +49,14 @@ linkzmq:zmq_socket[3]. A ZMQ_ROUTER socket enters its normal 'ready' state
for a specific peer only when handshaking is complete for that peer, which for a specific peer only when handshaking is complete for that peer, which
may take an arbitrary time. may take an arbitrary time.
NOTE: for some socket types, multiple connections to the same endpoint
don't really make sense
(see https://github.com/zeromq/libzmq/issues/788).
For those socket types, any attempt to connect to an already connected endpoint
is silently ignored (i.e., returns zero). This behavior applies to ZMQ_DEALER,
ZMQ_SUB, ZMQ_PUB, and ZMQ_REQ socket types.
RETURN VALUE RETURN VALUE
------------ ------------
The _zmq_connect()_ function returns zero if successful. Otherwise it returns The _zmq_connect()_ function returns zero if successful. Otherwise it returns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment