From 8e61b98c5e2943b149c825310b24e714a6127072 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 08:53:41 +0100 Subject: Imported Upstream version 2.1.4 --- doc/Makefile.am | 6 +- doc/Makefile.in | 9 +- doc/zmq.7 | 6 +- doc/zmq.html | 846 ++++++++++++++++++++++ doc/zmq_bind.3 | 6 +- doc/zmq_bind.html | 746 +++++++++++++++++++ doc/zmq_close.3 | 6 +- doc/zmq_close.html | 645 +++++++++++++++++ doc/zmq_connect.3 | 6 +- doc/zmq_connect.html | 732 +++++++++++++++++++ doc/zmq_cpp.7 | 6 +- doc/zmq_cpp.html | 765 ++++++++++++++++++++ doc/zmq_device.3 | 6 +- doc/zmq_device.html | 736 +++++++++++++++++++ doc/zmq_epgm.7 | 6 +- doc/zmq_epgm.html | 745 +++++++++++++++++++ doc/zmq_errno.3 | 6 +- doc/zmq_errno.html | 634 ++++++++++++++++ doc/zmq_getsockopt.3 | 6 +- doc/zmq_getsockopt.html | 1713 ++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_init.3 | 6 +- doc/zmq_init.html | 635 ++++++++++++++++ doc/zmq_inproc.7 | 6 +- doc/zmq_inproc.html | 669 +++++++++++++++++ doc/zmq_ipc.7 | 6 +- doc/zmq_ipc.html | 662 +++++++++++++++++ doc/zmq_msg_close.3 | 6 +- doc/zmq_msg_close.html | 638 +++++++++++++++++ doc/zmq_msg_copy.3 | 6 +- doc/zmq_msg_copy.html | 647 +++++++++++++++++ doc/zmq_msg_data.3 | 6 +- doc/zmq_msg_data.html | 633 ++++++++++++++++ doc/zmq_msg_init.3 | 6 +- doc/zmq_msg_init.html | 656 +++++++++++++++++ doc/zmq_msg_init_data.3 | 6 +- doc/zmq_msg_init_data.html | 669 +++++++++++++++++ doc/zmq_msg_init_size.3 | 6 +- doc/zmq_msg_init_size.html | 656 +++++++++++++++++ doc/zmq_msg_move.3 | 6 +- doc/zmq_msg_move.html | 636 ++++++++++++++++ doc/zmq_msg_size.3 | 6 +- doc/zmq_msg_size.html | 633 ++++++++++++++++ doc/zmq_pgm.7 | 6 +- doc/zmq_pgm.html | 745 +++++++++++++++++++ doc/zmq_poll.3 | 6 +- doc/zmq_poll.html | 755 +++++++++++++++++++ doc/zmq_recv.3 | 6 +- doc/zmq_recv.html | 738 +++++++++++++++++++ doc/zmq_send.3 | 6 +- doc/zmq_send.html | 744 +++++++++++++++++++ doc/zmq_setsockopt.3 | 6 +- doc/zmq_setsockopt.html | 1603 +++++++++++++++++++++++++++++++++++++++++ doc/zmq_socket.3 | 6 +- doc/zmq_socket.html | 1416 ++++++++++++++++++++++++++++++++++++ doc/zmq_strerror.3 | 6 +- doc/zmq_strerror.html | 634 ++++++++++++++++ doc/zmq_tcp.7 | 6 +- doc/zmq_tcp.html | 755 +++++++++++++++++++ doc/zmq_term.3 | 6 +- doc/zmq_term.html | 672 +++++++++++++++++ doc/zmq_version.3 | 6 +- doc/zmq_version.html | 632 ++++++++++++++++ 62 files changed, 23492 insertions(+), 93 deletions(-) create mode 100644 doc/zmq.html create mode 100644 doc/zmq_bind.html create mode 100644 doc/zmq_close.html create mode 100644 doc/zmq_connect.html create mode 100644 doc/zmq_cpp.html create mode 100644 doc/zmq_device.html create mode 100644 doc/zmq_epgm.html create mode 100644 doc/zmq_errno.html create mode 100644 doc/zmq_getsockopt.html create mode 100644 doc/zmq_init.html create mode 100644 doc/zmq_inproc.html create mode 100644 doc/zmq_ipc.html create mode 100644 doc/zmq_msg_close.html create mode 100644 doc/zmq_msg_copy.html create mode 100644 doc/zmq_msg_data.html create mode 100644 doc/zmq_msg_init.html create mode 100644 doc/zmq_msg_init_data.html create mode 100644 doc/zmq_msg_init_size.html create mode 100644 doc/zmq_msg_move.html create mode 100644 doc/zmq_msg_size.html create mode 100644 doc/zmq_pgm.html create mode 100644 doc/zmq_poll.html create mode 100644 doc/zmq_recv.html create mode 100644 doc/zmq_send.html create mode 100644 doc/zmq_setsockopt.html create mode 100644 doc/zmq_socket.html create mode 100644 doc/zmq_strerror.html create mode 100644 doc/zmq_tcp.html create mode 100644 doc/zmq_term.html create mode 100644 doc/zmq_version.html (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index d00014d..7408f10 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -11,6 +11,7 @@ MAN_DOC = $(MAN1) $(MAN3) $(MAN7) MAN_TXT = $(MAN1:%.1=%.txt) MAN_TXT += $(MAN3:%.3=%.txt) MAN_TXT += $(MAN7:%.7=%.txt) +MAN_HTML = $(MAN_TXT:%.txt=%.html) if INSTALL_MAN dist_man_MANS = $(MAN_DOC) @@ -26,8 +27,11 @@ MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML) dist-hook : $(MAN_DOC) $(MAN_HTML) if BUILD_DOC -SUFFIXES=.txt .xml .1 .3 .7 +SUFFIXES=.html .txt .xml .1 .3 .7 +.txt.html: + $(AM_V_GEN)$(ASCIIDOC) -d manpage -b xhtml11 -f asciidoc.conf \ + -azmq_version=@PACKAGE_VERSION@ $< .txt.xml: $(AM_V_GEN)$(ASCIIDOC) -d manpage -b docbook -f asciidoc.conf \ -azmq_version=@PACKAGE_VERSION@ $< diff --git a/doc/Makefile.in b/doc/Makefile.in index 0d71c0e..35bf698 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -203,6 +203,7 @@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ +pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ @@ -227,14 +228,15 @@ MAN7 = zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7 \ MAN_DOC = $(MAN1) $(MAN3) $(MAN7) MAN_TXT = $(MAN1:%.1=%.txt) $(MAN3:%.3=%.txt) $(MAN7:%.7=%.txt) +MAN_HTML = $(MAN_TXT:%.txt=%.html) @INSTALL_MAN_TRUE@dist_man_MANS = $(MAN_DOC) EXTRA_DIST = asciidoc.conf $(MAN_TXT) $(am__append_1) MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML) -@BUILD_DOC_TRUE@SUFFIXES = .txt .xml .1 .3 .7 +@BUILD_DOC_TRUE@SUFFIXES = .html .txt .xml .1 .3 .7 all: all-am .SUFFIXES: -.SUFFIXES: .txt .xml .1 .3 .7 +.SUFFIXES: .html .txt .xml .1 .3 .7 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -519,6 +521,9 @@ uninstall-man: uninstall-man3 uninstall-man7 dist-hook : $(MAN_DOC) $(MAN_HTML) +@BUILD_DOC_TRUE@.txt.html: +@BUILD_DOC_TRUE@ $(AM_V_GEN)$(ASCIIDOC) -d manpage -b xhtml11 -f asciidoc.conf \ +@BUILD_DOC_TRUE@ -azmq_version=@PACKAGE_VERSION@ $< @BUILD_DOC_TRUE@.txt.xml: @BUILD_DOC_TRUE@ $(AM_V_GEN)$(ASCIIDOC) -d manpage -b docbook -f asciidoc.conf \ @BUILD_DOC_TRUE@ -azmq_version=@PACKAGE_VERSION@ $< diff --git a/doc/zmq.7 b/doc/zmq.7 index 61345fb..d7fa3be 100644 --- a/doc/zmq.7 +++ b/doc/zmq.7 @@ -2,12 +2,12 @@ .\" Title: zmq .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/15/2011 +.\" Date: 03/30/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.3 +.\" Source: 0MQ 2.1.4 .\" Language: English .\" -.TH "ZMQ" "7" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual" +.TH "ZMQ" "7" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq.html b/doc/zmq.html new file mode 100644 index 0000000..b35c57e --- /dev/null +++ b/doc/zmq.html @@ -0,0 +1,846 @@ + + + + + +zmq(7) + + + + + +
+

