From 75af6aed482ab16997c1388fe801f74d11ec12a4 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 08:54:14 +0100 Subject: Imported Upstream version 2.1.9 --- doc/zmq_socket.html | 160 +++++++++++++++++++++++++++++----------------------- 1 file changed, 89 insertions(+), 71 deletions(-) (limited to 'doc/zmq_socket.html') diff --git a/doc/zmq_socket.html b/doc/zmq_socket.html index d688fa9..9a8266d 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,10 +600,12 @@ 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 @@ -700,6 +685,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,6 +765,8 @@ 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 @@ -800,7 +789,7 @@ Compatible peer sockets

-ZMQ_ROUTER, ZMQ_REP +ZMQ_ROUTER, ZMQ_REQ, ZMQ_REP

@@ -860,6 +849,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 @@ -890,7 +881,7 @@ Compatible peer sockets

-ZMQ_DEALER, ZMQ_REQ +ZMQ_DEALER, ZMQ_REQ, ZMQ_REP

@@ -950,9 +941,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 +1024,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,11 +1100,15 @@ 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.

+

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 @@ -1187,6 +1188,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 +1264,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 +1360,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 +1409,8 @@ The context specified was terminated.
+
+

SEE ALSO

zmq_init(3) @@ -1407,17 +1422,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