summaryrefslogtreecommitdiff
path: root/doc/zmq_socket.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/zmq_socket.3')
-rw-r--r--doc/zmq_socket.3187
1 files changed, 172 insertions, 15 deletions
diff --git a/doc/zmq_socket.3 b/doc/zmq_socket.3
index 3e4ebd1..aa70f1a 100644
--- a/doc/zmq_socket.3
+++ b/doc/zmq_socket.3
@@ -2,12 +2,12 @@
.\" Title: zmq_socket
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 06/04/2010
+.\" Date: 09/06/2010
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.7
+.\" Source: 0MQ 2.0.9
.\" Language: English
.\"
-.TH "ZMQ_SOCKET" "3" "06/04/2010" "0MQ 2\&.0\&.7" "0MQ Manual"
+.TH "ZMQ_SOCKET" "3" "09/06/2010" "0MQ 2\&.0\&.9" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -196,6 +196,152 @@ T}
.TE
.sp 1
.RE
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBZMQ_XREQ\fR
+.RS 4
+.sp
+A socket of type \fIZMQ_XREQ\fR is an advanced pattern used for extending request/reply sockets\&. Each message sent is load\-balanced among all connected peers, and each message received is fair\-queued from all connected peers\&.
+.sp
+When a \fIZMQ_XREQ\fR socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the exceptional state ends or at least one peer becomes available for sending; messages are not discarded\&.
+.sp
+When a \fIZMQ_XREQ\fR socket is connected to a \fIZMQ_REP\fR socket each message sent must consist of an empty message part, the \fIdelimiter\fR, followed by one or more \fIbody parts\fR\&.
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.B Table\ \&3.\ \&Summary of ZMQ_XREQ characteristics
+.TS
+tab(:);
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt.
+T{
+.sp
+Compatible peer sockets
+T}:T{
+.sp
+\fIZMQ_XREP\fR, \fIZMQ_REP\fR
+T}
+T{
+.sp
+Direction
+T}:T{
+.sp
+Bidirectional
+T}
+T{
+.sp
+Send/receive pattern
+T}:T{
+.sp
+Unrestricted
+T}
+T{
+.sp
+Outgoing routing strategy
+T}:T{
+.sp
+Load\-balanced
+T}
+T{
+.sp
+Incoming routing strategy
+T}:T{
+.sp
+Fair\-queued
+T}
+T{
+.sp
+ZMQ_HWM option action
+T}:T{
+.sp
+Block
+T}
+.TE
+.sp 1
+.RE
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBZMQ_XREP\fR
+.RS 4
+.sp
+A socket of type \fIZMQ_XREP\fR is an advanced pattern used for extending request/reply sockets\&. When receiving messages a \fIZMQ_XREP\fR socket shall prepend a message part containing the \fIidentity\fR 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 \fIZMQ_XREP\fR socket shall remove the first part of the message and use it to determine the \fIidentity\fR of the peer the message shall be routed to\&.
+.sp
+When a \fIZMQ_XREP\fR socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any messages sent to the socket shall be dropped until the exceptional state ends\&. Likewise, any messages routed to a non\-existent peer or a peer for which the individual high water mark has been reached shall also be dropped\&.
+.sp
+When a \fIZMQ_REQ\fR socket is connected to a \fIZMQ_XREP\fR socket, in addition to the \fIidentity\fR of the originating peer each message received shall contain an empty \fIdelimiter\fR message part\&. Hence, the entire structure of each received message as seen by the application becomes: one or more \fIidentity\fR parts, \fIdelimiter\fR part, one or more \fIbody parts\fR\&. When sending replies to a \fIZMQ_REQ\fR socket the application must include the \fIdelimiter\fR part\&.
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.B Table\ \&4.\ \&Summary of ZMQ_XREP characteristics
+.TS
+tab(:);
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt.
+T{
+.sp
+Compatible peer sockets
+T}:T{
+.sp
+\fIZMQ_XREQ\fR, \fIZMQ_REQ\fR
+T}
+T{
+.sp
+Direction
+T}:T{
+.sp
+Bidirectional
+T}
+T{
+.sp
+Send/receive pattern
+T}:T{
+.sp
+Unrestricted
+T}
+T{
+.sp
+Outgoing routing strategy
+T}:T{
+.sp
+See text
+T}
+T{
+.sp
+Incoming routing strategy
+T}:T{
+.sp
+Fair\-queued
+T}
+T{
+.sp
+ZMQ_HWM option action
+T}:T{
+.sp
+Drop
+T}
+.TE
+.sp 1
+.RE
.SS "Publish\-subscribe pattern"
.sp
The publish\-subscribe pattern is used for one\-to\-many distribution of data from a single \fIpublisher\fR to multiple \fIsubscribers\fR in a fanout fashion\&.
@@ -216,7 +362,7 @@ When a \fIZMQ_PUB\fR socket enters an exceptional state due to having reached th
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
-.B Table\ \&3.\ \&Summary of ZMQ_PUB characteristics
+.B Table\ \&5.\ \&Summary of ZMQ_PUB characteristics
.TS
tab(:);
lt lt
@@ -285,7 +431,7 @@ A socket of type \fIZMQ_SUB\fR is used by a \fIsubscriber\fR to subscribe to dat
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
-.B Table\ \&4.\ \&Summary of ZMQ_SUB characteristics
+.B Table\ \&6.\ \&Summary of ZMQ_SUB characteristics
.TS
tab(:);
lt lt
@@ -348,18 +494,20 @@ The pipeline pattern is used for distributing data to \fInodes\fR arranged in a
.nr an-break-flag 1
.br
.ps +1
-\fBZMQ_DOWNSTREAM\fR
+\fBZMQ_PUSH\fR
.RS 4
.sp
-A socket of type \fIZMQ_DOWNSTREAM\fR is used by a pipeline \fInode\fR to send messages to downstream pipeline \fInodes\fR\&. Messages are load\-balanced to all connected downstream \fInodes\fR\&. The \fIzmq_recv()\fR function is not implemented for this socket type\&.
+A socket of type \fIZMQ_PUSH\fR is used by a pipeline \fInode\fR to send messages to downstream pipeline \fInodes\fR\&. Messages are load\-balanced to all connected downstream \fInodes\fR\&. The \fIzmq_recv()\fR function is not implemented for this socket type\&.
.sp
-When a \fIZMQ_DOWNSTREAM\fR socket enters an exceptional state due to having reached the high water mark for all downstream \fInodes\fR, or if there are no downstream \fInodes\fR at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the exceptional state ends or at least one downstream \fInode\fR becomes available for sending; messages are not discarded\&.
+When a \fIZMQ_PUSH\fR socket enters an exceptional state due to having reached the high water mark for all downstream \fInodes\fR, or if there are no downstream \fInodes\fR at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the exceptional state ends or at least one downstream \fInode\fR becomes available for sending; messages are not discarded\&.
+.sp
+Deprecated alias: \fIZMQ_DOWNSTREAM\fR\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
-.B Table\ \&5.\ \&Summary of ZMQ_DOWNSTREAM characteristics
+.B Table\ \&7.\ \&Summary of ZMQ_PUSH characteristics
.TS
tab(:);
lt lt
@@ -373,7 +521,7 @@ T{
Compatible peer sockets
T}:T{
.sp
-\fIZMQ_UPSTREAM\fR
+\fIZMQ_PULL\fR
T}
T{
.sp
@@ -419,16 +567,18 @@ T}
.nr an-break-flag 1
.br
.ps +1
-\fBZMQ_UPSTREAM\fR
+\fBZMQ_PULL\fR
.RS 4
.sp
-A socket of type \fIZMQ_UPSTREAM\fR is used by a pipeline \fInode\fR to receive messages from upstream pipeline \fInodes\fR\&. Messages are fair\-queued from among all connected upstream \fInodes\fR\&. The \fIzmq_send()\fR function is not implemented for this socket type\&.
+A socket of type \fIZMQ_PULL\fR is used by a pipeline \fInode\fR to receive messages from upstream pipeline \fInodes\fR\&. Messages are fair\-queued from among all connected upstream \fInodes\fR\&. The \fIzmq_send()\fR function is not implemented for this socket type\&.
+.sp
+Deprecated alias: \fIZMQ_UPSTREAM\fR\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
-.B Table\ \&6.\ \&Summary of ZMQ_UPSTREAM characteristics
+.B Table\ \&8.\ \&Summary of ZMQ_PULL characteristics
.TS
tab(:);
lt lt
@@ -442,7 +592,7 @@ T{
Compatible peer sockets
T}:T{
.sp
-\fIZMQ_DOWNSTREAM\fR
+\fIZMQ_PUSH\fR
T}
T{
.sp
@@ -518,7 +668,7 @@ When a \fIZMQ_PAIR\fR socket enters an exceptional state due to having reached t
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
-.B Table\ \&7.\ \&Summary of ZMQ_PAIR characteristics
+.B Table\ \&9.\ \&Summary of ZMQ_PAIR characteristics
.TS
tab(:);
lt lt
@@ -590,6 +740,13 @@ The maximum number of sockets within this
\fIcontext\fR
has been exceeded\&.
.RE
+.PP
+\fBEFAULT\fR
+.RS 4
+The provided
+\fIcontext\fR
+was not valid (NULL)\&.
+.RE
.SH "SEE ALSO"
.sp
\fBzmq_init\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_send\fR(3) \fBzmq_recv\fR(3) \fBzmq\fR(7)