SYNOPSIS

+
+

#include <zmq.h>

+

cc [flags] files -lzmq [libraries]

+
+

DESCRIPTION

+
+

The ØMQ lightweight messaging kernel is a library which extends the standard +socket interfaces with features traditionally provided by specialised +messaging middleware products. ØMQ sockets provide an abstraction of +asynchronous message queues, multiple messaging patterns, message +filtering (subscriptions), seamless access to multiple transport protocols +and more.

+

This documentation presents an overview of ØMQ concepts, describes how ØMQ +abstracts standard sockets and provides a reference manual for the functions +provided by the ØMQ library.

+

Context

+

Before using any ØMQ library functions the caller must initialise a ØMQ +context using zmq_init(). The following functions are provided to handle +initialisation and termination of a context:

+
+
+Initialise ØMQ context +
+
+

+ zmq_init(3) +

+
+
+Terminate ØMQ context +
+
+

+ zmq_term(3) +

+
+
+

Thread safety

+

A ØMQ context is thread safe and may be shared among as many application +threads as necessary, without any additional locking required on the part of +the caller.

+

Individual ØMQ sockets are not thread safe except in the case where full +memory barriers are issued when migrating a socket from one thread to another. +In practice this means applications can create a socket in one thread with +zmq_socket() and then pass it to a newly created thread as part of thread +initialization, for example via a structure passed as an argument to +pthread_create().

