From 56619463ac26dc6c3e576d2fbf6b544eebeb5148 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Sun, 20 May 2012 11:24:59 +0200 Subject: Imported Upstream version 2.2.0 --- ChangeLog | 432 ++++++++++++++++++++++++++++++++++++++++++++ INSTALL | 4 +- NEWS | 22 +++ acinclude.m4 | 190 +++++++++++++++++++ configure | 368 +++++++++++++++++++++++++++++++++++-- configure.in | 10 +- doc/zmq.7 | 20 +- doc/zmq.html | 197 ++++++++++++-------- doc/zmq.txt | 3 +- doc/zmq_bind.3 | 19 +- doc/zmq_bind.html | 163 ++++++++++------- doc/zmq_bind.txt | 3 +- doc/zmq_close.3 | 19 +- doc/zmq_close.html | 161 ++++++++++------- doc/zmq_close.txt | 3 +- doc/zmq_connect.3 | 19 +- doc/zmq_connect.html | 163 ++++++++++------- doc/zmq_connect.txt | 3 +- doc/zmq_cpp.7 | 19 +- doc/zmq_cpp.html | 275 ++++++++++++++++------------ doc/zmq_cpp.txt | 3 +- doc/zmq_device.3 | 27 +-- doc/zmq_device.html | 175 ++++++++++-------- doc/zmq_device.txt | 16 +- doc/zmq_epgm.7 | 19 +- doc/zmq_epgm.html | 171 +++++++++++------- doc/zmq_epgm.txt | 4 +- doc/zmq_errno.3 | 19 +- doc/zmq_errno.html | 161 ++++++++++------- doc/zmq_errno.txt | 3 +- doc/zmq_getsockopt.3 | 97 ++++++++-- doc/zmq_getsockopt.html | 343 ++++++++++++++++++++++++++--------- doc/zmq_getsockopt.txt | 35 +++- doc/zmq_init.3 | 19 +- doc/zmq_init.html | 161 ++++++++++------- doc/zmq_init.txt | 3 +- doc/zmq_inproc.7 | 19 +- doc/zmq_inproc.html | 169 ++++++++++------- doc/zmq_inproc.txt | 3 +- doc/zmq_ipc.7 | 19 +- doc/zmq_ipc.html | 169 ++++++++++------- doc/zmq_ipc.txt | 3 +- doc/zmq_msg_close.3 | 19 +- doc/zmq_msg_close.html | 161 ++++++++++------- doc/zmq_msg_close.txt | 3 +- doc/zmq_msg_copy.3 | 19 +- doc/zmq_msg_copy.html | 161 ++++++++++------- doc/zmq_msg_copy.txt | 3 +- doc/zmq_msg_data.3 | 19 +- doc/zmq_msg_data.html | 161 ++++++++++------- doc/zmq_msg_data.txt | 3 +- doc/zmq_msg_init.3 | 19 +- doc/zmq_msg_init.html | 163 ++++++++++------- doc/zmq_msg_init.txt | 3 +- doc/zmq_msg_init_data.3 | 19 +- doc/zmq_msg_init_data.html | 163 ++++++++++------- doc/zmq_msg_init_data.txt | 3 +- doc/zmq_msg_init_size.3 | 19 +- doc/zmq_msg_init_size.html | 161 ++++++++++------- doc/zmq_msg_init_size.txt | 3 +- doc/zmq_msg_move.3 | 19 +- doc/zmq_msg_move.html | 161 ++++++++++------- doc/zmq_msg_move.txt | 3 +- doc/zmq_msg_size.3 | 19 +- doc/zmq_msg_size.html | 161 ++++++++++------- doc/zmq_msg_size.txt | 3 +- doc/zmq_pgm.7 | 19 +- doc/zmq_pgm.html | 171 +++++++++++------- doc/zmq_pgm.txt | 4 +- doc/zmq_poll.3 | 19 +- doc/zmq_poll.html | 163 ++++++++++------- doc/zmq_poll.txt | 3 +- doc/zmq_recv.3 | 19 +- doc/zmq_recv.html | 167 ++++++++++------- doc/zmq_recv.txt | 3 +- doc/zmq_send.3 | 19 +- doc/zmq_send.html | 167 ++++++++++------- doc/zmq_send.txt | 3 +- doc/zmq_setsockopt.3 | 97 ++++++++-- doc/zmq_setsockopt.html | 335 +++++++++++++++++++++++++--------- doc/zmq_setsockopt.txt | 35 +++- doc/zmq_socket.3 | 19 +- doc/zmq_socket.html | 7 +- doc/zmq_socket.txt | 3 +- doc/zmq_strerror.3 | 19 +- doc/zmq_strerror.html | 163 ++++++++++------- doc/zmq_strerror.txt | 3 +- doc/zmq_tcp.7 | 19 +- doc/zmq_tcp.html | 169 ++++++++++------- doc/zmq_tcp.txt | 3 +- doc/zmq_term.3 | 19 +- doc/zmq_term.html | 161 ++++++++++------- doc/zmq_term.txt | 3 +- doc/zmq_version.3 | 19 +- doc/zmq_version.html | 163 ++++++++++------- doc/zmq_version.txt | 4 +- include/zmq.h | 8 +- include/zmq.hpp | 13 +- src/Makefile.am | 1 + src/Makefile.in | 1 + src/blob.hpp | 4 + src/clock.cpp | 19 +- src/command.hpp | 4 +- src/ctx.hpp | 2 +- src/encoder.cpp | 4 +- src/gcc_421_char_traits.hpp | 119 ++++++++++++ src/options.cpp | 49 ++++- src/options.hpp | 4 + src/platform.hpp.in | 3 + src/socket_base.cpp | 8 +- src/trie.cpp | 31 +++- src/trie.hpp | 3 + tests/Makefile.am | 4 +- tests/Makefile.in | 21 ++- tests/test_timeo.cpp | 125 +++++++++++++ zeromq.spec | 2 +- 116 files changed, 4993 insertions(+), 2629 deletions(-) create mode 100644 src/gcc_421_char_traits.hpp create mode 100644 tests/test_timeo.cpp diff --git a/ChangeLog b/ChangeLog index 9161480..98c598f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,437 @@ # Generated by Makefile. Do not edit. +commit 8daada4bdc41bfe9da9e3c93c8b0f6c04a6cb0ec +Author: Pieter Hintjens +Date: Tue Apr 10 20:30:31 2012 +0200 + + gcc_421_char_traits.hpp was missing from tarballs + + src/Makefile.am | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit fb64b8801cd02776e1524aedc41083f9bf876e4d +Merge: 2bdb487 f2a8fa1 +Author: Pieter Hintjens +Date: Wed Apr 4 04:36:54 2012 -0700 + + Merge pull request #47 from pieterh/master + + Bumped version for next release (2.2.1) + +commit f2a8fa1de6d92c5264ff19e3ed05af115069edc0 +Author: Pieter Hintjens +Date: Wed Apr 4 12:26:45 2012 +0100 + + Bumped version number to 2.2.1 for next release + + include/zmq.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 2bdb487abbe69984ec264ddcb785e032e1b0419f +Merge: bfd04c5 0b2f5cb +Author: Pieter Hintjens +Date: Wed Apr 4 04:11:29 2012 -0700 + + Merge pull request #46 from pieterh/master + + Preparing for release 2.2.0 + +commit 0b2f5cbac93b674e6282cc85222b64cf6a17950a +Author: Pieter Hintjens +Date: Wed Apr 4 12:06:28 2012 +0100 + + Fixed man pages for release 2.2.0 + + * Fixed new entries for getsockopt/setsockopt SNDTIMEO and RCVTIMEO + * Removed individual authorship from man page footers + + doc/zmq.txt | 3 +- + doc/zmq_bind.txt | 3 +- + doc/zmq_close.txt | 3 +- + doc/zmq_connect.txt | 3 +- + doc/zmq_cpp.txt | 3 +- + doc/zmq_device.txt | 16 +---------- + doc/zmq_errno.txt | 3 +- + doc/zmq_getsockopt.txt | 67 ++++++++++++++++++++++----------------------- + doc/zmq_init.txt | 3 +- + doc/zmq_inproc.txt | 3 +- + doc/zmq_ipc.txt | 3 +- + doc/zmq_msg_close.txt | 3 +- + doc/zmq_msg_copy.txt | 3 +- + doc/zmq_msg_data.txt | 3 +- + doc/zmq_msg_init.txt | 3 +- + doc/zmq_msg_init_data.txt | 3 +- + doc/zmq_msg_init_size.txt | 3 +- + doc/zmq_msg_move.txt | 3 +- + doc/zmq_msg_size.txt | 3 +- + doc/zmq_pgm.txt | 4 +- + doc/zmq_poll.txt | 3 +- + doc/zmq_recv.txt | 3 +- + doc/zmq_send.txt | 3 +- + doc/zmq_setsockopt.txt | 67 ++++++++++++++++++++++----------------------- + doc/zmq_socket.txt | 3 +- + doc/zmq_strerror.txt | 3 +- + doc/zmq_tcp.txt | 3 +- + doc/zmq_term.txt | 3 +- + doc/zmq_version.txt | 4 +- + 29 files changed, 95 insertions(+), 135 deletions(-) + +commit 87cce25bd9b31a192297bc4213f45107f5a1b796 +Author: Pieter Hintjens +Date: Wed Apr 4 11:53:58 2012 +0100 + + Updated product version to 2.2.0 + + include/zmq.h | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +commit 33af4869733de3f646daf2bafc242f813fb927f4 +Author: Pieter Hintjens +Date: Wed Apr 4 11:53:02 2012 +0100 + + Updated ABI version to 1.1.0 + + configure.in | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +commit b0d95774000b930125f24450f9e080b9e8b63a0c +Author: Pieter Hintjens +Date: Wed Apr 4 11:50:50 2012 +0100 + + Updated NEWS for version 2.2.0 + + NEWS | 11 +++++++---- + 1 files changed, 7 insertions(+), 4 deletions(-) + +commit bfd04c5b867890b4d6a563f2a7d95b5d183e84ba +Merge: 6ab8ef0 1e5c6fa +Author: Pieter Hintjens +Date: Tue Apr 3 05:27:13 2012 -0700 + + Merge pull request #45 from jhawk28/master + + Fix issue 349 + +commit 1e5c6fa0077dcd5767bc557fbccaf383dee98339 +Author: Joshua Foster +Date: Sun Apr 1 20:44:26 2012 -0400 + + Fix issue 349 + + https://zeromq.jira.com/browse/LIBZMQ-349 + Add the send/recv socket options from 3.1.0. + + .gitignore | 1 + + NEWS | 2 + + doc/zmq_getsockopt.txt | 32 ++++++++++++ + doc/zmq_setsockopt.txt | 32 ++++++++++++ + include/zmq.h | 4 +- + src/options.cpp | 39 +++++++++++++++- + src/options.hpp | 4 ++ + src/socket_base.cpp | 8 ++-- + tests/Makefile.am | 4 +- + tests/test_timeo.cpp | 125 ++++++++++++++++++++++++++++++++++++++++++++++++ + 10 files changed, 244 insertions(+), 7 deletions(-) + +commit 6ab8ef084242299a9b8ada00b500126e465f6618 +Author: Pieter Hintjens +Date: Tue Mar 20 14:48:45 2012 -0500 + + Updated NEWS for issue 342 + + NEWS | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit 6f3967176b1d3b6f0f586cc92848f9f6e80ee912 +Merge: 24f1175 4b8ace2 +Author: Pieter Hintjens +Date: Tue Mar 20 12:47:19 2012 -0700 + + Merge pull request #42 from yisding/master + + missing algorithm include + +commit 24f1175d942323697bff6ed1690ffbdcf2f33631 +Merge: 25c7cd0 48f70a8 +Author: Chuck Remes +Date: Tue Mar 20 09:40:20 2012 -0700 + + Merge pull request #44 from pieterh/master + + Fixed issue LIBZMQ-293 - libzmq doesn't follow ZMTP/1.0 spec + +commit 48f70a88a31245667fccd5227d60cac34a06855f +Author: Pieter Hintjens +Date: Tue Mar 20 11:28:36 2012 -0500 + + Fixed issue #293 - libzmq doesn't follow ZMTP/1.0 spec + + NEWS | 4 +++- + src/encoder.cpp | 4 ++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +commit 25c7cd0691b77770a4b85a13964e22d2274da4b7 +Author: Pieter Hintjens +Date: Tue Mar 20 11:05:26 2012 -0500 + + Updated for issue 332 + + NEWS | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit 033907f2b810f8476c300c169e0fa6b912a56e22 +Author: Pieter Hintjens +Date: Thu Feb 16 12:14:56 2012 -0600 + + Updated NEWS for PR #36 + + NEWS | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +commit e4d7ad2643ac4e5391ae3939d3e19b6b0a05830f +Merge: ec3e95a ba61dde +Author: Pieter Hintjens +Date: Tue Mar 20 09:02:55 2012 -0700 + + Merge pull request #43 from jlopex/master + + Fixes issue LIBZMQ-332 + +commit ba61dde6730aa79f05450a8b56b22dbf528eb57c +Author: Javier Lopez +Date: Mon Mar 19 19:13:56 2012 -0700 + + Fixes zeromq 2.1 not compiling on Android + + According to the libc documentation S_IWRITE is only for BSD + compatibility: + + http://www.gnu.org/s/hello/manual/libc/Permission-Bits.html + + This patch adds a check to determine the target platform and + use correct file access definition in each case: + + - For Linux and Android S_IWUSR is used. + - For other platforms S_IWRITE is used. + + Signed-off-by: Javier Lopez + + src/options.cpp | 10 +++++++--- + 1 files changed, 7 insertions(+), 3 deletions(-) + +commit 4b8ace2e68b2a50caad1b6204335aa00720c1c8e +Author: Yi Ding +Date: Sun Feb 19 15:13:27 2012 -0600 + + Add algorithm include for std::swap + + include/zmq.hpp | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit ec3e95a67e9fba9542e45aeadd5bd9fc22ea6dfa +Merge: 71dc626 dbf1db2 +Author: Pieter Hintjens +Date: Thu Feb 16 10:16:29 2012 -0800 + + Merge pull request #40 from gitfoxi/master + + Backport some build fixes for old-ass Linux from libzmq development. + +commit 71dc626e82100e9be7a61d92f1f9e51aa50fa40c +Merge: 80b2764 ec070c5 +Author: Pieter Hintjens +Date: Thu Feb 16 10:15:37 2012 -0800 + + Merge pull request #38 from jtzl/master + + updated INSTALL documentation as per pull request #37 + +commit 80b27649bc1d00fde72b98d79d9f407dfee0c30a +Merge: e23eb9d 5361000 +Author: Pieter Hintjens +Date: Thu Feb 16 10:13:26 2012 -0800 + + Merge pull request #36 from gimaker/trie-pruning + + Backport fix to prune the trie from zmq3 (LIBZMQ-305) + +commit e23eb9dd2a66104f54ed8517aee56161d0382061 +Author: Pieter Hintjens +Date: Thu Feb 16 12:10:34 2012 -0600 + + Updated NEWS for PR #39 + + NEWS | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +commit de1c5fd75d28af7fc9b849f5c79c89c2ccc9fbb3 +Author: Pieter Hintjens +Date: Sun Dec 18 19:23:54 2011 -0600 + + Prepared for 2.1.12 + + NEWS | 7 +++++++ + include/zmq.h | 2 +- + 2 files changed, 8 insertions(+), 1 deletions(-) + +commit 8123b18284b1dadf4a72b7d6e644471539239282 +Merge: 9bea035 2b148ac +Author: Pieter Hintjens +Date: Thu Feb 16 10:09:10 2012 -0800 + + Merge pull request #39 from vortechs2000/issue-301 + + Fix builds on HP-UX 11iv3 when using either gcc or aCC + +commit 9bea035b96d90fbfeefe248453697c9aaf68594e +Merge: 73f167e 1bff796 +Author: Pieter Hintjens +Date: Tue Feb 14 09:10:39 2012 -0800 + + Merge pull request #41 from thesamet/master + + Prevent unused variable warning in presence of assertions. + +commit 1bff796edb408aafcc9096849fd41209afa20d66 +Author: Nadav Samet +Date: Mon Feb 13 22:09:13 2012 -0800 + + Prevent unused variable warning in presence of assertions. + + include/zmq.hpp | 12 ++++++++++-- + 1 files changed, 10 insertions(+), 2 deletions(-) + +commit dbf1db2253cac6cf06488e2739068be135983682 +Author: m <415fox@gmail.com> +Date: Sat Jan 28 13:30:52 2012 -0800 + + Backport ./configure --with-poller from libzmq development. + + If you've been configuring the poller using: + CPPFLAGS=-DZMQ_FORCE_POLL ./configure + + Now you're going to want to say: + ./configure --with-poller=poll + + acinclude.m4 | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + configure.in | 5 +- + 2 files changed, 194 insertions(+), 1 deletions(-) + +commit 34da56118ee70ce594662960cdac90ca55f87ed0 +Author: 415fox@gmail.com <415fox@gmail.com> +Date: Sat Jan 28 12:37:56 2012 -0800 + + Fix: Whitespace and comment. + + src/clock.cpp | 20 ++++++++++---------- + 1 files changed, 10 insertions(+), 10 deletions(-) + +commit 4a90c1027731ccad41cf44294c92f1ad1c8eb7ba +Author: 415fox@gmail.com <415fox@gmail.com> +Date: Fri Jan 27 12:40:56 2012 -0800 + + Fix: runtime patch for when system has clock_gettime but does not support CLOCK_MONOTONIC. + + src/clock.cpp | 11 ++++++++++- + 1 files changed, 10 insertions(+), 1 deletions(-) + +commit 9631d910082fa302c3f3d45fbac189139747b933 +Author: 415fox@gmail.com <415fox@gmail.com> +Date: Sat Jan 28 12:24:14 2012 -0800 + + Source char_traits from GCC C++ Library directly to clarify license. + + http://gcc.gnu.org/onlinedocs/libstdc++/ + Previously borrowed code from id3lib was considered shady. + Placed in its own file for style reasons. + + src/blob.hpp | 96 +--------------------------------- + src/gcc_421_char_traits.hpp | 119 +++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 122 insertions(+), 93 deletions(-) + +commit 1050ffe01a159dd4fdf0880932b55439c8dad36f +Author: 415fox@gmail.com <415fox@gmail.com> +Date: Fri Jan 27 12:24:14 2012 -0800 + + Fix basic_string not implemented in stdc++ 3 + + src/blob.hpp | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 94 insertions(+), 0 deletions(-) + +commit 7a55220be42c7e0ead23a29e26caddac76110577 +Author: 415fox@gmail.com <415fox@gmail.com> +Date: Fri Jan 27 12:23:32 2012 -0800 + + Fix bad combination of gcc3, -Werror and private destructor. + + src/ctx.hpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 536100053cd3bb28d9d8be33b2e48a60d3d225ee +Author: Staffan Gimåker +Date: Thu Jan 26 14:18:03 2012 +0100 + + Fix segfault bug when pruning the trie. + + Signed-off-by: Staffan Gimåker + + src/trie.cpp | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +commit 2b148acd46db833b8c2b880622d0f77bb5e1d89c +Author: AJ Lewis +Date: Tue Jan 17 11:20:32 2012 -0600 + + Patch from Mikko Koppanen for #LIBZMQ-301 + + Add the '-Ae' flag when using aCC + + Check if CLOCK_MONOTONIC defined before using it - if not, use gethrtime() + + Signed-off-by: AJ Lewis + + configure.in | 2 ++ + src/clock.cpp | 8 ++++++-- + 2 files changed, 8 insertions(+), 2 deletions(-) + +commit ec070c59343d2991f1bbeb3613c4ae88a55c580f +Author: Jtzl Forshizl +Date: Tue Jan 17 14:07:51 2012 -0500 + + clarifying installation documentation for users building from repo + + INSTALL | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +commit e954cb49732facaa627dff617d214a5b5cab90e5 +Author: AJ Lewis +Date: Tue Jan 17 10:33:55 2012 -0600 + + Change peer_identity_size (in all cases) in the command_t structure to be a size_t instead of an unsigned char. + + The peer_identity_size field in the attach and bind substructure is + used to generate a C++ base_string object from an unsigned char *, and + that object expects a size_t, not an unsigned char. If an unsigned + char is used, the HPUX aCC compiler gets confused and can't figure out + which constructor to use. + + Signed-off-by: AJ Lewis + + src/command.hpp | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +commit 75bc614d55a36f76cfdadbf44b094cbd132b11dd +Author: Staffan Gimåker +Date: Wed Jan 4 11:31:32 2012 +0100 + + Backport fix to prune the trie from zmq3. + + Signed-off-by: Staffan Gimåker + + src/trie.cpp | 24 ++++++++++++++++++++++-- + src/trie.hpp | 3 +++ + 2 files changed, 25 insertions(+), 2 deletions(-) + commit 73f167eeb5ce9d26678399a574918f9813976024 Author: Pieter Hintjens Date: Sun Dec 18 19:11:17 2011 -0600 diff --git a/INSTALL b/INSTALL index d3c5b40..e3f7a5f 100644 --- a/INSTALL +++ b/INSTALL @@ -40,7 +40,9 @@ may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version -of `autoconf'. +of `autoconf'. If you are building a development version from the +Github source, for example, use `./autogen.sh' to generate `configure' +and other necessary installation scripts. The simplest way to compile this package is: diff --git a/NEWS b/NEWS index 936a027..755e595 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,25 @@ +0MQ version 2.2.0 (Stable), released on 2012/04/04 +================================================== + +Changes +------- + +* Fixed issue 349, add send/recv timeout socket options. + +Bug fixes +--------- + +* Fixed issue 301, fix builds on HP-UX 11iv3 when using either gcc or aCC. + +* Fixed issue 305, memory leakage when using dynamic subscriptions. + +* Fixed issue 332, libzmq doesn't compile on Android NDK. + +* Fixed issue 293, libzmq doesn't follow ZMTP/1.0 spec. + +* Fixed issue 342, cannot build against zmq.hpp under C++11. + + 0MQ version 2.1.11 (Stable), released on 2011/12/18 =================================================== diff --git a/acinclude.m4 b/acinclude.m4 index 597252d..0d930aa 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -602,3 +602,193 @@ int main (int argc, char *argv []) [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_sock_cloexec="no"] ) }]) + +dnl ################################################################################ +dnl # LIBZMQ_CHECK_POLLER_KQUEUE([action-if-found], [action-if-not-found]) # +dnl # Checks kqueue polling system # +dnl ################################################################################ +AC_DEFUN([LIBZMQ_CHECK_POLLER_KQUEUE], [{ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [ +#include +#include +#include + ], +[[ +struct kevent t_kev; +kqueue(); +]] + )], + [libzmq_cv_have_poller_kqueue="yes" ; $1], + [libzmq_cv_have_poller_kqueue="no" ; $2]) +}]) + +dnl ################################################################################ +dnl # LIBZMQ_CHECK_POLLER_EPOLL([action-if-found], [action-if-not-found]) # +dnl # Checks epoll polling system can actually run # +dnl # For cross-compile, only requires that epoll can link # +dnl ################################################################################ +AC_DEFUN([LIBZMQ_CHECK_POLLER_EPOLL], [{ + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [ +#include + ], +[[ +struct epoll_event t_ev; +int r; +r = epoll_create(10); +return(r < 0); +]] + )], + [libzmq_cv_have_poller_epoll="yes" ; $1], + [libzmq_cv_have_poller_epoll="no" ; $2], + [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [ +#include + ], + [[ + struct epoll_event t_ev; + epoll_create(10); + ]] + )], + [libzmq_cv_have_poller_epoll="yes" ; $1], + [libzmq_cv_have_poller_epoll="no" ; $2]) + + ]) +}]) + +dnl ################################################################################ +dnl # LIBZMQ_CHECK_POLLER_DEVPOLL([action-if-found], [action-if-not-found]) # +dnl # Checks devpoll polling system # +dnl ################################################################################ +AC_DEFUN([LIBZMQ_CHECK_POLLER_DEVPOLL], [{ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [ +#include + ], +[[ +struct pollfd t_devpoll; +int fd = open("/dev/poll", O_RDWR); +]] + )], + [libzmq_cv_have_poller_devpoll="yes" ; $1], + [libzmq_cv_have_poller_devpoll="no" ; $2]) +}]) + +dnl ################################################################################ +dnl # LIBZMQ_CHECK_POLLER_POLL([action-if-found], [action-if-not-found]) # +dnl # Checks poll polling system # +dnl ################################################################################ +AC_DEFUN([LIBZMQ_CHECK_POLLER_POLL], [{ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [ +#include + ], +[[ +struct pollfd t_poll; +poll(&t_poll, 1, 1); +]] + )], + [libzmq_cv_have_poller_poll="yes" ; $1], + [libzmq_cv_have_poller_poll="no" ; $2]) +}]) + +dnl ################################################################################ +dnl # LIBZMQ_CHECK_POLLER_SELECT([action-if-found], [action-if-not-found]) # +dnl # Checks select polling system # +dnl ################################################################################ +AC_DEFUN([LIBZMQ_CHECK_POLLER_SELECT], [{ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [ +#ifdef ZMQ_HAVE_WINDOWS +#include "winsock2.h" +#elif defined ZMQ_HAVE_OPENVMS +#include +#include +#else +#include +#endif + ], +[[ +fd_set t_rfds; +struct timeval tv; + +FD_ZERO(&t_rfds); +FD_SET(0, &t_rfds); + +tv.tv_sec = 5; +tv.tv_usec = 0; + +select(1, &t_rfds, NULL, NULL, &tv); +]] + )], + [libzmq_cv_have_poller_select="yes" ; $1], + [libzmq_cv_have_poller_select="no" ; $2]) +}]) + +dnl ################################################################################ +dnl # LIBZMQ_CHECK_POLLER([action-if-found], [action-if-not-found]) # +dnl # Choose polling system # +dnl ################################################################################ +AC_DEFUN([LIBZMQ_CHECK_POLLER], [{ + + # Allow user to disable doc build + AC_ARG_WITH([poller], [AS_HELP_STRING([--with-poller], + [choose polling system manually. valid values are kqueue, epoll, devpoll, poll or select [default=autodetect]])]) + + AC_MSG_CHECKING([for suitable polling system]) + + case "${with_poller}" in + kqueue|epoll|devpoll|poll|select) + # User has chosen polling system + libzmq_cv_poller="${with_poller}" + ;; + + *) + # try to find suitable polling system. the order of testing is: + # kqueue -> epoll -> devpoll -> poll -> select + for subsystem in kqueue epoll devpoll poll select; do + + case "${subsystem}" in + kqueue) + LIBZMQ_CHECK_POLLER_KQUEUE([libzmq_cv_poller=$subsystem], []) + ;; + + epoll) + LIBZMQ_CHECK_POLLER_EPOLL([libzmq_cv_poller=$subsystem], []) + ;; + + devpoll) + LIBZMQ_CHECK_POLLER_DEVPOLL([libzmq_cv_poller=$subsystem], []) + ;; + + poll) + LIBZMQ_CHECK_POLLER_POLL([libzmq_cv_poller=$subsystem], []) + ;; + + select) + LIBZMQ_CHECK_POLLER_SELECT([libzmq_cv_poller=$subsystem], []) + ;; + esac + + if test "x${libzmq_cv_poller}" != "x"; then + break + fi + done + ;; + esac + + libzmq_cv_poller_flag=`echo "ZMQ_FORCE_${libzmq_cv_poller}" | tr a-z A-Z` + + AS_IF([test "x${libzmq_cv_poller}" != "x"], + [AC_MSG_RESULT([using $libzmq_cv_poller]) ; $1], [AC_MSG_RESULT(no suitable polling system found) ; $2]) +}]) + + diff --git a/configure b/configure index 5ac6f90..e55298f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for zeromq 2.1.11. +# Generated by GNU Autoconf 2.68 for zeromq 2.2.0. # # Report bugs to . # @@ -570,8 +570,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='zeromq' PACKAGE_TARNAME='zeromq' -PACKAGE_VERSION='2.1.11' -PACKAGE_STRING='zeromq 2.1.11' +PACKAGE_VERSION='2.2.0' +PACKAGE_STRING='zeromq 2.2.0' PACKAGE_BUGREPORT='zeromq-dev@lists.zeromq.org' PACKAGE_URL='' @@ -774,6 +774,7 @@ enable_debug with_gcov with_dce with_documentation +with_poller with_pgm with_system_pgm ' @@ -1339,7 +1340,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures zeromq 2.1.11 to adapt to many kinds of systems. +\`configure' configures zeromq 2.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1409,7 +1410,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of zeromq 2.1.11:";; + short | recursive ) echo "Configuration of zeromq 2.2.0:";; esac cat <<\_ACEOF @@ -1441,6 +1442,9 @@ Optional Packages: functions --without-documentation disable documentation build even if asciidoc and xmlto are present [default=no] + --with-poller choose polling system manually. valid values are + kqueue, epoll, devpoll, poll or select + [default=autodetect] --with-pgm build libzmq with PGM extension [default=no] --with-system-pgm build libzmq with PGM extension. Requires pkg-config [default=no] @@ -1535,7 +1539,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -zeromq configure 2.1.11 +zeromq configure 2.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2332,7 +2336,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by zeromq $as_me 2.1.11, which was +It was created by zeromq $as_me 2.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3151,7 +3155,7 @@ fi # Define the identity of the package. PACKAGE='zeromq' - VERSION='2.1.11' + VERSION='2.2.0' cat >>confdefs.h <<_ACEOF @@ -3298,9 +3302,10 @@ AM_BACKSLASH='\' # # ZeroMQ versions prior to 2.1.0 use 0.0.0 ("unstable") # ZeroMQ version 2.1.0: 1:0:0 +# ZeroMQ version 2.2.0: 1:1:0 # # libzmq -version-info current:revision:age -LTVER="1:0:0" +LTVER="1:1:0" # Take a copy of original flags @@ -17582,6 +17587,106 @@ _ACEOF fi fi + { + { + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -Ae" >&5 +$as_echo_n "checking whether C compiler supports -Ae... " >&6; } + + libzmq_cv_c_werror_flag_save=$ac_c_werror_flag + ac_c_werror_flag="yes" + + case "xc" in + xc) + libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Ae" + ;; + xcxx) + libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -Ae" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 +$as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} + ;; + esac + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # This hack exist for ICC, which outputs unknown options as remarks + # Remarks are not turned into errors even with -Werror on + if ($GREP 'ignoring unknown' conftest.err || + $GREP 'not supported' conftest.err) >/dev/null 2>&1; then + eval libzmq_cv_c_supports_flag__Ae="no" + else + eval libzmq_cv_c_supports_flag__Ae="yes" + fi +else + eval libzmq_cv_c_supports_flag__Ae="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + case "xc" in + xc) + CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" + ;; + xcxx) + CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" + ;; + *) + # nothing to restore + ;; + esac + + # Restore the werror flag + ac_c_werror_flag=$libzmq_cv_c_werror_flag_save + + # Call the action as the flags are restored + if eval test x$libzmq_cv_c_supports_flag__Ae = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; +fi + +} + case "xc" in + xc) + if eval test x$libzmq_cv_c_supports_flag__Ae = "xyes"; then : + CFLAGS="-Ae $CFLAGS"; +fi + ;; + xcxx) + if eval test x$libzmq_cv_c_supports_flag__Ae = "xyes"; then : + CPPFLAGS="-Ae $CPPFLAGS"; +fi + ;; + esac +} + for ac_func in gethrtime +do : + ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" +if test "x$ac_cv_func_gethrtime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETHRTIME 1 +_ACEOF + +fi +done + ;; *mingw32*) @@ -18338,6 +18443,246 @@ fi } +# Check polling system +{ + + # Allow user to disable doc build + +# Check whether --with-poller was given. +if test "${with_poller+set}" = set; then : + withval=$with_poller; +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable polling system" >&5 +$as_echo_n "checking for suitable polling system... " >&6; } + + case "${with_poller}" in + kqueue|epoll|devpoll|poll|select) + # User has chosen polling system + libzmq_cv_poller="${with_poller}" + ;; + + *) + # try to find suitable polling system. the order of testing is: + # kqueue -> epoll -> devpoll -> poll -> select + for subsystem in kqueue epoll devpoll poll select; do + + case "${subsystem}" in + kqueue) + { + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +int +main () +{ + +struct kevent t_kev; +kqueue(); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libzmq_cv_have_poller_kqueue="yes" ; libzmq_cv_poller=$subsystem +else + libzmq_cv_have_poller_kqueue="no" ; +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +} + ;; + + epoll) + { + if test "$cross_compiling" = yes; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ + + struct epoll_event t_ev; + epoll_create(10); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libzmq_cv_have_poller_epoll="yes" ; libzmq_cv_poller=$subsystem +else + libzmq_cv_have_poller_epoll="no" ; +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ + +struct epoll_event t_ev; +int r; +r = epoll_create(10); +return(r < 0); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + libzmq_cv_have_poller_epoll="yes" ; libzmq_cv_poller=$subsystem +else + libzmq_cv_have_poller_epoll="no" ; +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +} + ;; + + devpoll) + { + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ + +struct pollfd t_devpoll; +int fd = open("/dev/poll", O_RDWR); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libzmq_cv_have_poller_devpoll="yes" ; libzmq_cv_poller=$subsystem +else + libzmq_cv_have_poller_devpoll="no" ; +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +} + ;; + + poll) + { + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ + +struct pollfd t_poll; +poll(&t_poll, 1, 1); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libzmq_cv_have_poller_poll="yes" ; libzmq_cv_poller=$subsystem +else + libzmq_cv_have_poller_poll="no" ; +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +} + ;; + + select) + { + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef ZMQ_HAVE_WINDOWS +#include "winsock2.h" +#elif defined ZMQ_HAVE_OPENVMS +#include +#include +#else +#include +#endif + +int +main () +{ + +fd_set t_rfds; +struct timeval tv; + +FD_ZERO(&t_rfds); +FD_SET(0, &t_rfds); + +tv.tv_sec = 5; +tv.tv_usec = 0; + +select(1, &t_rfds, NULL, NULL, &tv); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libzmq_cv_have_poller_select="yes" ; libzmq_cv_poller=$subsystem +else + libzmq_cv_have_poller_select="no" ; +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +} + ;; + esac + + if test "x${libzmq_cv_poller}" != "x"; then + break + fi + done + ;; + esac + + libzmq_cv_poller_flag=`echo "ZMQ_FORCE_${libzmq_cv_poller}" | tr a-z A-Z` + + if test "x${libzmq_cv_poller}" != "x"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $libzmq_cv_poller" >&5 +$as_echo "using $libzmq_cv_poller" >&6; } ; CPPFLAGS="${CPPFLAGS} -D${libzmq_cv_poller_flag}" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no suitable polling system found" >&5 +$as_echo "no suitable polling system found" >&6; } ; as_fn_error $? "Unable to continue without polling system" "$LINENO" 5 +fi +} + # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } @@ -20172,7 +20517,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by zeromq $as_me 2.1.11, which was +This file was extended by zeromq $as_me 2.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20238,7 +20583,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -zeromq config.status 2.1.11 +zeromq config.status 2.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -22436,4 +22781,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi - diff --git a/configure.in b/configure.in index bdff0cf..d3f506d 100644 --- a/configure.in +++ b/configure.in @@ -27,9 +27,10 @@ AC_SUBST(PACKAGE_VERSION) # # ZeroMQ versions prior to 2.1.0 use 0.0.0 ("unstable") # ZeroMQ version 2.1.0: 1:0:0 +# ZeroMQ version 2.2.0: 1:1:0 # # libzmq -version-info current:revision:age -LTVER="1:0:0" +LTVER="1:1:0" AC_SUBST(LTVER) # Take a copy of original flags @@ -187,6 +188,8 @@ case "${host_os}" in AS_IF([test "x$with_dce" != xno], [AC_CHECK_LIB(dcekt, uuid_create)], [AC_CHECK_LIB(crypto, RAND_bytes)]) + LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Ae]) + AC_CHECK_FUNCS(gethrtime) ;; *mingw32*) AC_DEFINE(ZMQ_HAVE_WINDOWS, 1, [Have Windows OS]) @@ -251,6 +254,10 @@ esac # Check whether to build docs / install man pages LIBZMQ_CHECK_DOC_BUILD +# Check polling system +LIBZMQ_CHECK_POLLER([CPPFLAGS="${CPPFLAGS} -D${libzmq_cv_poller_flag}"], + [AC_MSG_ERROR([Unable to continue without polling system])]) + # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(errno.h arpa/inet.h netinet/tcp.h netinet/in.h stddef.h \ @@ -395,4 +402,3 @@ AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile foreign/openpgm/Makefile \ builds/redhat/zeromq.spec]) AC_OUTPUT - diff --git a/doc/zmq.7 b/doc/zmq.7 index 7f60700..e87f35a 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: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ" "7" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -215,27 +215,17 @@ The 0MQ distribution includes a C++ language binding, which is documented separa Other language bindings (Python, Ruby, Java and more) are provided by members of the 0MQ community and pointers can be found on the 0MQ website\&. .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. +This manual page was written by the 0MQ community\&. .SH "RESOURCES" .sp Main web site: \m[blue]\fBhttp://www\&.zeromq\&.org/\fR\m[] .sp -Report bugs to the 0MQ development mailing list: <\m[blue]\fBzeromq\-dev@lists\&.zeromq\&.org\fR\m[]\&\s-2\u[3]\d\s+2> +Report bugs to the 0MQ development mailing list: <\m[blue]\fBzeromq\-dev@lists\&.zeromq\&.org\fR\m[]\&\s-2\u[1]\d\s+2> .SH "COPYING" .sp 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 0MQ distribution\&. .SH "NOTES" .IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE -.IP " 3." 4 zeromq-dev@lists.zeromq.org .RS 4 \%mailto:zeromq-dev@lists.zeromq.org diff --git a/doc/zmq.html b/doc/zmq.html index e44f8a1..2c3ceee 100644 --- a/doc/zmq.html +++ b/doc/zmq.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq(7) - +
+

