Commit 3f925501 authored by Pieter Hintjens's avatar Pieter Hintjens

Problem: description of ZMQ_CLIENT/SERVER has inaccuracies

- both are thread safe
- they do not accept ZMQ_SNDMORE nor ZMQ_RCVMORE
parent 50859e40
...@@ -691,8 +691,8 @@ Applicable socket types:: all, when using TCP transports. ...@@ -691,8 +691,8 @@ Applicable socket types:: all, when using TCP transports.
ZMQ_THREADSAFE: Retrieve socket thread safety ZMQ_THREADSAFE: Retrieve socket thread safety
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_THREADSAFE' option shall retrieve a boolean value indicating whether The 'ZMQ_THREADSAFE' option shall retrieve a boolean value indicating whether
or not the socket is threadsafe. Currently only 'ZMQ_CLIENT' sockets are or not the socket is threadsafe. Currently 'ZMQ_CLIENT' and 'ZMQ_SERVER' sockets
threadsafe. are threadsafe.
[horizontal] [horizontal]
Option value type:: boolean Option value type:: boolean
......
...@@ -65,8 +65,9 @@ after which either peer can send messages asynchronously, to the other. ...@@ -65,8 +65,9 @@ after which either peer can send messages asynchronously, to the other.
The client-server pattern is formally defined by http://rfc.zeromq.org/spec:41. The client-server pattern is formally defined by http://rfc.zeromq.org/spec:41.
Note: this pattern deprecates the use of 'ZMQ_DEALER' and 'ZMQ_ROUTER' to build Note: this pattern is meant to eventually deprecate the use of 'ZMQ_DEALER' and
client-server architectures. 'ZMQ_ROUTER' to build client-server architectures, as well as 'ZMQ_REP' and
'ZMQ_REQ' for request-reply.
ZMQ_CLIENT ZMQ_CLIENT
^^^^^^^^^^ ^^^^^^^^^^
...@@ -92,6 +93,11 @@ the first client thread that calls libzmq:zmq_msg_recv. If you need to get ...@@ -92,6 +93,11 @@ the first client thread that calls libzmq:zmq_msg_recv. If you need to get
replies back to the originating thread, use one 'ZMQ_CLIENT' socket per replies back to the originating thread, use one 'ZMQ_CLIENT' socket per
thread. thread.
NOTE: 'ZMQ_CLIENT' sockets are threadsafe. They do not accept the ZMQ_SNDMORE
option on sends not ZMQ_RCVMORE on receives. This limits them to single part
data. The intention is to extend the API to allow scatter/gather of multi-part
data.
[horizontal] [horizontal]
.Summary of ZMQ_CLIENT characteristics .Summary of ZMQ_CLIENT characteristics
Compatible peer sockets:: 'ZMQ_SERVER' Compatible peer sockets:: 'ZMQ_SERVER'
...@@ -118,6 +124,11 @@ peer, the send call will fail with EHOSTUNREACH. If the outgoing buffer for ...@@ -118,6 +124,11 @@ peer, the send call will fail with EHOSTUNREACH. If the outgoing buffer for
the client peer is full, the send call will fail with EAGAIN. The 'ZMQ_SERVER' the client peer is full, the send call will fail with EAGAIN. The 'ZMQ_SERVER'
socket shall not drop messages, nor shall it block. socket shall not drop messages, nor shall it block.
NOTE: 'ZMQ_SERVER' sockets are threadsafe. They do not accept the ZMQ_SNDMORE
option on sends not ZMQ_RCVMORE on receives. This limits them to single part
data. The intention is to extend the API to allow scatter/gather of multi-part
data.
[horizontal] [horizontal]
.Summary of ZMQ_SERVER characteristics .Summary of ZMQ_SERVER characteristics
Compatible peer sockets:: 'ZMQ_CLIENT' Compatible peer sockets:: 'ZMQ_CLIENT'
......
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