From 8ad0d5896eeb0e43f13aaaca04aff8631e5b84c7 Mon Sep 17 00:00:00 2001 From: Bill Torpey Date: Tue, 22 May 2018 11:05:32 -0400 Subject: [PATCH] =?UTF-8?q?prevent=20duplicate=20connections=20from=20PUB?= =?UTF-8?q?=20sockets=20also=20(see=20https://gith=E2=80=A6=20(#3117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update zmq_connect documentation to mention issue of multiple connects to the same endpoint --- doc/zmq_connect.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/zmq_connect.txt b/doc/zmq_connect.txt index 398d20e1..f23e7af6 100644 --- a/doc/zmq_connect.txt +++ b/doc/zmq_connect.txt @@ -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 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 ------------ The _zmq_connect()_ function returns zero if successful. Otherwise it returns