SYNOPSIS

#include <zmq.h>

cc [flags] files -lzmq [libraries]

+
+

DESCRIPTION

The ØMQ lightweight messaging kernel is a library which extends the standard @@ -596,7 +615,8 @@ 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

+
+

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:

@@ -618,6 +638,7 @@ Terminate ØMQ context

+

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 @@ -628,12 +649,17 @@ 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

+
+
+
+

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 @@ -677,7 +703,9 @@ Message manipulation

-

Sockets

+
+
+

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.

@@ -731,7 +759,9 @@ Sending and receiving messages 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

+
+
+

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.

@@ -770,13 +800,18 @@ Local in-process (inter-thread) communication transport

-

Devices

+
+
+

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 @@ -790,6 +825,8 @@ to assist in these cases; for details refer to zmq_errn

+
+

MISCELLANEOUS

The following miscellaneous functions are provided:

@@ -804,6 +841,8 @@ Report ØMQ library version
+
+

LANGUAGE BINDINGS

The ØMQ library provides interfaces suitable for calling from programs in any @@ -811,23 +850,32 @@ 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

+
+

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

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>.

+

This manual page was written by the ØMQ community.

+
+

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 @@ -835,11 +883,12 @@ Public License (LGPL). For details see the files COPYING and COPYIN included with the ØMQ distribution.

