From 4016b657973bba87caf75168ba70aaa85d556487 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 09:00:28 +0100 Subject: Imported Upstream version 2.1.11 --- doc/zmq_socket.html | 206 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 76 deletions(-) (limited to 'doc/zmq_socket.html') diff --git a/doc/zmq_socket.html b/doc/zmq_socket.html index b77ab08..05c5ab7 100644 --- a/doc/zmq_socket.html +++ b/doc/zmq_socket.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_socket(3) - +
+

SYNOPSIS

void *zmq_socket (void *context, int type);

+
+

DESCRIPTION

The zmq_socket() function shall create a ØMQ socket within the specified @@ -617,15 +636,17 @@ from multiple threads except after migrating a socket from one thread to another with a "full fence" memory barrier.

Socket types

The following sections present the socket types defined by ØMQ, grouped by the general messaging pattern which is built from related socket types.

-

Request-reply pattern

+
+

Request-reply pattern

The request-reply pattern is used for sending requests from a client to one or more instances of a service, and receiving subsequent replies to each request sent.

+

ZMQ_REQ

A socket of type ZMQ_REQ is used by a client to send requests to and receive replies from a service. This socket type allows only an alternating sequence of zmq_send(request) and subsequent zmq_recv(reply) calls. Each -request sent is load-balanced among all services, and each reply received is +request sent is round-robined among all services, and each reply received is matched with the last issued request.

When a ZMQ_REQ socket enters an exceptional state due to having reached the high water mark for all services, or if there are no services at all, then @@ -673,7 +694,7 @@ Outgoing routing strategy

-Load-balanced +Round-robin

@@ -700,6 +721,8 @@ Block
+
+

ZMQ_REP

A socket of type ZMQ_REP is used by a service to receive requests from and send replies to a client. This socket type allows only an alternating @@ -778,9 +801,11 @@ Drop

+
+

ZMQ_DEALER

A socket of type ZMQ_DEALER is an advanced pattern used for extending -request/reply sockets. Each message sent is load-balanced among all connected +request/reply sockets. Each message sent is round-robined among all connected peers, and each message received is fair-queued from all connected peers.

Previously this socket was called ZMQ_XREQ and that name remains available for backwards compatibility.

@@ -833,7 +858,7 @@ Outgoing routing strategy

-Load-balanced +Round-robin

@@ -860,6 +885,8 @@ Block
+
+

ZMQ_ROUTER

A socket of type ZMQ_ROUTER is an advanced pattern used for extending request/reply sockets. When receiving messages a ZMQ_ROUTER socket shall @@ -950,9 +977,13 @@ Drop

-

Publish-subscribe pattern

+
+
+
+

Publish-subscribe pattern

The publish-subscribe pattern is used for one-to-many distribution of data from a single publisher to multiple subscribers in a fan out fashion.

+

ZMQ_PUB

A socket of type ZMQ_PUB is used by a publisher to distribute data. Messages sent are distributed in a fan out fashion to all connected peers. @@ -1029,6 +1060,8 @@ Drop

+
+

ZMQ_SUB

A socket of type ZMQ_SUB is used by a subscriber to subscribe to data distributed by a publisher. Initially a ZMQ_SUB socket is not subscribed to @@ -1103,14 +1136,18 @@ Drop

-

Pipeline pattern

+
+
+
+

Pipeline pattern

The pipeline pattern is used for distributing data to nodes arranged in a pipeline. Data always flows down the pipeline, and each stage of the pipeline is connected to at least one node. When a pipeline stage is connected to -multiple nodes data is load-balanced among all connected nodes.

+multiple nodes data is round-robined among all connected nodes.

+

ZMQ_PUSH

A socket of type ZMQ_PUSH is used by a pipeline node to send messages -to downstream pipeline nodes. Messages are load-balanced to all connected +to downstream pipeline nodes. Messages are round-robined to all connected downstream nodes. The zmq_recv() function is not implemented for this socket type.

When a ZMQ_PUSH socket enters an exceptional state due to having reached the @@ -1171,7 +1208,7 @@ Outgoing routing strategy

-Load-balanced +Round-robin

@@ -1187,6 +1224,8 @@ Block
+
+

ZMQ_PULL

A socket of type ZMQ_PULL is used by a pipeline node to receive messages from upstream pipeline nodes. Messages are fair-queued from among all @@ -1261,10 +1300,14 @@ N/A

-

Exclusive pair pattern

+
+
+
+

Exclusive pair pattern

The exclusive pair pattern is used to connect a peer to precisely one other peer. This pattern is used for inter-thread communication across the inproc transport.

+

ZMQ_PAIR

A socket of type ZMQ_PAIR can only be connected to a single peer at any one time. No message routing or filtering is performed on messages sent over a @@ -1353,12 +1396,18 @@ Block

+
+
+ +

RETURN VALUE

The zmq_socket() function shall return an opaque handle to the newly created socket if successful. Otherwise, it shall return NULL and set errno to one of the values defined below.

+
+

ERRORS

@@ -1396,6 +1445,8 @@ The context specified was terminated.
+
+

SEE ALSO

zmq_init(3) @@ -1407,17 +1458,20 @@ The context specified was terminated. zmq_inproc(7) zmq(7)

+
+

AUTHORS

This ØMQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and Martin Lucina <mato@kotelna.sk>.

+

-- cgit v1.2.3