Skip to content

Commit

Permalink
Merge pull request #372 from ianbarber/manfix
Browse files Browse the repository at this point in the history
Update bind and connect documentation for clarity
  • Loading branch information
hintjens committed Jun 12, 2012
2 parents 95cbad3 + 704b952 commit e1cc2d4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
12 changes: 7 additions & 5 deletions doc/zmq_bind.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ The following transports are defined:
'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7]
'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7]

With the exception of 'ZMQ_PAIR' sockets, a single socket may be connected to
multiple endpoints using _zmq_connect()_, while simultaneously accepting
incoming connections from multiple endpoints bound to the socket using
_zmq_bind()_. Refer to linkzmq:zmq_socket[3] for a description of the exact
semantics involved when connecting or binding a socket to multiple endpoints.
ZeroMQ sockets support one-to-many and many-to-one semantics. With the exception
of 'ZMQ_PAIR' sockets every ZeroMQ socket type supports being bound with
_zmq_bind()_ as a singular endpoint or connecting with _zmq_connect()_ as one
of many endpoints. This allows combinations such as 1 ZMQ_REP to 100 ZMQ_REP and
100 ZMQ_REQ to 1 ZMQ_REP socket connections. Refer to linkzmq:zmq_socket[3] for
a description of the exact semantics involved when connecting or binding a socket
to multiple endpoints.


RETURN VALUE
Expand Down
18 changes: 12 additions & 6 deletions doc/zmq_connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,21 @@ The following transports are defined:
'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7]
'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7]

With the exception of 'ZMQ_PAIR' sockets, a single socket may be connected to
multiple endpoints using _zmq_connect()_, while simultaneously accepting
incoming connections from multiple endpoints bound to the socket using
_zmq_bind()_. Refer to linkzmq:zmq_socket[3] for a description of the exact
semantics involved when connecting or binding a socket to multiple endpoints.
ZeroMQ sockets support one-to-many and many-to-one semantics. With the exception
of 'ZMQ_PAIR' sockets every ZeroMQ socket type supports being bound with
_zmq_bind()_ as a singular endpoint or connecting with _zmq_connect()_ as one
of many endpoints. This allows combinations such as 1 ZMQ_REP to 100 ZMQ_REP and
100 ZMQ_REQ to 1 ZMQ_REP socket connections. Refer to linkzmq:zmq_socket[3] for
a description of the exact semantics involved when connecting or binding a socket
to multiple endpoints.

NOTE: The connection will not be performed immediately but as needed by 0MQ.
Thus a successful invocation of _zmq_connect()_ does not indicate that a
physical connection was or can actually be established.
physical connection was or can actually be established. Because of this, for most
socket types the order in which a listening socket is bound and a connecting socket
is connected does not matter. However, for inproc:// scheme sockets, the zmq_bind()
must be executed before any sockets zmq_connect() to that endpoint. Refer to
linkzmq:zmq_inproc[7] for more details.


RETURN VALUE
Expand Down

0 comments on commit e1cc2d4

Please sign in to comment.