+

diff --git a/doc/zmq.txt b/doc/zmq.txt index 16a5d30..1a00c56 100644 --- a/doc/zmq.txt +++ b/doc/zmq.txt @@ -200,8 +200,7 @@ of the 0MQ community and pointers can be found on the 0MQ website. AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. RESOURCES diff --git a/doc/zmq_bind.3 b/doc/zmq_bind.3 index ace7588..8aa0ad0 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: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_BIND" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_BIND" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -157,15 +157,4 @@ assert (rc == 0); \fBzmq_connect\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_bind.html b/doc/zmq_bind.html index e3b1da2..6cb5e28 100644 --- a/doc/zmq_bind.html +++ b/doc/zmq_bind.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_bind(3) - +
+

SYNOPSIS

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

+
+

DESCRIPTION

The zmq_bind() function shall create an endpoint for accepting connections @@ -633,11 +652,15 @@ 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

@@ -715,6 +738,8 @@ No I/O thread is available to accomplish the task.
+
+

EXAMPLE

@@ -731,23 +756,27 @@ rc = zmq_bind (socket, "tcp://eth0:5555"); assert (rc == 0);
+
+ +

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_bind.txt b/doc/zmq_bind.txt index 1d7c2ff..078e619 100644 --- a/doc/zmq_bind.txt +++ b/doc/zmq_bind.txt @@ -89,5 +89,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_close.3 b/doc/zmq_close.3 index d47f494..03a8091 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: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_CLOSE" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_CLOSE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -67,15 +67,4 @@ was invalid\&. \fBzmq_socket\fR(3) \fBzmq_term\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_close.html b/doc/zmq_close.html index f30c3a3..bb7f925 100644 --- a/doc/zmq_close.html +++ b/doc/zmq_close.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_close(3) - +
+

SYNOPSIS

int zmq_close (void *socket);

+
+

DESCRIPTION

The zmq_close() function shall destroy the socket referenced by the socket @@ -603,11 +622,15 @@ For details refer to zmq_setsockopt(3) and

+
+

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

@@ -621,6 +644,8 @@ The provided socket was invalid.
+
+

SEE ALSO

zmq_socket(3) @@ -628,17 +653,19 @@ The provided socket was invalid. zmq_setsockopt(3) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_close.txt b/doc/zmq_close.txt index 47f9bb2..7d727da 100644 --- a/doc/zmq_close.txt +++ b/doc/zmq_close.txt @@ -48,5 +48,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_connect.3 b/doc/zmq_connect.3 index eb0eb03..641e488 100644 --- a/doc/zmq_connect.3 +++ b/doc/zmq_connect.3 @@ -2,12 +2,12 @@ .\" Title: zmq_connect .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_CONNECT" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_CONNECT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -152,15 +152,4 @@ assert (rc == 0); \fBzmq_bind\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_connect.html b/doc/zmq_connect.html index b6353b6..5dc35f8 100644 --- a/doc/zmq_connect.html +++ b/doc/zmq_connect.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_connect(3) - +
+

SYNOPSIS

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

+
+

DESCRIPTION

The zmq_connect() function shall connect the socket referenced by the @@ -643,11 +662,15 @@ physical connection was or can actually be established.

+
+

RETURN VALUE

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

+
+

ERRORS

@@ -701,6 +724,8 @@ No I/O thread is available to accomplish the task.
+
+

EXAMPLE

@@ -717,23 +742,27 @@ rc = zmq_connect (socket, "tcp://server001:5555"); assert (rc == 0);
+
+ +

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_connect.txt b/doc/zmq_connect.txt index 6ec56b0..f260dd5 100644 --- a/doc/zmq_connect.txt +++ b/doc/zmq_connect.txt @@ -87,5 +87,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_cpp.7 b/doc/zmq_cpp.7 index 0008023..38bd1b4 100644 --- a/doc/zmq_cpp.7 +++ b/doc/zmq_cpp.7 @@ -2,12 +2,12 @@ .\" Title: zmq_cpp .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_CPP" "7" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_CPP" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -396,15 +396,4 @@ s\&.send (msg); \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_cpp.html b/doc/zmq_cpp.html index c59c01d..ff44f57 100644 --- a/doc/zmq_cpp.html +++ b/doc/zmq_cpp.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_cpp(7) - +
+

SYNOPSIS

#include <zmq.hpp>

c++ [flags] files -lzmq [libraries]

+
+

DESCRIPTION

This manual page describes how the ØMQ C++ language binding maps to the @@ -592,126 +611,151 @@ underlying ØMQ C library functions.

All ØMQ constants defined by zmq.h are also available to the C++ language binding.

The following classes are provided in the zmq namespace:

-

Context

+
+

Context

The context_t class encapsulates functionality dealing with the initialisation and termination of a ØMQ context.

+

Constructor

-
context_t::context_t(int io_threads)
-
+
context_t::context_t(int io_threads)
+

Maps to the zmq_init() function, as described in zmq_init(3).

+
+

Destructor

-
context_t::~context_t(void)
-
+
context_t::~context_t(void)
+

Maps to the zmq_term() function, as described in zmq_term(3).

+
+

Methods

None.

-

Socket

+
+
+
+

Socket

The socket_t class encapsulates a ØMQ socket.

+

Constructor

-
socket_t::socket_t(context_t &context, int type)
-
+
socket_t::socket_t(context_t &context, int type)
+

Maps to the zmq_socket() function, as described in zmq_socket(3).

+
+

Destructor

-
socket_t::~socket_t(void)
-
+
socket_t::~socket_t(void)
+

Calls the zmq_close() function, as described in zmq_close(3).

+
+

Methods

-
void socket_t::getsockopt(int option_name, void *option_value, size_t -*option_len)
-
+
void socket_t::getsockopt(int option_name, void *option_value, size_t
+*option_len)
+

Maps to the zmq_getsockopt() function, as described in zmq_getsockopt(3).

-
void socket_t::setsockopt(int option_name, const void *option_value, size_t -option_len)
-
+
void socket_t::setsockopt(int option_name, const void *option_value, size_t
+option_len)
+

Maps to the zmq_setsockopt() function, as described in zmq_setsockopt(3).

-
void socket_t::bind(const char *endpoint)
-
+
void socket_t::bind(const char *endpoint)
+

Maps to the zmq_bind() function, as described in zmq_bind(3).

-
void socket_t::connect(const char *endpoint)
-
+
void socket_t::connect(const char *endpoint)
+

Maps to the zmq_connect() function, as described in zmq_connect(3).

-
bool socket_t::send(message_t &msg, int flags = 0)
-
+
bool socket_t::send(message_t &msg, int flags = 0)
+

Maps to the zmq_send() function, as described in zmq_send(3). Returns true if message is successfully sent, false if it is not.

-
bool socket_t::recv(message_t *msg, int flags = 0)
-
+
bool socket_t::recv(message_t *msg, int flags = 0)
+

Maps to the zmq_recv() function, as described in zmq_recv(3). Returns true if message is successfully received, false if it is not.

-

Message

+
+
+
+

Message

The zmq::message_t class encapsulates the zmq_msg_t structure and functions to construct, destruct and manipulate ØMQ messages.

+

Constructor

-
message_t::message_t(void) +
message_t::message_t(void)
 message_t::message_t(size_t size)
-message_t::message_t(void *data, size_t size, free_fn *ffn)
-
+message_t::message_t(void *data, size_t size, free_fn *ffn) +

These map to the zmq_msg_init(), zmq_msg_init_size() and zmq_msg_init_data() functions, described in zmq_msg_init(3), zmq_msg_init_size(3) and zmq_msg_init_data(3) respectively.

+
+

Destructor

-
message_t::~message_t(void)
-
+
message_t::~message_t(void)
+

Calls the zmq_msg_close() function, as described in zmq_msg_close(3).

+
+

Methods

-
void *message_t::data (void)
-
+
void *message_t::data (void)
+

Maps to the zmq_msg_data() function, as described in zmq_msg_data(3).

-
size_t message_t::size (void)
-
+
size_t message_t::size (void)
+

Maps to the zmq_msg_size() function, as described in zmq_msg_size(3).

-
void message_t::copy (message_t *src)
-
+
void message_t::copy (message_t *src)
+

Maps to the zmq_msg_copy() function, as described in zmq_msg_copy(3).

-
void message_t::move (message_t *src)
-
+
void message_t::move (message_t *src)
+

Maps to the zmq_msg_move() function, as described in zmq_msg_move(3).

-
message_t::rebuild(void) +
message_t::rebuild(void)
 message_t::rebuild(size_t size)
-message_t::rebuild(void *data, size_t size, free_fn *ffn)
-
+message_t::rebuild(void *data, size_t size, free_fn *ffn) +

Equivalent to calling the zmq_msg_close() function followed by the corresponding zmq_msg_init() function.

-

Input/output multiplexing

+
+
+
+

Input/output multiplexing

-
int poll (zmq_pollitem_t *items, int nitems, long timeout = -1)
-
+
int poll (zmq_pollitem_t *items, int nitems, long timeout = -1)
+

The poll() function is a namespaced equivalent of the zmq_poll() function, as described in zmq_poll(3).

@@ -725,6 +769,9 @@ should cast an instance of the socket_t class to (void *).
+
+
+

ERROR HANDLING

All errors reported by the underlying ØMQ C library functions are automatically @@ -732,6 +779,8 @@ converted to exceptions by the C++ language binding. The zmq::error_t is derived from the std::exception class and uses the zmq_strerror() function to convert the error code to human-readable string.

+
+

EXAMPLE

@@ -744,21 +793,25 @@ memset (msg.data (), 0, 100); s.send (msg);
+
+

SEE ALSO

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_cpp.txt b/doc/zmq_cpp.txt index cd5cdc9..b963afa 100644 --- a/doc/zmq_cpp.txt +++ b/doc/zmq_cpp.txt @@ -208,5 +208,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_device.3 b/doc/zmq_device.3 index 66ad2be..a8b8477 100644 --- a/doc/zmq_device.3 +++ b/doc/zmq_device.3 @@ -2,12 +2,12 @@ .\" Title: zmq_device .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_DEVICE" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_DEVICE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -118,23 +118,4 @@ zmq_device (ZMQ_QUEUE, frontend, backend); \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Pieter Hintjens <\m[blue]\fBph@imatix\&.com\fR\m[]\&\s-2\u[1]\d\s+2> -.SH "RESOURCES" -.sp -Main web site: \m[blue]\fBhttp://www\&.zeromq\&.org/\fR\m[] -.sp -Report bugs to the 0MQ development mailing list: <\m[blue]\fBzeromq\-dev@lists\&.zeromq\&.org\fR\m[]\&\s-2\u[2]\d\s+2> -.SH "COPYING" -.sp -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 0MQ distribution\&. -.SH "NOTES" -.IP " 1." 4 -ph@imatix.com -.RS 4 -\%mailto:ph@imatix.com -.RE -.IP " 2." 4 -zeromq-dev@lists.zeromq.org -.RS 4 -\%mailto:zeromq-dev@lists.zeromq.org -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_device.html b/doc/zmq_device.html index 06ce951..d460e1c 100644 --- a/doc/zmq_device.html +++ b/doc/zmq_device.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_device(3) - +
+

SYNOPSIS

int zmq_device (int device, const void *frontend, const void *backend);

+
+

DESCRIPTION

The zmq_device() function starts a built-in ØMQ device. The device argument @@ -646,6 +665,8 @@ bind both frontend and backend sockets. The two conventional device models are:<

zmq_device() runs in the current thread and returns only if/when the current context is closed.

+
+

QUEUE DEVICE

ZMQ_QUEUE creates a shared queue that collects requests from a set of clients, @@ -658,6 +679,8 @@ clients and the backend speaks to services. You should use ZMQ_QUEUE wi Other combinations are not documented.

Refer to zmq_socket(3) for a description of these socket types.

+
+

FORWARDER DEVICE