+

Multiple contexts

+

Multiple contexts may coexist within a single application. Thus, an +application can use ØMQ directly and at the same time make use of any number of +additional libraries or components which themselves make use of ØMQ as long as +the above guidelines regarding thread safety are adhered to.

+

Messages

+

A ØMQ message is a discrete unit of data passed between applications or +components of the same application. ØMQ messages have no internal structure and +from the point of view of ØMQ itself they are considered to be opaque binary +data.

+

The following functions are provided to work with messages:

+
+
+Initialise a message +
+
+

+ zmq_msg_init(3) + zmq_msg_init_size(3) + zmq_msg_init_data(3) +

+
+
+Release a message +
+
+

+ zmq_msg_close(3) +

+
+
+Access message content +
+
+

+ zmq_msg_data(3) + zmq_msg_size(3) +

+
+
+Message manipulation +
+
+

+ zmq_msg_copy(3) + zmq_msg_move(3) +

+
+
+

Sockets

+

ØMQ sockets present an abstraction of a asynchronous message queue, with the +exact queueing semantics depending on the socket type in use. See +zmq_socket(3) for the socket types provided.

+

The following functions are provided to work with sockets:

+
+
+Creating a socket +
+
+

+ zmq_socket(3) +

+
+
+Closing a socket +
+
+

+ zmq_close(3) +

+
+
+Manipulating socket options +
+
+

+ zmq_getsockopt(3) + zmq_setsockopt(3) +

+
+
+Establishing a message flow +
+
+

+ zmq_bind(3) + zmq_connect(3) +

+
+
+Sending and receiving messages +
+
+

+ zmq_send(3) + zmq_recv(3) +

+
+
+
Input/output multiplexing

ØMQ provides a mechanism for applications to multiplex input/output events over +a set containing both ØMQ sockets and standard sockets. This mechanism mirrors +the standard poll() system call, and is described in detail in +zmq_poll(3).

