diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-05-31 06:11:42 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-05-31 06:11:42 +0200 |
commit | 3bb60da0d085b1089ddec4617fcd40f2cda88567 (patch) | |
tree | 3b63d553b602140e94e78ab0bef440708dd2e88a /doc/zmq_connect.txt | |
parent | 04fcd4d55b3b01e75d1d0d547987841811a2d610 (diff) | |
parent | da37c45b0c7200eea96118952e671972b71df4ce (diff) |
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'doc/zmq_connect.txt')
-rw-r--r-- | doc/zmq_connect.txt | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/doc/zmq_connect.txt b/doc/zmq_connect.txt index d31b87b..2bc8e4f 100644 --- a/doc/zmq_connect.txt +++ b/doc/zmq_connect.txt @@ -4,34 +4,36 @@ zmq_connect(3) NAME ---- -zmq_connect - connect a socket to a peer address +zmq_connect - connect a socket SYNOPSIS -------- -*int zmq_connect (void '*socket', const char '*address');* +*int zmq_connect (void '*socket', const char '*endpoint');* DESCRIPTION ----------- The _zmq_connect()_ function shall connect the socket referenced by the -'socket' argument to a peer address specified by the 'address' argument. +'socket' argument to the endpoint specified by the 'endpoint' argument. -The 'address' argument is a string consisting of two parts as follows: -'transport'`://`'endpoint'. The 'transport' part specifies the underlying -transport protocol to use. The meaning of the 'endpoint' part is specific to +The 'endpoint' argument is a string consisting of two parts as follows: +'transport'`://`'address'. The 'transport' part specifies the underlying +transport protocol to use. The meaning of the 'address' part is specific to the underlying transport protocol selected. The following transports are defined: +'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7] +'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7] 'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7] 'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7] -'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7] -'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7] -A single socket may be connected to an arbitrary number of peer addresses using -_zmq_connect()_, while also having an arbitrary number of local addresses -assigned to it using _zmq_bind()_. +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. 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 @@ -61,7 +63,7 @@ EXAMPLE /* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); -/* Connect it to an in-process transport with the endpoint 'my_publisher' */ +/* Connect it to an in-process transport with the address 'my_publisher' */ int rc = zmq_connect (socket, "inproc://my_publisher"); assert (rc == 0); /* Connect it to the host server001, port 5555 using a TCP transport */ |