ZMQ_FORWARDER collects messages from a set of publishers and forwards these to @@ -669,6 +692,8 @@ publishers and the backend speaks to subscribers. You should use for the backend. Other combinations are not documented.

Refer to zmq_socket(3) for a description of these socket types.

+
+

STREAMER DEVICE

ZMQ_STREAMER collects tasks from a set of pushers and forwards these to a set @@ -680,11 +705,15 @@ and the backend speaks to pullers. You should use ZMQ_STREAMER with a Other combinations are not documented.

Refer to zmq_socket(3) for a description of these socket types.

+
+

RETURN VALUE

The zmq_device() function always returns -1 and errno set to ETERM (the ØMQ context associated with either of the specified sockets was terminated).

+
+

EXAMPLE

@@ -702,6 +731,8 @@ assert (zmq_bind (backend, "tcp://*:5556") == 0); zmq_device (ZMQ_QUEUE, frontend, backend);
+
+

SEE ALSO

zmq_bind(3) @@ -709,27 +740,19 @@ zmq_device (ZMQ_QUEUE, frontend, backend); zmq_socket(3) zmq(7)

-

AUTHORS

-
-

This ØMQ manual page was written by Pieter Hintjens <ph@imatix.com>

-

RESOURCES

+
+

AUTHORS

-

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

-

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

+

This manual page was written by the ØMQ community.

-

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_device.txt b/doc/zmq_device.txt index 93e616d..216052c 100644 --- a/doc/zmq_device.txt +++ b/doc/zmq_device.txt @@ -121,18 +121,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Pieter Hintjens - - -RESOURCES ---------- -Main web site: - -Report bugs to the 0MQ development mailing list: - - -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 0MQ distribution. +This manual page was written by the 0MQ community. diff --git a/doc/zmq_epgm.7 b/doc/zmq_epgm.7 index b83f9ae..0f4536d 100644 --- a/doc/zmq_epgm.7 +++ b/doc/zmq_epgm.7 @@ -2,12 +2,12 @@ .\" Title: zmq_pgm .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_PGM" "7" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_PGM" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -195,15 +195,4 @@ assert (rc == 0); \fBzmq_connect\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_tcp\fR(7) \fBzmq_ipc\fR(7) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_epgm.html b/doc/zmq_epgm.html index 5dfc00d..53f80cc 100644 --- a/doc/zmq_epgm.html +++ b/doc/zmq_epgm.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_pgm(7) - +
+

SYNOPSIS

PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks.

+
+

DESCRIPTION

ØMQ implements two variants of PGM, the standard protocol where PGM datagrams @@ -610,6 +629,8 @@ not require any special privileges.

+
+

ADDRESSING

A ØMQ address string consists of two parts as follows: @@ -618,7 +639,8 @@ transport protocol to use. For the standard PGM protocol, transport sha set to pgm. For the "Encapsulated PGM" protocol transport shall be set to epgm. The meaning of the endpoint part for both the pgm and epgm transport is defined below.

-

Connecting a socket

+
+

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the pgm or epgm transport, the endpoint shall be interpreted as an interface followed by a semicolon, followed by a multicast address, followed by a colon @@ -651,6 +673,9 @@ names exist, thus only the primary IPv4 address may be used to specify an

A multicast address is specified by an IPv4 multicast address in its numeric representation.

+
+
+

WIRE FORMAT

Consecutive PGM datagrams are interpreted by ØMQ as a single continuous stream @@ -658,7 +683,8 @@ of data where ØMQ messages are not necessarily aligned with PGM datagram boundaries and a single ØMQ message may span several PGM datagrams. This stream of data consists of ØMQ messages encapsulated in frames as described in zmq_tcp(7).

-

PGM datagram payload

+
+

PGM datagram payload

The following ABNF grammar represents the payload of a single PGM datagram as used by ØMQ:

@@ -706,6 +732,9 @@ Third datagram payload +--------------+----------------------------+-------------+
+
+
+

EXAMPLE

@@ -723,6 +752,8 @@ rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555"); assert (rc == 0);
+
+

SEE ALSO

zmq_connect(3) @@ -732,17 +763,19 @@ assert (rc == 0); zmq_inproc(7) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_epgm.txt b/doc/zmq_epgm.txt index 68ec504..9ce1452 100644 --- a/doc/zmq_epgm.txt +++ b/doc/zmq_epgm.txt @@ -156,7 +156,7 @@ linkzmq:zmq_ipc[7] linkzmq:zmq_inproc[7] linkzmq:zmq[7] + AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_errno.3 b/doc/zmq_errno.3 index b912203..aac70ed 100644 --- a/doc/zmq_errno.3 +++ b/doc/zmq_errno.3 @@ -2,12 +2,12 @@ .\" Title: zmq_errno .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_ERRNO" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_ERRNO" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -64,15 +64,4 @@ No errors are defined\&. \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_errno.html b/doc/zmq_errno.html index 0a98725..1097ede 100644 --- a/doc/zmq_errno.html +++ b/doc/zmq_errno.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_errno(3) - +
+

SYNOPSIS

int zmq_errno (void);

+
+

DESCRIPTION

The zmq_errno() function shall retrieve the value of the errno variable for @@ -604,30 +623,38 @@ variable directly.

+
+

RETURN VALUE

The zmq_errno() function shall return the value of the errno variable for the calling thread.

+
+

ERRORS

No errors are defined.

+
+

SEE ALSO

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_errno.txt b/doc/zmq_errno.txt index f9cf6cb..a2d6334 100644 --- a/doc/zmq_errno.txt +++ b/doc/zmq_errno.txt @@ -46,5 +46,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_getsockopt.3 b/doc/zmq_getsockopt.3 index b2a0bfc..ac9bd83 100644 --- a/doc/zmq_getsockopt.3 +++ b/doc/zmq_getsockopt.3 @@ -2,12 +2,12 @@ .\" Title: zmq_getsockopt .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_GETSOCKOPT" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_GETSOCKOPT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -160,6 +160,84 @@ all T} .TE .sp 1 +.SS "ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN" +.sp +Retrieve the timeout for recv operation on the socket\&. If the value is 0, \fIzmq_recv(3)\fR will return immediately, with a EAGAIN error if there is no message to receive\&. If the value is \-1, it will block until a message is available\&. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error\&. +.TS +tab(:); +lt lt +lt lt +lt lt +lt lt. +T{ +.sp +Option value type +T}:T{ +.sp +int +T} +T{ +.sp +Option value unit +T}:T{ +.sp +milliseconds +T} +T{ +.sp +Default value +T}:T{ +.sp +\-1 (infinite) +T} +T{ +.sp +Applicable socket types +T}:T{ +.sp +all +T} +.TE +.sp 1 +.SS "ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN" +.sp +Retrieve the timeout for send operation on the socket\&. If the value is 0, \fIzmq_send(3)\fR will return immediately, with a EAGAIN error if the message cannot be sent\&. If the value is \-1, it will block until the message is sent\&. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error\&. +.TS +tab(:); +lt lt +lt lt +lt lt +lt lt. +T{ +.sp +Option value type +T}:T{ +.sp +int +T} +T{ +.sp +Option value unit +T}:T{ +.sp +milliseconds +T} +T{ +.sp +Default value +T}:T{ +.sp +\-1 (infinite) +T} +T{ +.sp +Applicable socket types +T}:T{ +.sp +all +T} +.TE +.sp 1 .SS "ZMQ_SWAP: Retrieve disk offload size" .sp The \fIZMQ_SWAP\fR option shall retrieve the disk offload (swap) size for the specified \fIsocket\fR\&. A socket which has \fIZMQ_SWAP\fR set to a non\-zero value may exceed its high water mark; in this case outstanding messages shall be offloaded to storage on disk rather than held in memory\&. @@ -930,15 +1008,4 @@ assert (rc == 0); \fBzmq_setsockopt\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_getsockopt.html b/doc/zmq_getsockopt.html index 18c64b1..f726b0b 100644 --- a/doc/zmq_getsockopt.html +++ b/doc/zmq_getsockopt.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_getsockopt(3) - +
+

SYNOPSIS

int zmq_getsockopt (void *socket, int option_name, void *option_value, size_t *option_len);

+
+

DESCRIPTION

The zmq_getsockopt() function shall retrieve the value for the option @@ -594,7 +613,8 @@ to by option_value; upon successful completion zmq_getsockopt()option_len argument to indicate the actual size of the option value stored in the buffer.

The following options can be retrieved with the zmq_getsockopt() function:

-

ZMQ_TYPE: Retrieve socket type

+
+

ZMQ_TYPE: Retrieve socket type

The ZMQ_TYPE option shall retrieve the socket type for the specified socket. The socket type is specified at socket creation time and cannot be modified afterwards.

@@ -644,7 +664,9 @@ all
-

ZMQ_RCVMORE: More message parts to follow

+
+
+

ZMQ_RCVMORE: More message parts to follow

The ZMQ_RCVMORE option shall return a boolean value indicating if the multi-part message currently being read from the specified socket has more message parts to follow. If there are no message parts to follow or if the @@ -698,7 +720,9 @@ all

-

ZMQ_HWM: Retrieve high water mark

+
+
+

ZMQ_HWM: Retrieve high water mark

The ZMQ_HWM option shall retrieve the high water mark for the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the @@ -755,7 +779,117 @@ all

-

ZMQ_SWAP: Retrieve disk offload size

+
+
+

ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN

+

Retrieve the timeout for recv operation on the socket. If the value is 0, +zmq_recv(3) will return immediately, with a EAGAIN error if there is no +message to receive. If the value is -1, it will block until a message is +available. For all other values, it will wait for a message for that amount +of time before returning with an EAGAIN error.

+
+ + + + + + + + + + + + + + + + +
+Option value type +
+
+

+int +

+
+Option value unit +
+
+

+milliseconds +

+
+Default value +
+
+

+-1 (infinite) +

+
+Applicable socket types +
+
+

+all +

+
+
+
+

ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN

+

Retrieve the timeout for send operation on the socket. If the value is 0, +zmq_send(3) will return immediately, with a EAGAIN error if the message +cannot be sent. If the value is -1, it will block until the message is sent. +For all other values, it will try to send the message for that amount of time +before returning with an EAGAIN error.

+
+ + + + + + + + + + + + + + + + +
+Option value type +
+
+

+int +

+
+Option value unit +
+
+

+milliseconds +

+
+Default value +
+
+

+-1 (infinite) +

+
+Applicable socket types +
+
+

+all +

+
+
+
+

ZMQ_SWAP: Retrieve disk offload size

The ZMQ_SWAP option shall retrieve the disk offload (swap) size for the specified socket. A socket which has ZMQ_SWAP set to a non-zero value may exceed its high water mark; in this case outstanding messages shall be @@ -807,7 +941,9 @@ all

-

ZMQ_AFFINITY: Retrieve I/O thread affinity

+
+
+

ZMQ_AFFINITY: Retrieve I/O thread affinity

The ZMQ_AFFINITY option shall retrieve the I/O thread affinity for newly created connections on the specified socket.

Affinity determines which threads from the ØMQ I/O thread pool associated with @@ -865,7 +1001,9 @@ N/A

-

ZMQ_IDENTITY: Retrieve socket identity

+
+
+

ZMQ_IDENTITY: Retrieve socket identity

The ZMQ_IDENTITY option shall retrieve the identity of the specified socket. Socket identity determines if existing ØMQ infrastructure (message queues, forwarding devices) shall be identified with a specific application @@ -923,7 +1061,9 @@ all

-

ZMQ_RATE: Retrieve multicast data rate

+
+
+

ZMQ_RATE: Retrieve multicast data rate

The ZMQ_RATE option shall retrieve the maximum send or receive data rate for multicast transports using the specified socket.

@@ -972,7 +1112,9 @@ all, when using multicast transports
-

ZMQ_RECOVERY_IVL: Get multicast recovery interval

+
+
+

ZMQ_RECOVERY_IVL: Get multicast recovery interval

The ZMQ_RECOVERY_IVL option shall retrieve the recovery interval for multicast transports using the specified socket. The recovery interval determines the maximum time in seconds that a receiver can be absent from a @@ -1023,7 +1165,9 @@ all, when using multicast transports

-

ZMQ_RECOVERY_IVL_MSEC: Get multicast recovery interval in milliseconds

+
+
+

ZMQ_RECOVERY_IVL_MSEC: Get multicast recovery interval in milliseconds

The ZMQ_RECOVERY_IVL’_MSEC option shall retrieve the recovery interval, in milliseconds, for multicast transports using the specified 'socket. The recovery interval determines the maximum time in seconds that a receiver @@ -1079,7 +1223,9 @@ all, when using multicast transports

-

ZMQ_MCAST_LOOP: Control multicast loop-back

+
+
+

ZMQ_MCAST_LOOP: Control multicast loop-back

The ZMQ_MCAST_LOOP option controls whether data sent via multicast transports can also be received by the sending host via loop-back. A value of zero indicates that the loop-back functionality is disabled, while the default @@ -1133,7 +1279,9 @@ all, when using multicast transports

-

ZMQ_SNDBUF: Retrieve kernel transmit buffer size

+
+
+

ZMQ_SNDBUF: Retrieve kernel transmit buffer size

The ZMQ_SNDBUF option shall retrieve the underlying kernel transmit buffer size for the specified socket. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the @@ -1184,7 +1332,9 @@ all

-

ZMQ_RCVBUF: Retrieve kernel receive buffer size

+
+
+

ZMQ_RCVBUF: Retrieve kernel receive buffer size

The ZMQ_RCVBUF option shall retrieve the underlying kernel receive buffer size for the specified socket. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the @@ -1235,7 +1385,9 @@ all

-

ZMQ_LINGER: Retrieve linger period for socket shutdown

+
+
+

ZMQ_LINGER: Retrieve linger period for socket shutdown

The ZMQ_LINGER option shall retrieve the linger period for the specified socket. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with @@ -1313,7 +1465,9 @@ all

-

ZMQ_RECONNECT_IVL: Retrieve reconnection interval

+
+
+

ZMQ_RECONNECT_IVL: Retrieve reconnection interval

The ZMQ_RECONNECT_IVL option shall retrieve the initial reconnection interval for the specified socket. The reconnection interval is the period ØMQ shall wait between attempts to reconnect disconnected peers when using @@ -1373,7 +1527,9 @@ all, only for connection-oriented transports

-

ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval

+
+
+

ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval

The ZMQ_RECONNECT_IVL_MAX option shall retrieve the maximum reconnection interval for the specified socket. This is the maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval @@ -1434,7 +1590,9 @@ all, only for connection-oriented transport

-

ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections

+
+
+

ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections

The ZMQ_BACKLOG option shall retrieve the maximum length of the queue of outstanding peer connections for the specified socket; this only applies to connection-oriented transports. For details refer to your operating system @@ -1485,7 +1643,9 @@ all, only for connection-oriented transports

-

ZMQ_FD: Retrieve file descriptor associated with the socket

+
+
+

ZMQ_FD: Retrieve file descriptor associated with the socket

The ZMQ_FD option shall retrieve the file descriptor associated with the specified socket. The returned file descriptor can be used to integrate the socket into an existing event loop; the ØMQ library shall signal any pending @@ -1558,7 +1718,9 @@ all

-

ZMQ_EVENTS: Retrieve socket event state

+
+
+

ZMQ_EVENTS: Retrieve socket event state

The ZMQ_EVENTS option shall retrieve the event state for the specified socket. The returned value is a bit mask constructed by OR’ing a combination of the following event flags:

@@ -1633,11 +1795,16 @@ all
+
+
+

RETURN VALUE

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

+
+

ERRORS

@@ -1678,6 +1845,8 @@ The operation was interrupted by delivery of a signal.
+
+

EXAMPLE

@@ -1690,23 +1859,27 @@ rc = zmq_getsockopt (socket, ZMQ_HWM, &hwm, &hwm_size); assert (rc == 0);
+
+ +

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt index 1e075d7..b39c784 100644 --- a/doc/zmq_getsockopt.txt +++ b/doc/zmq_getsockopt.txt @@ -79,6 +79,38 @@ Default value:: 0 Applicable socket types:: all +ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Retrieve the timeout for recv operation on the socket. If the value is `0`, +_zmq_recv(3)_ will return immediately, with a EAGAIN error if there is no +message to receive. If the value is `-1`, it will block until a message is +available. For all other values, it will wait for a message for that amount +of time before returning with an EAGAIN error. + +[horizontal] +Option value type:: int +Option value unit:: milliseconds +Default value:: -1 (infinite) +Applicable socket types:: all + + +ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Retrieve the timeout for send operation on the socket. If the value is `0`, +_zmq_send(3)_ will return immediately, with a EAGAIN error if the message +cannot be sent. If the value is `-1`, it will block until the message is sent. +For all other values, it will try to send the message for that amount of time +before returning with an EAGAIN error. + +[horizontal] +Option value type:: int +Option value unit:: milliseconds +Default value:: -1 (infinite) +Applicable socket types:: all + + ZMQ_SWAP: Retrieve disk offload size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SWAP' option shall retrieve the disk offload (swap) size for the @@ -403,5 +435,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_init.3 b/doc/zmq_init.3 index 052397d..d8aa63d 100644 --- a/doc/zmq_init.3 +++ b/doc/zmq_init.3 @@ -2,12 +2,12 @@ .\" Title: zmq_init .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_INIT" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_INIT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -57,15 +57,4 @@ was requested\&. \fBzmq\fR(7) \fBzmq_term\fR(3) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_init.html b/doc/zmq_init.html index 1798d87..b427285 100644 --- a/doc/zmq_init.html +++ b/doc/zmq_init.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_init(3) - +
+