+

Transports

+

A ØMQ socket can use multiple different underlying transport mechanisms. +Each transport mechanism is suited to a particular purpose and has its own +advantages and drawbacks.

+

The following transport mechanisms are provided:

+
+
+Unicast transport using TCP +
+
+

+ zmq_tcp(7) +

+
+
+Reliable multicast transport using PGM +
+
+

+ zmq_pgm(7) +

+
+
+Local inter-process communication transport +
+
+

+ zmq_ipc(7) +

+
+
+Local in-process (inter-thread) communication transport +
+
+

+ zmq_inproc(7) +

+
+
+

Devices

+

ØMQ provides devices, which are building blocks that act as intermediate +nodes in complex messaging topologies. Devices can act as brokers that other +nodes connect to, proxies that connect through to other nodes, or any mix of +these two models.

+

You can start a device in an application thread, see zmq_device(3).

+
+

ERROR HANDLING

+
+

The ØMQ library functions handle errors using the standard conventions found on +POSIX systems. Generally, this means that upon failure a ØMQ library function +shall return either a NULL value (if returning a pointer) or a negative value +(if returning an integer), and the actual error code shall be stored in the +errno variable.

+

On non-POSIX systems some users may experience issues with retrieving the +correct value of the errno variable. The zmq_errno() function is provided +to assist in these cases; for details refer to zmq_errno(3).

+

The zmq_strerror() function is provided to translate ØMQ-specific error codes +into error message strings; for details refer to zmq_strerror(3).

+
+

MISCELLANEOUS

+
+

The following miscellaneous functions are provided:

+
+
+Report ØMQ library version +
+
+

+ zmq_version(3) +

+
+
+
+

LANGUAGE BINDINGS

+
+

The ØMQ library provides interfaces suitable for calling from programs in any +language; this documentation documents those interfaces as they would be used +by C programmers. The intent is that programmers using ØMQ from other languages +shall refer to this documentation alongside any documentation provided by the +vendor of their language binding.

+

C++ language binding

+

The ØMQ distribution includes a C++ language binding, which is documented +separately in zmq_cpp(7).

+

Other language bindings

+

Other language bindings (Python, Ruby, Java and more) are provided by members +of the ØMQ community and pointers can be found on the ØMQ website.

+
+

AUTHORS

+
+

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

+
+

RESOURCES

+
+

Main web site: http://www.zeromq.org/

+

Report bugs to the ØMQ development mailing list: <zeromq-dev@lists.zeromq.org>

+
+

COPYING

+
+

Free use of this software is granted under the terms of the GNU Lesser General +Public License (LGPL). For details see the files COPYING and COPYING.LESSER +included with the ØMQ distribution.

+
+
+

+ + + diff --git a/doc/zmq_bind.3 b/doc/zmq_bind.3 index f4a637a..9ff1109 100644 --- a/doc/zmq_bind.3 +++ b/doc/zmq_bind.3 @@ -2,12 +2,12 @@ .\" Title: zmq_bind .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/15/2011 +.\" Date: 03/30/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.3 +.\" Source: 0MQ 2.1.4 .\" Language: English .\" -.TH "ZMQ_BIND" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual" +.TH "ZMQ_BIND" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_bind.html b/doc/zmq_bind.html new file mode 100644 index 0000000..11b8762 --- /dev/null +++ b/doc/zmq_bind.html @@ -0,0 +1,746 @@ + + + + + +zmq_bind(3) + + + + + +
+

SYNOPSIS

+
+

int zmq_bind (void *socket, const char *endpoint);

+
+

DESCRIPTION

+
+

The zmq_bind() function shall create an endpoint for accepting connections +and bind it to the socket referenced by the socket argument.

+

The endpoint argument is a string consisting of two parts as follows: +transport://address. The transport part specifies the underlying +transport protocol to use. The meaning of the address part is specific to +the underlying transport protocol selected.

+

The following transports are defined:

+
+
+inproc +
+
+

+local in-process (inter-thread) communication transport, see zmq_inproc(7) +

