mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 10:33:52 +01:00
Problem: docs refer to "Identity"
Solution: change docs to refer to "Routing id"
This commit is contained in:
parent
fab57634b4
commit
12f62c74c1
@ -289,7 +289,7 @@ ZMQ_HANDSHAKE_IVL: Retrieve maximum handshake interval
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_HANDSHAKE_IVL' option shall retrieve the maximum handshake interval
|
||||
for the specified 'socket'. Handshaking is the exchange of socket configuration
|
||||
information (socket type, identity, security) that occurs when a connection
|
||||
information (socket type, routing id, security) that occurs when a connection
|
||||
is first opened, only for connection-oriented transports. If handshaking does
|
||||
not complete within the configured time, the connection shall be closed.
|
||||
The value 0 means no handshake time limit.
|
||||
@ -303,20 +303,8 @@ Applicable socket types:: all but ZMQ_STREAM, only for connection-oriented trans
|
||||
|
||||
ZMQ_IDENTITY: Retrieve socket identity
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_IDENTITY' option shall retrieve the identity of the specified 'socket'.
|
||||
Socket identity is used only by request/reply pattern. Namely, it can be used
|
||||
in tandem with ROUTER socket to route messages to the peer with specific
|
||||
identity.
|
||||
|
||||
Identity should be at least one byte and at most 255 bytes long. Identities
|
||||
starting with binary zero are reserved for use by 0MQ infrastructure.
|
||||
|
||||
[horizontal]
|
||||
Option value type:: binary data
|
||||
Option value unit:: N/A
|
||||
Default value:: NULL
|
||||
Applicable socket types:: ZMQ_REP, ZMQ_REQ, ZMQ_ROUTER, ZMQ_DEALER.
|
||||
|
||||
This option name is now deprecated. Use ZMQ_ROUTING_ID instead.
|
||||
ZMQ_IDENTITY remains as an alias for now.
|
||||
|
||||
ZMQ_IMMEDIATE: Retrieve attach-on-connect value
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -656,6 +644,23 @@ Default value:: 10000
|
||||
Applicable socket types:: all, when using multicast transports
|
||||
|
||||
|
||||
ZMQ_ROUTING_ID: Retrieve socket routing id
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_ROUTING_ID' option shall retrieve the routing id of the specified 'socket'.
|
||||
Routing ids are used only by the request/reply pattern. Specifically, it can be used
|
||||
in tandem with ROUTER socket to route messages to the peer with a specific
|
||||
routing id.
|
||||
|
||||
A routing id must be at least one byte and at most 255 bytes long. Identities
|
||||
starting with a zero byte are reserved for use by the 0MQ infrastructure.
|
||||
|
||||
[horizontal]
|
||||
Option value type:: binary data
|
||||
Option value unit:: N/A
|
||||
Default value:: NULL
|
||||
Applicable socket types:: ZMQ_REP, ZMQ_REQ, ZMQ_ROUTER, ZMQ_DEALER.
|
||||
|
||||
|
||||
ZMQ_SNDBUF: Retrieve kernel transmit buffer size
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_SNDBUF' option shall retrieve the underlying kernel transmit buffer
|
||||
|
@ -26,14 +26,16 @@ The following ZMTP properties can be retrieved with the _zmq_msg_gets()_
|
||||
function:
|
||||
|
||||
Socket-Type
|
||||
Identity
|
||||
Routing-Id
|
||||
|
||||
Note: 'Identity' is a deprecated alias for 'Routing-Id'.
|
||||
|
||||
Additionally, when available for the underlying transport, the *Peer-Address*
|
||||
property will return the IP address of the remote endpoint as returned by
|
||||
getnameinfo(2).
|
||||
|
||||
The names of these properties are also defined in _zmq.h_ as
|
||||
_ZMQ_MSG_PROPERTY_SOCKET_TYPE_ _ZMQ_MSG_PROPERTY_IDENTITY_, and
|
||||
_ZMQ_MSG_PROPERTY_SOCKET_TYPE_ _ZMQ_MSG_PROPERTY_ROUTING_ID_, and
|
||||
_ZMQ_MSG_PROPERTY_PEER_ADDRESS_.
|
||||
Currently, these definitions are only available as a DRAFT API.
|
||||
|
||||
|
@ -305,7 +305,7 @@ ZMQ_HANDSHAKE_IVL: Set maximum handshake interval
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_HANDSHAKE_IVL' option shall set the maximum handshake interval for
|
||||
the specified 'socket'. Handshaking is the exchange of socket configuration
|
||||
information (socket type, identity, security) that occurs when a connection
|
||||
information (socket type, routing id, security) that occurs when a connection
|
||||
is first opened, only for connection-oriented transports. If handshaking does
|
||||
not complete within the configured time, the connection shall be closed.
|
||||
The value 0 means no handshake time limit.
|
||||
@ -364,22 +364,8 @@ Applicable socket types:: all, when using connection-oriented transports
|
||||
|
||||
ZMQ_IDENTITY: Set socket identity
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_IDENTITY' option shall set the identity of the specified 'socket'
|
||||
when connecting to a ROUTER socket. The identity should be from 1 to 255
|
||||
bytes long and may contain any values.
|
||||
|
||||
If two clients use the same identity when connecting to a ROUTER, the
|
||||
results shall depend on the ZMQ_ROUTER_HANDOVER option setting. If that
|
||||
is not set (or set to the default of zero), the ROUTER socket shall reject
|
||||
clients trying to connect with an already-used identity. If that option
|
||||
is set to 1, the ROUTER socket shall hand-over the connection to the new
|
||||
client and disconnect the existing one.
|
||||
|
||||
[horizontal]
|
||||
Option value type:: binary data
|
||||
Option value unit:: N/A
|
||||
Default value:: NULL
|
||||
Applicable socket types:: ZMQ_REQ, ZMQ_REP, ZMQ_ROUTER, ZMQ_DEALER.
|
||||
This option name is now deprecated. Use ZMQ_ROUTING_ID instead.
|
||||
ZMQ_IDENTITY remains as an alias for now.
|
||||
|
||||
|
||||
ZMQ_IMMEDIATE: Queue messages only to completed connections
|
||||
@ -737,12 +723,12 @@ Default value:: 0
|
||||
Applicable socket types:: ZMQ_REQ
|
||||
|
||||
|
||||
ZMQ_ROUTER_HANDOVER: handle duplicate client identities on ROUTER sockets
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
If two clients use the same identity when connecting to a ROUTER, the
|
||||
ZMQ_ROUTER_HANDOVER: handle duplicate client routing ids on ROUTER sockets
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
If two clients use the same routing id when connecting to a ROUTER, the
|
||||
results shall depend on the ZMQ_ROUTER_HANDOVER option setting. If that
|
||||
is not set (or set to the default of zero), the ROUTER socket shall reject
|
||||
clients trying to connect with an already-used identity. If that option
|
||||
clients trying to connect with an already-used routing id. If that option
|
||||
is set to 1, the ROUTER socket shall hand-over the connection to the new
|
||||
client and disconnect the existing one.
|
||||
|
||||
@ -782,7 +768,7 @@ raw mode, and when using the tcp:// transport, it will read and write TCP data
|
||||
without 0MQ framing. This lets 0MQ applications talk to non-0MQ applications.
|
||||
When using raw mode, you cannot set explicit identities, and the ZMQ_SNDMORE
|
||||
flag is ignored when sending data messages. In raw mode you can close a specific
|
||||
connection by sending it a zero-length message (following the identity frame).
|
||||
connection by sending it a zero-length message (following the routing id frame).
|
||||
|
||||
NOTE: This option is deprecated, please use ZMQ_STREAM sockets instead.
|
||||
|
||||
@ -793,6 +779,28 @@ Default value:: 0
|
||||
Applicable socket types:: ZMQ_ROUTER
|
||||
|
||||
|
||||
ZMQ_ROUTING_ID: Set socket routing id
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_ROUTING_ID' option shall set the routing id of the specified 'socket'
|
||||
when connecting to a ROUTER socket.
|
||||
|
||||
A routing id must be at least one byte and at most 255 bytes long. Identities
|
||||
starting with a zero byte are reserved for use by the 0MQ infrastructure.
|
||||
|
||||
If two clients use the same routing id when connecting to a ROUTER, the
|
||||
results shall depend on the ZMQ_ROUTER_HANDOVER option setting. If that
|
||||
is not set (or set to the default of zero), the ROUTER socket shall reject
|
||||
clients trying to connect with an already-used routing id. If that option
|
||||
is set to 1, the ROUTER socket shall hand-over the connection to the new
|
||||
client and disconnect the existing one.
|
||||
|
||||
[horizontal]
|
||||
Option value type:: binary data
|
||||
Option value unit:: N/A
|
||||
Default value:: NULL
|
||||
Applicable socket types:: ZMQ_REQ, ZMQ_REP, ZMQ_ROUTER, ZMQ_DEALER.
|
||||
|
||||
|
||||
ZMQ_SNDBUF: Set kernel transmit buffer size
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
The 'ZMQ_SNDBUF' option shall set the underlying kernel transmit buffer size
|
||||
|
@ -383,26 +383,26 @@ non-0MQ peer, when using the tcp:// transport. A 'ZMQ_STREAM' socket can
|
||||
act as client and/or server, sending and/or receiving TCP data asynchronously.
|
||||
|
||||
When receiving TCP data, a 'ZMQ_STREAM' socket shall prepend a message part
|
||||
containing the _identity_ of the originating peer to the message before passing
|
||||
containing the _routing id_ of the originating peer to the message before passing
|
||||
it to the application. Messages received are fair-queued from among all
|
||||
connected peers.
|
||||
|
||||
When sending TCP data, a 'ZMQ_STREAM' socket shall remove the first part of the
|
||||
message and use it to determine the _identity_ of the peer the message shall be
|
||||
message and use it to determine the _routing id_ of the peer the message shall be
|
||||
routed to, and unroutable messages shall cause an EHOSTUNREACH or EAGAIN error.
|
||||
|
||||
To open a connection to a server, use the zmq_connect call, and then fetch the
|
||||
socket identity using the ZMQ_IDENTITY zmq_getsockopt call.
|
||||
socket routing id using the zmq_getsockopt call with the ZMQ_ROUTING_ID option.
|
||||
|
||||
To close a specific connection, send the identity frame followed by a
|
||||
To close a specific connection, send the routing id frame followed by a
|
||||
zero-length message (see EXAMPLE section).
|
||||
|
||||
When a connection is made, a zero-length message will be received by the
|
||||
application. Similarly, when the peer disconnects (or the connection is lost),
|
||||
a zero-length message will be received by the application.
|
||||
|
||||
You must send one identity frame followed by one data frame. The ZMQ_SNDMORE
|
||||
flag is required for identity frames but is ignored on data frames.
|
||||
You must send one routing id frame followed by one data frame. The ZMQ_SNDMORE
|
||||
flag is required for routing id frames but is ignored on data frames.
|
||||
|
||||
[horizontal]
|
||||
.Summary of ZMQ_STREAM characteristics
|
||||
@ -492,10 +492,10 @@ ZMQ_ROUTER
|
||||
^^^^^^^^^^
|
||||
A socket of type 'ZMQ_ROUTER' is an advanced socket type used for extending
|
||||
request/reply sockets. When receiving messages a 'ZMQ_ROUTER' socket shall
|
||||
prepend a message part containing the _identity_ of the originating peer to the
|
||||
prepend a message part containing the _routing id_ of the originating peer to the
|
||||
message before passing it to the application. Messages received are fair-queued
|
||||
from among all connected peers. When sending messages a 'ZMQ_ROUTER' socket shall
|
||||
remove the first part of the message and use it to determine the _identity_ of
|
||||
remove the first part of the message and use it to determine the _routing id _ of
|
||||
the peer the message shall be routed to. If the peer does not exist anymore, or
|
||||
has never existed, the message shall be silently discarded. However, if
|
||||
'ZMQ_ROUTER_MANDATORY' socket option is set to '1', the socket shall fail
|
||||
@ -514,9 +514,9 @@ or more peers. Likewise, the socket shall generate 'ZMQ_POLLOUT' events when
|
||||
at least one message can be sent to one or more peers.
|
||||
|
||||
When a 'ZMQ_REQ' socket is connected to a 'ZMQ_ROUTER' socket, in addition to the
|
||||
_identity_ of the originating peer each message received shall contain an empty
|
||||
_routing id_ of the originating peer each message received shall contain an empty
|
||||
_delimiter_ message part. Hence, the entire structure of each received message
|
||||
as seen by the application becomes: one or more _identity_ parts, _delimiter_
|
||||
as seen by the application becomes: one or more _routing id_ parts, _delimiter_
|
||||
part, one or more _body parts_. When sending replies to a 'ZMQ_REQ' socket the
|
||||
application must include the _delimiter_ part.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user