SYNOPSIS

void *zmq_init (int io_threads);

+
+

DESCRIPTION

The zmq_init() function initialises a ØMQ context.

@@ -594,12 +613,16 @@ messaging you may set this to zero, otherwise set it to at least one.

threads as necessary, without any additional locking required on the part of the caller.

+
+

RETURN VALUE

The zmq_init() function shall return an opaque handle to the initialised context if successful. Otherwise it shall return NULL and set errno to one of the values defined below.

+
+

ERRORS

@@ -613,22 +636,26 @@ An invalid number of io_threads was requested.
+
+

SEE ALSO

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_init.txt b/doc/zmq_init.txt index eadf65d..606b71d 100644 --- a/doc/zmq_init.txt +++ b/doc/zmq_init.txt @@ -47,5 +47,4 @@ linkzmq:zmq_term[3] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_inproc.7 b/doc/zmq_inproc.7 index 567813e..df4cb6c 100644 --- a/doc/zmq_inproc.7 +++ b/doc/zmq_inproc.7 @@ -2,12 +2,12 @@ .\" Title: zmq_inproc .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_INPROC" "7" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_INPROC" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -101,15 +101,4 @@ assert (rc == 0); \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_ipc\fR(7) \fBzmq_tcp\fR(7) \fBzmq_pgm\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_inproc.html b/doc/zmq_inproc.html index f3176f9..083be3a 100644 --- a/doc/zmq_inproc.html +++ b/doc/zmq_inproc.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_inproc(7) - +
+

SYNOPSIS

The in-process transport passes messages via memory directly between threads @@ -596,6 +613,8 @@ only you can initialise the context with zero I/O threads. See

+
+

ADDRESSING

A ØMQ address string consists of two parts as follows: @@ -603,23 +622,31 @@ only you can initialise the context with zero I/O threads. See transport protocol to use, and for the in-process transport shall be set to inproc. The meaning of the endpoint part for the in-process transport is defined below.

-

Assigning a local address to a socket

+
+

Assigning a local address to a socket

When assigning a local address to a socket using zmq_bind() with the inproc transport, the endpoint shall be interpreted as an arbitrary string identifying the name to create. The name must be unique within the ØMQ context associated with the socket and may be up to 256 characters in length. No other restrictions are placed on the format of the name.

-

Connecting a socket

+
+
+

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the inproc transport, the endpoint shall be interpreted as an arbitrary string identifying the name to connect to. The name must have been previously created by assigning it to at least one socket within the same ØMQ context as the socket being connected.

+
+
+

WIRE FORMAT

Not applicable.

+
+

EXAMPLES

@@ -643,6 +670,8 @@ rc = zmq_connect(socket, "inproc://my-endpoint"); assert (rc == 0);
+
+

SEE ALSO

zmq_bind(3) @@ -652,17 +681,19 @@ assert (rc == 0); zmq_pgm(7) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_inproc.txt b/doc/zmq_inproc.txt index e68e14b..128e9d5 100644 --- a/doc/zmq_inproc.txt +++ b/doc/zmq_inproc.txt @@ -85,5 +85,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_ipc.7 b/doc/zmq_ipc.7 index f9aafb6..a410925 100644 --- a/doc/zmq_ipc.7 +++ b/doc/zmq_ipc.7 @@ -2,12 +2,12 @@ .\" Title: zmq_ipc .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_IPC" "7" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_IPC" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -95,15 +95,4 @@ assert (rc == 0); \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_inproc\fR(7) \fBzmq_tcp\fR(7) \fBzmq_pgm\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_ipc.html b/doc/zmq_ipc.html index 8b0601d..dc010a8 100644 --- a/doc/zmq_ipc.html +++ b/doc/zmq_ipc.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_ipc(7) - +
+

SYNOPSIS

The inter-process transport passes messages between local processes using a @@ -594,6 +611,8 @@ systems that provide UNIX domain sockets.

+
+

ADDRESSING

A ØMQ address string consists of two parts as follows: @@ -601,24 +620,32 @@ systems that provide UNIX domain sockets. transport protocol to use, and for the inter-process transport shall be set to ipc. The meaning of the endpoint part for the inter-process transport is defined below.

-

Assigning a local address to a socket

+
+

Assigning a local address to a socket

When assigning a local address to a socket using zmq_bind() with the ipc transport, the endpoint shall be interpreted as an arbitrary string identifying the pathname to create. The pathname must be unique within the operating system namespace used by the ipc implementation, and must fulfill any restrictions placed by the operating system on the format and length of a pathname.

-

Connecting a socket

+
+
+

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the ipc transport, the endpoint shall be interpreted as an arbitrary string identifying the pathname to connect to. The pathname must have been previously created within the operating system namespace by assigning it to a socket with zmq_bind().

+
+
+

WIRE FORMAT

Not applicable.

+
+

EXAMPLES

@@ -636,6 +663,8 @@ rc = zmq_connect(socket, "ipc:///tmp/feeds/0"); assert (rc == 0);
+
+

SEE ALSO

zmq_bind(3) @@ -645,17 +674,19 @@ assert (rc == 0); zmq_pgm(7) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_ipc.txt b/doc/zmq_ipc.txt index 974ad24..1d4df2c 100644 --- a/doc/zmq_ipc.txt +++ b/doc/zmq_ipc.txt @@ -76,5 +76,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_msg_close.3 b/doc/zmq_msg_close.3 index 07892bc..e6afc8e 100644 --- a/doc/zmq_msg_close.3 +++ b/doc/zmq_msg_close.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_close .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_MSG_CLOSE" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_MSG_CLOSE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -67,15 +67,4 @@ Invalid message\&. \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_msg_close.html b/doc/zmq_msg_close.html index 621d39c..fd02b53 100644 --- a/doc/zmq_msg_close.html +++ b/doc/zmq_msg_close.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_msg_close(3) - +
+

SYNOPSIS

int zmq_msg_close (zmq_msg_t *msg);

+
+

DESCRIPTION

The zmq_msg_close() function shall inform the ØMQ infrastructure that any @@ -603,11 +622,15 @@ no longer required, otherwise memory leaks may occur.

+
+

RETURN VALUE

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

+
+

ERRORS

@@ -621,6 +644,8 @@ Invalid message.
+
+

SEE ALSO

zmq_msg_init(3) @@ -630,17 +655,19 @@ Invalid message. zmq_msg_size(3) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_msg_close.txt b/doc/zmq_msg_close.txt index 025302b..1150e1c 100644 --- a/doc/zmq_msg_close.txt +++ b/doc/zmq_msg_close.txt @@ -51,5 +51,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_msg_copy.3 b/doc/zmq_msg_copy.3 index 01f58e6..e246337 100644 --- a/doc/zmq_msg_copy.3 +++ b/doc/zmq_msg_copy.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_copy .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_MSG_COPY" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_MSG_COPY" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -81,15 +81,4 @@ Invalid message\&. \fBzmq_msg_move\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_msg_copy.html b/doc/zmq_msg_copy.html index 0130499..41d4758 100644 --- a/doc/zmq_msg_copy.html +++ b/doc/zmq_msg_copy.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_msg_copy(3) - +
+

SYNOPSIS

int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);

+
+

DESCRIPTION

The zmq_msg_copy() function shall copy the message object referenced by src @@ -612,11 +631,15 @@ copy the message content using memcpy().

+
+

RETURN VALUE

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

+
+

ERRORS

@@ -630,6 +653,8 @@ Invalid message.
+
+

SEE ALSO

zmq_msg_move(3) @@ -639,17 +664,19 @@ Invalid message. zmq_msg_close(3) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_msg_copy.txt b/doc/zmq_msg_copy.txt index d6ce1b9..155a6f8 100644 --- a/doc/zmq_msg_copy.txt +++ b/doc/zmq_msg_copy.txt @@ -53,5 +53,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_msg_data.3 b/doc/zmq_msg_data.3 index 3b0a7db..7d4674e 100644 --- a/doc/zmq_msg_data.3 +++ b/doc/zmq_msg_data.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_data .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_MSG_DATA" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_MSG_DATA" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -62,15 +62,4 @@ No errors are defined\&. \fBzmq_msg_size\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_msg_data.html b/doc/zmq_msg_data.html index 76d547a..3ac3fa6 100644 --- a/doc/zmq_msg_data.html +++ b/doc/zmq_msg_data.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_msg_data(3) - +
+

SYNOPSIS

void *zmq_msg_data (zmq_msg_t *msg);

+
+

DESCRIPTION

The zmq_msg_data() function shall return a pointer to the message content of @@ -598,15 +617,21 @@ the message object referenced by msg.

+
+

RETURN VALUE

Upon successful completion, zmq_msg_data() shall return a pointer to the message content.

+
+

ERRORS

No errors are defined.

+
+

SEE ALSO

zmq_msg_size(3) @@ -616,17 +641,19 @@ message content.

zmq_msg_close(3) zmq(7)

+ +

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_msg_data.txt b/doc/zmq_msg_data.txt index 36a3ce3..b82fbca 100644 --- a/doc/zmq_msg_data.txt +++ b/doc/zmq_msg_data.txt @@ -44,5 +44,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_msg_init.3 b/doc/zmq_msg_init.3 index ba4ba98..6865f86 100644 --- a/doc/zmq_msg_init.3 +++ b/doc/zmq_msg_init.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_init .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_MSG_INIT" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_MSG_INIT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -96,15 +96,4 @@ assert (rc == 0); \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_msg_init.html b/doc/zmq_msg_init.html index 8d836ec..06ca9a5 100644 --- a/doc/zmq_msg_init.html +++ b/doc/zmq_msg_init.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_msg_init(3) - +
+

SYNOPSIS

int zmq_msg_init (zmq_msg_t *msg);

+
+

DESCRIPTION

The zmq_msg_init() function shall initialise the message object referenced by @@ -609,15 +628,21 @@ before receiving a message with zmq_recv().

+
+

RETURN VALUE

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

+
+

ERRORS

No errors are defined.

+
+

EXAMPLE

@@ -630,6 +655,8 @@ rc = zmq_recv (socket, &msg, 0); assert (rc == 0);
+ +

SEE ALSO

zmq_msg_init_size(3) @@ -639,17 +666,19 @@ assert (rc == 0); zmq_msg_size(3) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_msg_init.txt b/doc/zmq_msg_init.txt index 1c2577d..4bdfbe6 100644 --- a/doc/zmq_msg_init.txt +++ b/doc/zmq_msg_init.txt @@ -61,5 +61,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_msg_init_data.3 b/doc/zmq_msg_init_data.3 index 77b61b1..49469ad 100644 --- a/doc/zmq_msg_init_data.3 +++ b/doc/zmq_msg_init_data.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_init_data .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_MSG_INIT_DATA" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_MSG_INIT_DATA" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -124,15 +124,4 @@ assert (rc == 0); \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_msg_init_data.html b/doc/zmq_msg_init_data.html index 2ee1b7e..430582c 100644 --- a/doc/zmq_msg_init_data.html +++ b/doc/zmq_msg_init_data.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_msg_init_data(3) - +
+

SYNOPSIS

typedef void (zmq_free_fn) (void *data, void *hint);

int zmq_msg_init_data (zmq_msg_t *msg, void *data, size_t size, zmq_free_fn *ffn, void *hint);

+
+

DESCRIPTION

The zmq_msg_init_data() function shall initialise the message object @@ -623,15 +642,21 @@ will be called from an arbitrary thread.

+
+

RETURN VALUE

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

+
+

ERRORS

No errors are defined.

+
+

EXAMPLE

@@ -652,6 +677,8 @@ rc = zmq_msg_init_data (&msg, data, 6, my_free, NULL); assert (rc == 0);
+
+

SEE ALSO

zmq_msg_init_size(3) @@ -661,17 +688,19 @@ assert (rc == 0); zmq_msg_size(3) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_msg_init_data.txt b/doc/zmq_msg_init_data.txt index 2842c10..f8b4aeb 100644 --- a/doc/zmq_msg_init_data.txt +++ b/doc/zmq_msg_init_data.txt @@ -79,5 +79,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_msg_init_size.3 b/doc/zmq_msg_init_size.3 index 4195e9b..eb49823 100644 --- a/doc/zmq_msg_init_size.3 +++ b/doc/zmq_msg_init_size.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_init_size .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_MSG_INIT_SIZE" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_MSG_INIT_SIZE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -83,15 +83,4 @@ Insufficient storage space is available\&. \fBzmq_msg_init_data\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_msg_init_size.html b/doc/zmq_msg_init_size.html index 9d5218d..4222f25 100644 --- a/doc/zmq_msg_init_size.html +++ b/doc/zmq_msg_init_size.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_msg_init_size(3) - +
+

SYNOPSIS

int zmq_msg_init_size (zmq_msg_t *msg, size_t size);

+
+

DESCRIPTION

The zmq_msg_init_size() function shall allocate any resources required to @@ -612,11 +631,15 @@ by msg to represent the newly allocated message.

+
+

RETURN VALUE

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

+
+

ERRORS

@@ -630,6 +653,8 @@ Insufficient storage space is available.
+
+

SEE ALSO

zmq_msg_init_data(3) @@ -639,17 +664,19 @@ Insufficient storage space is available. zmq_msg_size(3) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_msg_init_size.txt b/doc/zmq_msg_init_size.txt index 9be6263..44ef495 100644 --- a/doc/zmq_msg_init_size.txt +++ b/doc/zmq_msg_init_size.txt @@ -54,5 +54,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_msg_move.3 b/doc/zmq_msg_move.3 index 259eec9..0c6f72c 100644 --- a/doc/zmq_msg_move.3 +++ b/doc/zmq_msg_move.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_move .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_MSG_MOVE" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_MSG_MOVE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -65,15 +65,4 @@ Invalid message\&. \fBzmq_msg_copy\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_msg_move.html b/doc/zmq_msg_move.html index cbf6c79..1d1eb87 100644 --- a/doc/zmq_msg_move.html +++ b/doc/zmq_msg_move.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_msg_move(3) - +
+

SYNOPSIS

int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src);

+
+

DESCRIPTION

The zmq_msg_move() function shall move the content of the message object @@ -601,11 +620,15 @@ The original content of dest, if any, shall be released.

+
+

RETURN VALUE

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

+
+

ERRORS

@@ -619,6 +642,8 @@ Invalid message.
+
+

SEE ALSO

zmq_msg_copy(3) @@ -628,17 +653,19 @@ Invalid message. zmq_msg_close(3) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_msg_move.txt b/doc/zmq_msg_move.txt index 6ab6eab..c8b8b71 100644 --- a/doc/zmq_msg_move.txt +++ b/doc/zmq_msg_move.txt @@ -48,5 +48,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_msg_size.3 b/doc/zmq_msg_size.3 index 3b0c2ac..008f763 100644 --- a/doc/zmq_msg_size.3 +++ b/doc/zmq_msg_size.3 @@ -2,12 +2,12 @@ .\" Title: zmq_msg_size .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_MSG_SIZE" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_MSG_SIZE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -62,15 +62,4 @@ No errors are defined\&. \fBzmq_msg_data\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_msg_size.html b/doc/zmq_msg_size.html index b59c528..5368a13 100644 --- a/doc/zmq_msg_size.html +++ b/doc/zmq_msg_size.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_msg_size(3) - +
+

SYNOPSIS

size_t zmq_msg_size (zmq_msg_t *msg);

+
+

DESCRIPTION

The zmq_msg_size() function shall return the size in bytes of the content of @@ -598,15 +617,21 @@ the message object referenced by msg.

+
+

RETURN VALUE

Upon successful completion, zmq_msg_size() shall return the size of the message content in bytes.

+
+

ERRORS

No errors are defined.

+
+

SEE ALSO

zmq_msg_data(3) @@ -616,17 +641,19 @@ message content in bytes.

zmq_msg_close(3) zmq(7)

+ +

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_msg_size.txt b/doc/zmq_msg_size.txt index 354ca28..26ec840 100644 --- a/doc/zmq_msg_size.txt +++ b/doc/zmq_msg_size.txt @@ -44,5 +44,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_pgm.7 b/doc/zmq_pgm.7 index b83f9ae..0f4536d 100644 --- a/doc/zmq_pgm.7 +++ b/doc/zmq_pgm.7 @@ -2,12 +2,12 @@ .\" Title: zmq_pgm .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_PGM" "7" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_PGM" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -195,15 +195,4 @@ assert (rc == 0); \fBzmq_connect\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_tcp\fR(7) \fBzmq_ipc\fR(7) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_pgm.html b/doc/zmq_pgm.html index 5dfc00d..53f80cc 100644 --- a/doc/zmq_pgm.html +++ b/doc/zmq_pgm.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_pgm(7) - +
+

SYNOPSIS

PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks.