+
+
+ipc +
+
+

+local inter-process communication transport, see zmq_ipc(7) +

+
+
+tcp +
+
+

+unicast transport using TCP, see zmq_tcp(7) +

+
+
+pgm, epgm +
+
+

+reliable multicast transport using PGM, see zmq_pgm(7) +

+
+
+

With the exception of ZMQ_PAIR sockets, a single socket may be connected to +multiple endpoints using zmq_connect(), while simultaneously accepting +incoming connections from multiple endpoints bound to the socket using +zmq_bind(). Refer to zmq_socket(3) for a description of the exact +semantics involved when connecting or binding a socket to multiple endpoints.

+
+

RETURN VALUE

+
+

The zmq_bind() function shall return zero if successful. Otherwise it shall +return -1 and set errno to one of the values defined below.

+
+

ERRORS

+
+
+
+EPROTONOSUPPORT +
+
+

+The requested transport protocol is not supported. +

+
+
+ENOCOMPATPROTO +
+
+

+The requested transport protocol is not compatible with the socket type. +

+
+
+EADDRINUSE +
+
+

+The requested address is already in use. +

+
+
+EADDRNOTAVAIL +
+
+

+The requested address was not local. +

+
+
+ENODEV +
+
+

+The requested address specifies a nonexistent interface. +

+
+
+ETERM +
+
+

+The ØMQ context associated with the specified socket was terminated. +

+
+
+EFAULT +
+
+

+The provided socket was not valid (NULL). +

+
+
+EMTHREAD +
+
+

+No I/O thread is available to accomplish the task. +

+
+
+
+

EXAMPLE

+
+
+
Binding a publisher socket to an in-process and a TCP transport
+
+
/* Create a ZMQ_PUB socket */
+void *socket = zmq_socket (context, ZMQ_PUB);
+assert (socket);
+/* Bind it to a in-process transport with the address 'my_publisher' */
+int rc = zmq_bind (socket, "inproc://my_publisher");
+assert (rc == 0);
+/* Bind it to a TCP transport on port 5555 of the 'eth0' interface */
+rc = zmq_bind (socket, "tcp://eth0:5555");
+assert (rc == 0);
+
+
+

SEE ALSO

+ +

AUTHORS

+
+

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

+
+
+

+ + + diff --git a/doc/zmq_close.3 b/doc/zmq_close.3 index 231ae96..520f0ac 100644 --- a/doc/zmq_close.3 +++ b/doc/zmq_close.3 @@ -2,12 +2,12 @@ .\" Title: zmq_close .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 03/15/2011 +.\" Date: 03/30/2011 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.3 +.\" Source: 0MQ 2.1.4 .\" Language: English .\" -.TH "ZMQ_CLOSE" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual" +.TH "ZMQ_CLOSE" "3" "03/30/2011" "0MQ 2\&.1\&.4" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/zmq_close.html b/doc/zmq_close.html new file mode 100644 index 0000000..cc13445 --- /dev/null +++ b/doc/zmq_close.html @@ -0,0 +1,645 @@ + + + + + +zmq_close(3) + + + + + +
+

SYNOPSIS

+
+

int zmq_close (void *socket);

+
+

DESCRIPTION

+
+

The zmq_close() function shall destroy the socket referenced by the socket +argument. Any outstanding messages physically received from the network but not +yet received by the application with zmq_recv() shall be discarded. The +behaviour for discarding messages sent by the application with zmq_send() but +not yet physically transferred to the network depends on the value of the +ZMQ_LINGER socket option for the specified socket.

+
+ + + +
+
Note
+
The default setting of ZMQ_LINGER does not discard unsent messages; +this behaviour may cause the application to block when calling zmq_term(). +For details refer to zmq_setsockopt(3) and zmq_term(3).
+
+
+

RETURN VALUE

+
+

The zmq_close() function shall return zero if successful. Otherwise it shall +return -1 and set errno to one of the values defined below.

+
+

ERRORS

+
+
+
+EFAULT +
+
+

+The provided socket was no