+
+

DESCRIPTION

ØMQ implements two variants of PGM, the standard protocol where PGM datagrams @@ -610,6 +629,8 @@ not require any special privileges.

+
+

ADDRESSING

A ØMQ address string consists of two parts as follows: @@ -618,7 +639,8 @@ transport protocol to use. For the standard PGM protocol, transport sha set to pgm. For the "Encapsulated PGM" protocol transport shall be set to epgm. The meaning of the endpoint part for both the pgm and epgm transport is defined below.

-

Connecting a socket

+
+

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the pgm or epgm transport, the endpoint shall be interpreted as an interface followed by a semicolon, followed by a multicast address, followed by a colon @@ -651,6 +673,9 @@ names exist, thus only the primary IPv4 address may be used to specify an

A multicast address is specified by an IPv4 multicast address in its numeric representation.

+
+
+

WIRE FORMAT

Consecutive PGM datagrams are interpreted by ØMQ as a single continuous stream @@ -658,7 +683,8 @@ of data where ØMQ messages are not necessarily aligned with PGM datagram boundaries and a single ØMQ message may span several PGM datagrams. This stream of data consists of ØMQ messages encapsulated in frames as described in zmq_tcp(7).

-

PGM datagram payload

+
+

PGM datagram payload

The following ABNF grammar represents the payload of a single PGM datagram as used by ØMQ:

@@ -706,6 +732,9 @@ Third datagram payload +--------------+----------------------------+-------------+
+
+
+

EXAMPLE

@@ -723,6 +752,8 @@ rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555"); assert (rc == 0);
+
+

SEE ALSO

zmq_connect(3) @@ -732,17 +763,19 @@ assert (rc == 0); zmq_inproc(7) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_pgm.txt b/doc/zmq_pgm.txt index 68ec504..9ce1452 100644 --- a/doc/zmq_pgm.txt +++ b/doc/zmq_pgm.txt @@ -156,7 +156,7 @@ linkzmq:zmq_ipc[7] linkzmq:zmq_inproc[7] linkzmq:zmq[7] + AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_poll.3 b/doc/zmq_poll.3 index 186dbd0..f801b5a 100644 --- a/doc/zmq_poll.3 +++ b/doc/zmq_poll.3 @@ -2,12 +2,12 @@ .\" Title: zmq_poll .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_POLL" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_POLL" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -190,15 +190,4 @@ assert (rc >= 0); Your operating system documentation for the \fIpoll()\fR system call\&. .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_poll.html b/doc/zmq_poll.html index c2645dd..339f441 100644 --- a/doc/zmq_poll.html +++ b/doc/zmq_poll.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_poll(3) - +
+

SYNOPSIS

int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);

+
+

DESCRIPTION

The zmq_poll() function provides a mechanism for applications to multiplex @@ -673,6 +692,8 @@ of those interfaces in ways not defined in this documentation.

+
+

RETURN VALUE

Upon successful completion, the zmq_poll() function shall return the number @@ -680,6 +701,8 @@ of zmq_pollitem_t structures with events signaled in revent events have been signaled. Upon failure, zmq_poll() shall return -1 and set errno to one of the values defined below.

+
+

ERRORS

@@ -711,6 +734,8 @@ available.
+
+

EXAMPLE

@@ -730,6 +755,8 @@ assert (rc >= 0); /* Returned events will be stored in items[].revents */
+
+

SEE ALSO

zmq_socket(3) @@ -738,17 +765,19 @@ assert (rc >= 0); zmq(7)

Your operating system documentation for the poll() system call.

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_poll.txt b/doc/zmq_poll.txt index ee7539b..9c0fc49 100644 --- a/doc/zmq_poll.txt +++ b/doc/zmq_poll.txt @@ -128,5 +128,4 @@ Your operating system documentation for the _poll()_ system call. AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_recv.3 b/doc/zmq_recv.3 index 095a0c5..2e1cbc8 100644 --- a/doc/zmq_recv.3 +++ b/doc/zmq_recv.3 @@ -2,12 +2,12 @@ .\" Title: zmq_recv .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_RECV" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_RECV" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -158,15 +158,4 @@ do { \fBzmq_send\fR(3) \fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_recv.html b/doc/zmq_recv.html index b27b619..49b635d 100644 --- a/doc/zmq_recv.html +++ b/doc/zmq_recv.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_recv(3) - +
+

SYNOPSIS

int zmq_recv (void *socket, zmq_msg_t *msg, int flags);

+
+

DESCRIPTION

The zmq_recv() function shall receive a message from the socket referenced by @@ -604,7 +623,8 @@ shall fail with errno set to EAGAIN.

-

Multi-part messages

+
+

Multi-part messages

A ØMQ message is composed of 1 or more message parts; each message part is an independent zmq_msg_t in its own right. ØMQ ensures atomic delivery of messages; peers shall receive either all message parts of a message or none @@ -617,11 +637,16 @@ follow, or if the message is not composed of multiple parts, ZMQ_RCVMOREZMQ_RCVMORE shall report a value of 1, indicating that more message parts are to follow.

+
+
+

RETURN VALUE

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

+
+

ERRORS

@@ -687,6 +712,8 @@ The message passed to the function was invalid.
+
+

EXAMPLE

@@ -722,6 +749,8 @@ do { } while (more);
+
+

SEE ALSO

zmq_send(3) @@ -729,17 +758,19 @@ do { zmq_socket(7) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_recv.txt b/doc/zmq_recv.txt index afbcb9c..a5ef24c 100644 --- a/doc/zmq_recv.txt +++ b/doc/zmq_recv.txt @@ -117,5 +117,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_send.3 b/doc/zmq_send.3 index 3c1896d..dc5b998 100644 --- a/doc/zmq_send.3 +++ b/doc/zmq_send.3 @@ -2,12 +2,12 @@ .\" Title: zmq_send .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_SEND" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_SEND" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -171,15 +171,4 @@ rc = zmq_send (socket, &part3, 0); \fBzmq_recv\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_send.html b/doc/zmq_send.html index 9ba1f96..f23e439 100644 --- a/doc/zmq_send.html +++ b/doc/zmq_send.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_send(3) - +
+

SYNOPSIS

int zmq_send (void *socket, zmq_msg_t *msg, int flags);

+
+

DESCRIPTION

The zmq_send() function shall queue the message referenced by the msg @@ -624,7 +643,8 @@ message has been transmitted to the network, only that it has been queued on the socket and ØMQ has assumed responsibility for the message.

-

Multi-part messages

+
+

Multi-part messages

A ØMQ message is composed of 1 or more message parts; each message part is an independent zmq_msg_t in its own right. ØMQ ensures atomic delivery of messages; peers shall receive either all message parts of a message or none @@ -637,11 +657,16 @@ are to follow. When the application wishes to send the final message part it does so by calling zmq_send() without the ZMQ_SNDMORE flag; this indicates that no more message parts are to follow.

+
+
+

RETURN VALUE

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

+
+

ERRORS

@@ -707,6 +732,8 @@ Invalid message.
+
+

EXAMPLE

@@ -732,23 +759,27 @@ rc = zmq_send (socket, &part2, ZMQ_SNDMORE); rc = zmq_send (socket, &part3, 0);
+
+ +

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_send.txt b/doc/zmq_send.txt index c99c123..8bd725a 100644 --- a/doc/zmq_send.txt +++ b/doc/zmq_send.txt @@ -116,5 +116,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_setsockopt.3 b/doc/zmq_setsockopt.3 index 0978a8d..6990966 100644 --- a/doc/zmq_setsockopt.3 +++ b/doc/zmq_setsockopt.3 @@ -2,12 +2,12 @@ .\" Title: zmq_setsockopt .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_SETSOCKOPT" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_SETSOCKOPT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -289,6 +289,84 @@ ZMQ_SUB T} .TE .sp 1 +.SS "ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN" +.sp +Sets the timeout for receive operation on the socket\&. If the value is 0, \fIzmq_recv(3)\fR will return immediately, with a EAGAIN error if there is no message to receive\&. If the value is \-1, it will block until a message is available\&. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error\&. +.TS +tab(:); +lt lt +lt lt +lt lt +lt lt. +T{ +.sp +Option value type +T}:T{ +.sp +int +T} +T{ +.sp +Option value unit +T}:T{ +.sp +milliseconds +T} +T{ +.sp +Default value +T}:T{ +.sp +\-1 (infinite) +T} +T{ +.sp +Applicable socket types +T}:T{ +.sp +all +T} +.TE +.sp 1 +.SS "ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN" +.sp +Sets the timeout for send operation on the socket\&. If the value is 0, \fIzmq_send(3)\fR will return immediately, with a EAGAIN error if the message cannot be sent\&. If the value is \-1, it will block until the message is sent\&. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error\&. +.TS +tab(:); +lt lt +lt lt +lt lt +lt lt. +T{ +.sp +Option value type +T}:T{ +.sp +int +T} +T{ +.sp +Option value unit +T}:T{ +.sp +milliseconds +T} +T{ +.sp +Default value +T}:T{ +.sp +\-1 (infinite) +T} +T{ +.sp +Applicable socket types +T}:T{ +.sp +all +T} +.TE +.sp 1 .SS "ZMQ_RATE: Set multicast data rate" .sp The \fIZMQ_RATE\fR option shall set the maximum send or receive data rate for multicast transports such as \fBzmq_pgm\fR(7) using the specified \fIsocket\fR\&. @@ -864,15 +942,4 @@ assert (rc); \fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_setsockopt.html b/doc/zmq_setsockopt.html index d3b17ca..5467997 100644 --- a/doc/zmq_setsockopt.html +++ b/doc/zmq_setsockopt.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_setsockopt(3) - +
+

SYNOPSIS

int zmq_setsockopt (void *socket, int option_name, const void *option_value, size_t option_len);

Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE and ZMQ_LINGER, only take effect for subsequent socket bind/connects.

+
+

DESCRIPTION

The zmq_setsockopt() function shall set the option specified by the @@ -593,7 +612,8 @@ ZMQ_LINGER, only take effect for subsequent socket bind/connects.

for the ØMQ socket pointed to by the socket argument. The option_len argument is the size of the option value in bytes.

The following socket options can be set with the zmq_setsockopt() function:

-

ZMQ_HWM: Set high water mark

+
+

ZMQ_HWM: Set high water mark

The ZMQ_HWM option shall set the high water mark for the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the specified @@ -650,7 +670,9 @@ all

-

ZMQ_SWAP: Set disk offload size

+
+
+

ZMQ_SWAP: Set disk offload size

The ZMQ_SWAP option shall set the disk offload (swap) size for the specified socket. A socket which has ZMQ_SWAP set to a non-zero value may exceed its high water mark; in this case outstanding messages shall be offloaded to @@ -702,7 +724,9 @@ all

-

ZMQ_AFFINITY: Set I/O thread affinity

+
+
+

ZMQ_AFFINITY: Set I/O thread affinity

The ZMQ_AFFINITY option shall set the I/O thread affinity for newly created connections on the specified socket.

Affinity determines which threads from the ØMQ I/O thread pool associated with @@ -760,7 +784,9 @@ N/A

-

ZMQ_IDENTITY: Set socket identity

+
+
+

ZMQ_IDENTITY: Set socket identity

The ZMQ_IDENTITY option shall set the identity of the specified socket. Socket identity determines if existing ØMQ infrastructure (message queues, forwarding devices) shall be identified with a specific application and @@ -818,7 +844,9 @@ all

-

ZMQ_SUBSCRIBE: Establish message filter

+
+
+

ZMQ_SUBSCRIBE: Establish message filter

The ZMQ_SUBSCRIBE option shall establish a new message filter on a ZMQ_SUB socket. Newly created ZMQ_SUB sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter.

@@ -873,7 +901,9 @@ ZMQ_SUB
-

ZMQ_UNSUBSCRIBE: Remove message filter

+
+
+

ZMQ_UNSUBSCRIBE: Remove message filter

The ZMQ_UNSUBSCRIBE option shall remove an existing message filter on a ZMQ_SUB socket. The filter specified must match an existing filter previously established with the ZMQ_SUBSCRIBE option. If the socket has several @@ -925,7 +955,117 @@ ZMQ_SUB

-

ZMQ_RATE: Set multicast data rate

+
+
+

ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN

+

Sets the timeout for receive operation on the socket. If the value is 0, +zmq_recv(3) will return immediately, with a EAGAIN error if there is no +message to receive. If the value is -1, it will block until a message is +available. For all other values, it will wait for a message for that amount +of time before returning with an EAGAIN error.

+
+ + + + + + + + + + + + + + + + +
+Option value type +
+
+

+int +

+
+Option value unit +
+
+

+milliseconds +

+
+Default value +
+
+

+-1 (infinite) +

+
+Applicable socket types +
+
+

+all +

+
+
+
+

ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN

+

Sets the timeout for send operation on the socket. If the value is 0, +zmq_send(3) will return immediately, with a EAGAIN error if the message +cannot be sent. If the value is -1, it will block until the message is sent. +For all other values, it will try to send the message for that amount of time +before returning with an EAGAIN error.

+
+ + + + + + + + + + + + + + + + +
+Option value type +
+
+

+int +

+
+Option value unit +
+
+

+milliseconds +

+
+Default value +
+
+

+-1 (infinite) +

+
+Applicable socket types +
+
+

+all +

+
+
+
+

ZMQ_RATE: Set multicast data rate

The ZMQ_RATE option shall set the maximum send or receive data rate for multicast transports such as zmq_pgm(7) using the specified socket.

@@ -974,7 +1114,9 @@ all, when using multicast transports
-

ZMQ_RECOVERY_IVL: Set multicast recovery interval

+
+
+

ZMQ_RECOVERY_IVL: Set multicast recovery interval

The ZMQ_RECOVERY_IVL option shall set the recovery interval for multicast transports using the specified socket. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group @@ -1035,7 +1177,9 @@ all, when using multicast transports

-

ZMQ_RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds

+
+
+

ZMQ_RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds

The ZMQ_RECOVERY_IVL_MSEC option shall set the recovery interval, specified in milliseconds (ms) for multicast transports using the specified socket. The recovery interval determines the maximum time in milliseconds that a @@ -1101,7 +1245,9 @@ all, when using multicast transports

-

ZMQ_MCAST_LOOP: Control multicast loop-back

+
+
+

ZMQ_MCAST_LOOP: Control multicast loop-back

The ZMQ_MCAST_LOOP option shall control whether data sent via multicast transports using the specified socket can also be received by the sending host via loop-back. A value of zero disables the loop-back functionality, while @@ -1155,7 +1301,9 @@ all, when using multicast transports

-

ZMQ_SNDBUF: Set kernel transmit buffer size

+
+
+

ZMQ_SNDBUF: Set kernel transmit buffer size

The ZMQ_SNDBUF option shall set the underlying kernel transmit buffer size for the socket to the specified size in bytes. A value of zero means leave the OS default unchanged. For details please refer to your operating system @@ -1206,7 +1354,9 @@ all

-

ZMQ_RCVBUF: Set kernel receive buffer size

+
+
+

ZMQ_RCVBUF: Set kernel receive buffer size

The ZMQ_RCVBUF option shall set the underlying kernel receive buffer size for the socket to the specified size in bytes. A value of zero means leave the OS default unchanged. For details refer to your operating system documentation @@ -1257,7 +1407,9 @@ all

-

ZMQ_LINGER: Set linger period for socket shutdown

+
+
+

ZMQ_LINGER: Set linger period for socket shutdown

The ZMQ_LINGER option shall set the linger period for the specified socket. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with @@ -1335,7 +1487,9 @@ all

-

ZMQ_RECONNECT_IVL: Set reconnection interval

+
+
+

ZMQ_RECONNECT_IVL: Set reconnection interval

The ZMQ_RECONNECT_IVL option shall set the initial reconnection interval for the specified socket. The reconnection interval is the period ØMQ shall wait between attempts to reconnect disconnected peers when using @@ -1395,7 +1549,9 @@ all, only for connection-oriented transports

-

ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval

+
+
+

ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval

The ZMQ_RECONNECT_IVL_MAX option shall set the maximum reconnection interval for the specified socket. This is the maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be @@ -1456,7 +1612,9 @@ all, only for connection-oriented transports

-

ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections

+
+
+

ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections

The ZMQ_BACKLOG option shall set the maximum length of the queue of outstanding peer connections for the specified socket; this only applies to connection-oriented transports. For details refer to your operating system @@ -1508,11 +1666,16 @@ all, only for connection-oriented transports.

+ + +

RETURN VALUE

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

+
+

ERRORS

@@ -1551,6 +1714,8 @@ The operation was interrupted by delivery of a signal.
+
+

EXAMPLE

@@ -1580,23 +1745,27 @@ rc = zmq_bind (socket, "tcp://lo:5556"); assert (rc);
+ + +

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt index 5911b7f..070c977 100644 --- a/doc/zmq_setsockopt.txt +++ b/doc/zmq_setsockopt.txt @@ -143,6 +143,38 @@ Default value:: N/A Applicable socket types:: ZMQ_SUB +ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sets the timeout for receive operation on the socket. If the value is `0`, +_zmq_recv(3)_ will return immediately, with a EAGAIN error if there is no +message to receive. If the value is `-1`, it will block until a message is +available. For all other values, it will wait for a message for that amount +of time before returning with an EAGAIN error. + +[horizontal] +Option value type:: int +Option value unit:: milliseconds +Default value:: -1 (infinite) +Applicable socket types:: all + + +ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sets the timeout for send operation on the socket. If the value is `0`, +_zmq_send(3)_ will return immediately, with a EAGAIN error if the message +cannot be sent. If the value is `-1`, it will block until the message is sent. +For all other values, it will try to send the message for that amount of time +before returning with an EAGAIN error. + +[horizontal] +Option value type:: int +Option value unit:: milliseconds +Default value:: -1 (infinite) +Applicable socket types:: all + + ZMQ_RATE: Set multicast data rate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RATE' option shall set the maximum send or receive data rate for @@ -378,5 +410,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_socket.3 b/doc/zmq_socket.3 index 6b5e23b..91d8996 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 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.11 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_SOCKET" "3" "11/22/2011" "0MQ 2\&.1\&.11" "0MQ Manual" +.TH "ZMQ_SOCKET" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -765,15 +765,4 @@ The context specified was terminated\&. \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_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_socket.html b/doc/zmq_socket.html index 05c5ab7..d8d44ec 100644 --- a/doc/zmq_socket.html +++ b/doc/zmq_socket.html @@ -1462,16 +1462,15 @@ The context specified was terminated.

AUTHORS

-

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

+

This manual page was written by the ØMQ community.


diff --git a/doc/zmq_socket.txt b/doc/zmq_socket.txt index ebd2151..420fdad 100644 --- a/doc/zmq_socket.txt +++ b/doc/zmq_socket.txt @@ -338,5 +338,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_strerror.3 b/doc/zmq_strerror.3 index 2a5b33a..dcac43a 100644 --- a/doc/zmq_strerror.3 +++ b/doc/zmq_strerror.3 @@ -2,12 +2,12 @@ .\" Title: zmq_strerror .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_STRERROR" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_STRERROR" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -64,15 +64,4 @@ if (!ctx) { \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_strerror.html b/doc/zmq_strerror.html index 7e01d4e..33377ed 100644 --- a/doc/zmq_strerror.html +++ b/doc/zmq_strerror.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_strerror(3) - +
+

SYNOPSIS

const char *zmq_strerror (int errnum);

+
+

DESCRIPTION

The zmq_strerror() function shall return a pointer to an error message string @@ -592,15 +611,21 @@ defines additional error numbers over and above those defined by the operating system, applications should use zmq_strerror() in preference to the standard strerror() function.

+
+

RETURN VALUE

The zmq_strerror() function shall return a pointer to an error message string.

+
+

ERRORS

No errors are defined.

+
+

EXAMPLE

@@ -613,21 +638,25 @@ if (!ctx) { }
+
+

SEE ALSO

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_strerror.txt b/doc/zmq_strerror.txt index 2cd9829..95623a5 100644 --- a/doc/zmq_strerror.txt +++ b/doc/zmq_strerror.txt @@ -51,5 +51,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_tcp.7 b/doc/zmq_tcp.7 index b1f6ae7..aa1c931 100644 --- a/doc/zmq_tcp.7 +++ b/doc/zmq_tcp.7 @@ -2,12 +2,12 @@ .\" Title: zmq_tcp .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_TCP" "7" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_TCP" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -230,15 +230,4 @@ assert (rc == 0); \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_pgm\fR(7) \fBzmq_ipc\fR(7) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_tcp.html b/doc/zmq_tcp.html index cf5b7ed..03680ae 100644 --- a/doc/zmq_tcp.html +++ b/doc/zmq_tcp.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_tcp(7) - +
+

SYNOPSIS

TCP is an ubiquitous, reliable, unicast transport. When connecting distributed applications over a network with ØMQ, using the TCP transport will likely be your first choice.

+
+

ADDRESSING

A ØMQ address string consists of two parts as follows: transport://endpoint. The transport part specifies the underlying transport protocol to use, and for the TCP transport shall be set to tcp. The meaning of the endpoint part for the TCP transport is defined below.

-

Assigning a local address to a socket

+
+

Assigning a local address to a socket

When assigning a local address to a socket using zmq_bind() with the tcp transport, the endpoint shall be interpreted as an interface followed by a colon and the TCP port number to use.

@@ -626,7 +646,9 @@ names exist, thus only the primary IPv4 address may be used to specify an interface.
-

Connecting a socket

+
+
+

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the tcp transport, the endpoint shall be interpreted as a peer address followed by a colon and the TCP port number to use.

@@ -644,6 +666,9 @@ The IPv4 address of the peer, in its numeric representation.
+
+ +

WIRE FORMAT

ØMQ messages are transmitted over TCP in frames consisting of an encoded @@ -703,6 +728,8 @@ exceeding 254 octets:

+-+-+-+-+-+-+-+ ...
+ +

EXAMPLES

@@ -729,6 +756,8 @@ rc = zmq_connect(socket, "tcp://server1:5555"); assert (rc == 0);
+ +

SEE ALSO

zmq_bind(3) @@ -738,17 +767,19 @@ assert (rc == 0); zmq_inproc(7) zmq(7)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_tcp.txt b/doc/zmq_tcp.txt index 0117ccf..1d4a41e 100644 --- a/doc/zmq_tcp.txt +++ b/doc/zmq_tcp.txt @@ -158,5 +158,4 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_term.3 b/doc/zmq_term.3 index d68b100..6c5db93 100644 --- a/doc/zmq_term.3 +++ b/doc/zmq_term.3 @@ -2,12 +2,12 @@ .\" Title: zmq_term .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_TERM" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_TERM" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -121,15 +121,4 @@ Termination was interrupted by a signal\&. It can be restarted if needed\&. \fBzmq\fR(7) \fBzmq_init\fR(3) \fBzmq_close\fR(3) \fBzmq_setsockopt\fR(3) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_term.html b/doc/zmq_term.html index 6f6ecf1..6f50334 100644 --- a/doc/zmq_term.html +++ b/doc/zmq_term.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_term(3) - +
+

SYNOPSIS

int zmq_term (void *context);

+
+

DESCRIPTION

The zmq_term() function shall terminate the ØMQ context context.

@@ -622,11 +641,15 @@ For each socket within context, all messages sent by the application

For further details regarding socket linger behaviour refer to the ZMQ_LINGER option in zmq_setsockopt(3).

+
+

RETURN VALUE

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

+
+

ERRORS

@@ -648,6 +671,8 @@ Termination was interrupted by a signal. It can be restarted if needed.
+
+

SEE ALSO

zmq(7) @@ -655,17 +680,19 @@ Termination was interrupted by a signal. It can be restarted if needed. zmq_close(3) zmq_setsockopt(3)

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_term.txt b/doc/zmq_term.txt index 577de3d..09cb201 100644 --- a/doc/zmq_term.txt +++ b/doc/zmq_term.txt @@ -61,5 +61,4 @@ linkzmq:zmq_setsockopt[3] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/doc/zmq_version.3 b/doc/zmq_version.3 index 3ac6390..bd0d0fc 100644 --- a/doc/zmq_version.3 +++ b/doc/zmq_version.3 @@ -2,12 +2,12 @@ .\" Title: zmq_version .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: 11/22/2011 +.\" Date: 04/04/2012 .\" Manual: 0MQ Manual -.\" Source: 0MQ 2.1.10 +.\" Source: 0MQ 2.2.0 .\" Language: English .\" -.TH "ZMQ_VERSION" "3" "11/22/2011" "0MQ 2\&.1\&.10" "0MQ Manual" +.TH "ZMQ_VERSION" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -64,15 +64,4 @@ printf ("Current 0MQ version is %d\&.%d\&.%d\en", major, minor, patch); \fBzmq\fR(7) .SH "AUTHORS" .sp -This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&. -.SH "NOTES" -.IP " 1." 4 -sustrik@250bpm.com -.RS 4 -\%mailto:sustrik@250bpm.com -.RE -.IP " 2." 4 -mato@kotelna.sk -.RS 4 -\%mailto:mato@kotelna.sk -.RE +This manual page was written by the 0MQ community\&. diff --git a/doc/zmq_version.html b/doc/zmq_version.html index a1c0047..65b94df 100644 --- a/doc/zmq_version.html +++ b/doc/zmq_version.html @@ -2,15 +2,28 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - + + zmq_version(3) - +
+

SYNOPSIS

void zmq_version (int *major, int *minor, int *patch);

+
+

DESCRIPTION

The zmq_version() function shall fill in the integer variables pointed to by @@ -593,14 +612,20 @@ components of the ØMQ library version.

dynamically linking to the ØMQ library that wish to determine the actual version of the ØMQ library they are using.

+
+

RETURN VALUE

There is no return value.

+
+

ERRORS

No errors are defined.

+
+

EXAMPLE

@@ -611,21 +636,25 @@ zmq_version (&major, &minor, &patch); printf ("Current 0MQ version is %d.%d.%d\n", major, minor, patch);
+ +

SEE ALSO

+
+

AUTHORS

-

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

+

This manual page was written by the ØMQ community.

+

diff --git a/doc/zmq_version.txt b/doc/zmq_version.txt index eeb0b40..0a89c01 100644 --- a/doc/zmq_version.txt +++ b/doc/zmq_version.txt @@ -47,7 +47,7 @@ SEE ALSO -------- linkzmq:zmq[7] + AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This manual page was written by the 0MQ community. diff --git a/include/zmq.h b/include/zmq.h index a507156..3352b26 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -54,8 +54,8 @@ extern "C" { /* Version macros for compile-time API version detection */ #define ZMQ_VERSION_MAJOR 2 -#define ZMQ_VERSION_MINOR 1 -#define ZMQ_VERSION_PATCH 11 +#define ZMQ_VERSION_MINOR 2 +#define ZMQ_VERSION_PATCH 0 #define ZMQ_MAKE_VERSION(major, minor, patch) \ ((major) * 10000 + (minor) * 100 + (patch)) @@ -211,7 +211,9 @@ ZMQ_EXPORT int zmq_term (void *context); #define ZMQ_BACKLOG 19 #define ZMQ_RECOVERY_IVL_MSEC 20 /* opt. recovery time, reconcile in 3.x */ #define ZMQ_RECONNECT_IVL_MAX 21 - +#define ZMQ_RCVTIMEO 27 +#define ZMQ_SNDTIMEO 28 + /* Send/recv options. */ #define ZMQ_NOBLOCK 1 #define ZMQ_SNDMORE 2 diff --git a/include/zmq.hpp b/include/zmq.hpp index bfba0f6..0db6738 100644 --- a/include/zmq.hpp +++ b/include/zmq.hpp @@ -23,6 +23,7 @@ #include "zmq.h" +#include #include #include #include @@ -40,6 +41,14 @@ # define ZMQ_HAS_RVALUE_REFS #endif +// In order to prevent unused variable warnings when building in non-debug +// mode use this macro to make assertions. +#ifndef NDEBUG +# define ZMQ_ASSERT(expression) assert(expression) +#else +# define ZMQ_ASSERT(expression) (expression) +#endif + namespace zmq { @@ -118,7 +127,7 @@ namespace zmq inline ~message_t () { int rc = zmq_msg_close (this); - assert (rc == 0); + ZMQ_ASSERT (rc == 0); } inline void rebuild () @@ -214,7 +223,7 @@ namespace zmq if (ptr == NULL) return; int rc = zmq_term (ptr); - assert (rc == 0); + ZMQ_ASSERT (rc == 0); } // Be careful with this, it's probably only useful for diff --git a/src/Makefile.am b/src/Makefile.am index 73eaf44..b0c16dd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,7 @@ libzmq_la_SOURCES = \ err.hpp \ fd.hpp \ fq.hpp \ + gcc_421_char_traits.hpp \ i_inout.hpp \ io_object.hpp \ io_thread.hpp \ diff --git a/src/Makefile.in b/src/Makefile.in index 8325786..5a89f93 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -318,6 +318,7 @@ libzmq_la_SOURCES = \ err.hpp \ fd.hpp \ fq.hpp \ + gcc_421_char_traits.hpp \ i_inout.hpp \ io_object.hpp \ io_thread.hpp \ diff --git a/src/blob.hpp b/src/blob.hpp index 3c54ac3..8f5ee8d 100644 --- a/src/blob.hpp +++ b/src/blob.hpp @@ -23,6 +23,10 @@ #include +#if (defined(__GNUC__) && (__GNUC__ == 3)) +#include "gcc_421_char_traits.hpp" +#endif + namespace zmq { diff --git a/src/clock.cpp b/src/clock.cpp index f1da091..96dc40c 100644 --- a/src/clock.cpp +++ b/src/clock.cpp @@ -34,7 +34,7 @@ #include #endif -#if defined HAVE_CLOCK_GETTIME +#if defined HAVE_CLOCK_GETTIME || defined HAVE_GETHRTIME #include #endif @@ -65,14 +65,27 @@ uint64_t zmq::clock_t::now_us () double ticks_div = (double) (ticksPerSecond.QuadPart / 1000000); return (uint64_t) (tick.QuadPart / ticks_div); -#elif defined HAVE_CLOCK_GETTIME +#elif defined HAVE_CLOCK_GETTIME && defined CLOCK_MONOTONIC // Use POSIX clock_gettime function to get precise monotonic time. struct timespec tv; int rc = clock_gettime (CLOCK_MONOTONIC, &tv); - errno_assert (rc == 0); + // Fix case where system has clock_gettime but CLOCK_MONOTONIC is not supported. + // Done at runtime because a ./configure check is bad for + // cross-compiling. + if( rc != 0) { + // Use POSIX gettimeofday function to get precise time. + struct timeval tv; + int rc = gettimeofday (&tv, NULL); + errno_assert (rc == 0); + return (tv.tv_sec * (uint64_t) 1000000 + tv.tv_usec); + } return (tv.tv_sec * (uint64_t) 1000000 + tv.tv_nsec / 1000); +#elif defined HAVE_GETHRTIME + + return (gethrtime () / 1000); + #else // Use POSIX gettimeofday function to get precise time. diff --git a/src/command.hpp b/src/command.hpp index 35aed0f..49f5642 100644 --- a/src/command.hpp +++ b/src/command.hpp @@ -72,7 +72,7 @@ namespace zmq // session that the connection have failed. struct { struct i_engine *engine; - unsigned char peer_identity_size; + size_t peer_identity_size; unsigned char *peer_identity; } attach; @@ -81,7 +81,7 @@ namespace zmq struct { class reader_t *in_pipe; class writer_t *out_pipe; - unsigned char peer_identity_size; + size_t peer_identity_size; unsigned char *peer_identity; } bind; diff --git a/src/ctx.hpp b/src/ctx.hpp index 33d5dad..b44d569 100644 --- a/src/ctx.hpp +++ b/src/ctx.hpp @@ -97,9 +97,9 @@ namespace zmq reaper_tid = 1 }; + ~ctx_t (); private: - ~ctx_t (); // Used to check whether the object is a context. uint32_t tag; diff --git a/src/encoder.cpp b/src/encoder.cpp index 88e1dff..8f7b4b6 100644 --- a/src/encoder.cpp +++ b/src/encoder.cpp @@ -75,14 +75,14 @@ bool zmq::encoder_t::message_ready () // message size. In both cases 'flags' field follows. if (size < 255) { tmpbuf [0] = (unsigned char) size; - tmpbuf [1] = (in_progress.flags & ~ZMQ_MSG_SHARED); + tmpbuf [1] = (in_progress.flags & ZMQ_MSG_MORE); next_step (tmpbuf, 2, &encoder_t::size_ready, !(in_progress.flags & ZMQ_MSG_MORE)); } else { tmpbuf [0] = 0xff; put_uint64 (tmpbuf + 1, size); - tmpbuf [9] = (in_progress.flags & ~ZMQ_MSG_SHARED); + tmpbuf [9] = (in_progress.flags & ZMQ_MSG_MORE); next_step (tmpbuf, 10, &encoder_t::size_ready, !(in_progress.flags & ZMQ_MSG_MORE)); } diff --git a/src/gcc_421_char_traits.hpp b/src/gcc_421_char_traits.hpp new file mode 100644 index 0000000..e8f457d --- /dev/null +++ b/src/gcc_421_char_traits.hpp @@ -0,0 +1,119 @@ +// Character Traits for use by standard string and iostream -*- C++ -*- + +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +// Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +/** @file char_traits.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. + */ + +// +// ISO C++ 14882: 21 Strings library +// + +// This file has been snipped for 0mq to provide a definition for +// struct char_traits +// Which is not implemented in GNU ISO C++ Library as of version 3.2.3 +// And is required by blob.hpp + +#ifndef _ZMQ_CHAR_TRAITS_H +#define _ZMQ_CHAR_TRAITS_H 1 + +namespace std +{ + /// @brief 21.1.3.1 char_traits specializations + template<> + struct char_traits + { + typedef unsigned char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return memcmp(__s1, __s2, __n); } + + static size_t + length(const char_type* __s) + { return strlen((const char*)__s); } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return static_cast(memchr(__s, __a, __n)); } + + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(memmove(__s1, __s2, __n)); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(memcpy(__s1, __s2, __n)); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return static_cast(memset(__s, __a, __n)); } + + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + // To keep both the byte 0xff and the eof symbol 0xffffffff + // from ending up as 0xffffffff. + static int_type + to_int_type(const char_type& __c) + { return static_cast(static_cast(__c)); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() { return static_cast(EOF); } + + static int_type + not_eof(const int_type& __c) + { return (__c == eof()) ? 0 : __c; } + }; +} + +#endif diff --git a/src/options.cpp b/src/options.cpp index 952907b..75821da 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -18,6 +18,7 @@ along with this program. If not, see . */ +#include #include #ifndef ZMQ_HAVE_WINDOWS #include @@ -44,7 +45,9 @@ zmq::options_t::options_t () : backlog (100), requires_in (false), requires_out (false), - immediate_connect (true) + immediate_connect (true), + rcvtimeo (-1), + sndtimeo (-1) { } @@ -68,7 +71,11 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, } // Check that SWAP directory (.) is writable struct stat stat_buf; - if (stat (".", &stat_buf) || ((stat_buf.st_mode & S_IWRITE) == 0)) { +#if (ZMQ_HAVE_ANDROID || ZMQ_HAVE_LINUX) + if (stat (".", &stat_buf) || ((stat_buf.st_mode & S_IWUSR) == 0)) { +#else + if (stat (".", &stat_buf) || ((stat_buf.st_mode & S_IWRITE) == 0)) { +#endif errno = EACCES; return -1; } @@ -103,7 +110,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, } rate = (uint32_t) *((int64_t*) optval_); return 0; - + case ZMQ_RECOVERY_IVL: if (optvallen_ != sizeof (int64_t) || *((int64_t*) optval_) < 0) { errno = EINVAL; @@ -191,6 +198,22 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, backlog = *((int*) optval_); return 0; + case ZMQ_RCVTIMEO: + if (optvallen_ != sizeof (int)) { + errno = EINVAL; + return -1; + } + rcvtimeo = *((int*) optval_); + return 0; + + case ZMQ_SNDTIMEO: + if (optvallen_ != sizeof (int)) { + errno = EINVAL; + return -1; + } + sndtimeo = *((int*) optval_); + return 0; + } errno = EINVAL; @@ -246,7 +269,7 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) *((int64_t*) optval_) = rate; *optvallen_ = sizeof (int64_t); return 0; - + case ZMQ_RECOVERY_IVL: if (*optvallen_ < sizeof (int64_t)) { errno = EINVAL; @@ -337,6 +360,24 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) *optvallen_ = sizeof (int); return 0; + case ZMQ_RCVTIMEO: + if (*optvallen_ < sizeof (int)) { + errno = EINVAL; + return -1; + } + *((int*) optval_) = rcvtimeo; + *optvallen_ = sizeof (int); + return 0; + + case ZMQ_SNDTIMEO: + if (*optvallen_ < sizeof (int)) { + errno = EINVAL; + return -1; + } + *((int*) optval_) = sndtimeo; + *optvallen_ = sizeof (int); + return 0; + } errno = EINVAL; diff --git a/src/options.hpp b/src/options.hpp index b2e29d0..537ea06 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -80,6 +80,10 @@ namespace zmq // is not aware of the peer's identity, however, it is able to send // messages straight away. bool immediate_connect; + + // The timeout for send/recv operations for this socket. + int rcvtimeo; + int sndtimeo; }; } diff --git a/src/platform.hpp.in b/src/platform.hpp.in index 12a5ab4..b302204 100644 --- a/src/platform.hpp.in +++ b/src/platform.hpp.in @@ -18,6 +18,9 @@ /* Define to 1 if you have the `freeifaddrs' function. */ #undef HAVE_FREEIFADDRS +/* Define to 1 if you have the `gethrtime' function. */ +#undef HAVE_GETHRTIME + /* Define to 1 if you have the `getifaddrs' function. */ #undef HAVE_GETIFADDRS diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 335a858..cd4152c 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -510,13 +510,13 @@ int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_) // In case of non-blocking send we'll simply propagate // the error - including EAGAIN - upwards. - if (flags_ & ZMQ_NOBLOCK) + if (flags_ & ZMQ_NOBLOCK || options.sndtimeo == 0) return -1; // Compute the time when the timeout should occur. // If the timeout is infite, don't care. clock_t clock ; - int timeout = -1; + int timeout = options.sndtimeo; uint64_t end = timeout < 0 ? 0 : (clock.now_ms () + timeout); // Oops, we couldn't send the message. Wait for the next @@ -589,7 +589,7 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_) // For non-blocking recv, commands are processed in case there's an // activate_reader command already waiting int a command pipe. // If it's not, return EAGAIN. - if (flags_ & ZMQ_NOBLOCK) { + if (flags_ & ZMQ_NOBLOCK || options.rcvtimeo == 0) { if (errno != EAGAIN) return -1; if (unlikely (process_commands (0, false) != 0)) @@ -608,7 +608,7 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_) // Compute the time when the timeout should occur. // If the timeout is infite, don't care. clock_t clock ; - int timeout = -1; + int timeout = options.rcvtimeo; uint64_t end = timeout < 0 ? 0 : (clock.now_ms () + timeout); // In blocking scenario, commands are processed over and over again until diff --git a/src/trie.cpp b/src/trie.cpp index 4198ff3..883b23e 100644 --- a/src/trie.cpp +++ b/src/trie.cpp @@ -1,5 +1,6 @@ /* Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011-2012 Spotify AB Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -34,14 +35,18 @@ zmq::trie_t::trie_t () : refcnt (0), min (0), - count (0) + count (0), + live_nodes (0) { } zmq::trie_t::~trie_t () { - if (count == 1) + if (count == 1) { + zmq_assert (next.node); delete next.node; + next.node = 0; + } else if (count > 1) { for (unsigned short i = 0; i != count; ++i) if (next.table [i]) @@ -112,6 +117,7 @@ void zmq::trie_t::add (unsigned char *prefix_, size_t size_) if (!next.node) { next.node = new (std::nothrow) trie_t; alloc_assert (next.node); + ++live_nodes; } next.node->add (prefix_ + 1, size_ - 1); } @@ -119,6 +125,7 @@ void zmq::trie_t::add (unsigned char *prefix_, size_t size_) if (!next.table [c - min]) { next.table [c - min] = new (std::nothrow) trie_t; alloc_assert (next.table [c - min]); + ++live_nodes; } next.table [c - min]->add (prefix_ + 1, size_ - 1); } @@ -143,7 +150,20 @@ bool zmq::trie_t::rm (unsigned char *prefix_, size_t size_) if (!next_node) return false; - return next_node->rm (prefix_ + 1, size_ - 1); + bool ret = next_node->rm (prefix_ + 1, size_ - 1); + + if (next_node->is_redundant ()) { + delete next_node; + if (count == 1) { + next.node = 0; + count = 0; + } + else + next.table [c - min] = 0; + --live_nodes; + } + + return ret; } bool zmq::trie_t::check (unsigned char *data_, size_t size_) @@ -179,3 +199,8 @@ bool zmq::trie_t::check (unsigned char *data_, size_t size_) size_--; } } + +bool zmq::trie_t::is_redundant() const +{ + return refcnt == 0 && live_nodes == 0; +} diff --git a/src/trie.hpp b/src/trie.hpp index dbf1cb1..7b1b62c 100644 --- a/src/trie.hpp +++ b/src/trie.hpp @@ -1,5 +1,6 @@ /* Copyright (c) 2007-2011 iMatix Corporation + Copyright (c) 2011-2012 Spotify AB Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -40,10 +41,12 @@ namespace zmq bool check (unsigned char *data_, size_t size_); private: + bool is_redundant () const; uint32_t refcnt; unsigned char min; unsigned short count; + unsigned short live_nodes; union { class trie_t *node; class trie_t **table; diff --git a/tests/Makefile.am b/tests/Makefile.am index ebbc46c..785b7c5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,7 +10,8 @@ noinst_PROGRAMS = test_pair_inproc \ if !ON_MINGW noinst_PROGRAMS += test_shutdown_stress \ test_pair_ipc \ - test_reqrep_ipc + test_reqrep_ipc \ + test_timeo endif test_pair_inproc_SOURCES = test_pair_inproc.cpp testutil.hpp @@ -25,6 +26,7 @@ if !ON_MINGW test_shutdown_stress_SOURCES = test_shutdown_stress.cpp test_pair_ipc_SOURCES = test_pair_ipc.cpp testutil.hpp test_reqrep_ipc_SOURCES = test_reqrep_ipc.cpp testutil.hpp +test_timeo_SOURCES = test_timeo.cpp endif TESTS = $(noinst_PROGRAMS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 2bf15e0..c5a95a7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -39,7 +39,8 @@ noinst_PROGRAMS = test_pair_inproc$(EXEEXT) test_pair_tcp$(EXEEXT) \ test_hwm$(EXEEXT) $(am__EXEEXT_1) @ON_MINGW_FALSE@am__append_1 = test_shutdown_stress \ @ON_MINGW_FALSE@ test_pair_ipc \ -@ON_MINGW_FALSE@ test_reqrep_ipc +@ON_MINGW_FALSE@ test_reqrep_ipc \ +@ON_MINGW_FALSE@ test_timeo subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -58,7 +59,7 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @ON_MINGW_FALSE@am__EXEEXT_1 = test_shutdown_stress$(EXEEXT) \ @ON_MINGW_FALSE@ test_pair_ipc$(EXEEXT) \ -@ON_MINGW_FALSE@ test_reqrep_ipc$(EXEEXT) +@ON_MINGW_FALSE@ test_reqrep_ipc$(EXEEXT) test_timeo$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_test_hwm_OBJECTS = test_hwm.$(OBJEXT) test_hwm_OBJECTS = $(am_test_hwm_OBJECTS) @@ -100,6 +101,11 @@ am__test_shutdown_stress_SOURCES_DIST = test_shutdown_stress.cpp test_shutdown_stress_OBJECTS = $(am_test_shutdown_stress_OBJECTS) test_shutdown_stress_LDADD = $(LDADD) test_shutdown_stress_DEPENDENCIES = $(top_builddir)/src/libzmq.la +am__test_timeo_SOURCES_DIST = test_timeo.cpp +@ON_MINGW_FALSE@am_test_timeo_OBJECTS = test_timeo.$(OBJEXT) +test_timeo_OBJECTS = $(am_test_timeo_OBJECTS) +test_timeo_LDADD = $(LDADD) +test_timeo_DEPENDENCIES = $(top_builddir)/src/libzmq.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles @@ -145,12 +151,14 @@ am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(test_hwm_SOURCES) $(test_pair_inproc_SOURCES) \ $(test_pair_ipc_SOURCES) $(test_pair_tcp_SOURCES) \ $(test_reqrep_inproc_SOURCES) $(test_reqrep_ipc_SOURCES) \ - $(test_reqrep_tcp_SOURCES) $(test_shutdown_stress_SOURCES) + $(test_reqrep_tcp_SOURCES) $(test_shutdown_stress_SOURCES) \ + $(test_timeo_SOURCES) DIST_SOURCES = $(test_hwm_SOURCES) $(test_pair_inproc_SOURCES) \ $(am__test_pair_ipc_SOURCES_DIST) $(test_pair_tcp_SOURCES) \ $(test_reqrep_inproc_SOURCES) \ $(am__test_reqrep_ipc_SOURCES_DIST) $(test_reqrep_tcp_SOURCES) \ - $(am__test_shutdown_stress_SOURCES_DIST) + $(am__test_shutdown_stress_SOURCES_DIST) \ + $(am__test_timeo_SOURCES_DIST) ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -303,6 +311,7 @@ test_hwm_SOURCES = test_hwm.cpp @ON_MINGW_FALSE@test_shutdown_stress_SOURCES = test_shutdown_stress.cpp @ON_MINGW_FALSE@test_pair_ipc_SOURCES = test_pair_ipc.cpp testutil.hpp @ON_MINGW_FALSE@test_reqrep_ipc_SOURCES = test_reqrep_ipc.cpp testutil.hpp +@ON_MINGW_FALSE@test_timeo_SOURCES = test_timeo.cpp TESTS = $(noinst_PROGRAMS) all: all-am @@ -371,6 +380,9 @@ test_reqrep_tcp$(EXEEXT): $(test_reqrep_tcp_OBJECTS) $(test_reqrep_tcp_DEPENDENC test_shutdown_stress$(EXEEXT): $(test_shutdown_stress_OBJECTS) $(test_shutdown_stress_DEPENDENCIES) @rm -f test_shutdown_stress$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_shutdown_stress_OBJECTS) $(test_shutdown_stress_LDADD) $(LIBS) +test_timeo$(EXEEXT): $(test_timeo_OBJECTS) $(test_timeo_DEPENDENCIES) + @rm -f test_timeo$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(test_timeo_OBJECTS) $(test_timeo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -386,6 +398,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_ipc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_tcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_shutdown_stress.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_timeo.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff --git a/tests/test_timeo.cpp b/tests/test_timeo.cpp new file mode 100644 index 0000000..b9cd512 --- /dev/null +++ b/tests/test_timeo.cpp @@ -0,0 +1,125 @@ +/* + Copyright (c) 2010-2011 250bpm s.r.o. + Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file + + This file is part of 0MQ. + + 0MQ is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + 0MQ is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . +*/ + +#include +#include +#include +#include + +#include "../include/zmq.h" +#include "../include/zmq_utils.h" + +extern "C" +{ + void *worker(void *ctx) + { + // Worker thread connects after delay of 1 second. Then it waits + // for 1 more second, so that async connect has time to succeed. + zmq_sleep (1); + void *sc = zmq_socket (ctx, ZMQ_PUSH); + assert (sc); + int rc = zmq_connect (sc, "inproc://timeout_test"); + assert (rc == 0); + zmq_sleep (1); + rc = zmq_close (sc); + assert (rc == 0); + return NULL; + } +} + +int main (int argc, char *argv []) +{ + fprintf (stderr, "test_timeo running...\n"); + + void *ctx = zmq_init (1); + assert (ctx); + + // Create a disconnected socket. + void *sb = zmq_socket (ctx, ZMQ_PULL); + assert (sb); + int rc = zmq_bind (sb, "inproc://timeout_test"); + assert (rc == 0); + + // Check whether non-blocking recv returns immediately. + zmq_msg_t msg; + zmq_msg_init (&msg); + rc = zmq_recv (sb, &msg, ZMQ_NOBLOCK); + assert (rc == -1); + assert (zmq_errno() == EAGAIN); + + // Check whether recv timeout is honoured. + int timeout = 500; + size_t timeout_size = sizeof timeout; + rc = zmq_setsockopt(sb, ZMQ_RCVTIMEO, &timeout, timeout_size); + assert (rc == 0); + void *watch = zmq_stopwatch_start (); + rc = zmq_recv (sb, &msg, 0); + assert (rc == -1); + assert (zmq_errno () == EAGAIN); + unsigned long elapsed = zmq_stopwatch_stop (watch); + assert (elapsed > 440000 && elapsed < 550000); + + // Check whether connection during the wait doesn't distort the timeout. + timeout = 2000; + rc = zmq_setsockopt(sb, ZMQ_RCVTIMEO, &timeout, timeout_size); + assert (rc == 0); + pthread_t thread; + rc = pthread_create (&thread, NULL, worker, ctx); + assert (rc == 0); + watch = zmq_stopwatch_start (); + rc = zmq_recv (sb, &msg, 0); + assert (rc == -1); + assert (zmq_errno () == EAGAIN); + elapsed = zmq_stopwatch_stop (watch); + assert (elapsed > 1900000 && elapsed < 2100000); + rc = pthread_join (thread, NULL); + assert (rc == 0); + + // Check that timeouts don't break normal message transfer. + void *sc = zmq_socket (ctx, ZMQ_PUSH); + assert (sc); + rc = zmq_setsockopt(sb, ZMQ_RCVTIMEO, &timeout, timeout_size); + assert (rc == 0); + rc = zmq_setsockopt(sb, ZMQ_SNDTIMEO, &timeout, timeout_size); + assert (rc == 0); + rc = zmq_connect (sc, "inproc://timeout_test"); + assert (rc == 0); + + zmq_msg_init (&msg); + zmq_msg_init_size (&msg, 32); + memcpy (zmq_msg_data (&msg), "12345678ABCDEFGH12345678abcdefgh", 32); + rc = zmq_send (sc, &msg, 0); + assert (rc == 0); + + rc = zmq_recv (sb, &msg, 0); + assert (rc == 0); + assert (32 == zmq_msg_size(&msg)); + + // Clean-up. + rc = zmq_close (sc); + assert (rc == 0); + rc = zmq_close (sb); + assert (rc == 0); + rc = zmq_term (ctx); + assert (rc == 0); + + return 0 ; +} + diff --git a/zeromq.spec b/zeromq.spec index 6c2549a..95f66a1 100644 --- a/zeromq.spec +++ b/zeromq.spec @@ -1,5 +1,5 @@ Name: zeromq -Version: 2.1.11 +Version: 2.2.0 Release: 1%{?dist} Summary: The ZeroMQ messaging library Group: Applications/Internet -- cgit v1.2.3