summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Lucina <martin@lucina.net>2012-01-23 08:53:35 +0100
committerMartin Lucina <martin@lucina.net>2012-01-23 08:53:35 +0100
commite645fc2693acc796304498909786b7b47005b429 (patch)
tree4118cd4c7b9eba3ba1d6892800c79669ea94c4e9
parent2c416a793ea781273a5da6742211f5f01af13a2b (diff)
Imported Upstream version 2.1.3upstream/2.1.3
-rw-r--r--AUTHORS25
-rw-r--r--ChangeLog4925
-rw-r--r--INSTALL237
-rw-r--r--MAINTAINERS10
-rw-r--r--Makefile.am8
-rw-r--r--Makefile.in38
-rw-r--r--NEWS575
-rw-r--r--README7
-rw-r--r--acinclude.m4540
-rw-r--r--aclocal.m4190
-rwxr-xr-xautogen.sh14
-rw-r--r--builds/msvc/Makefile.am6
-rw-r--r--builds/msvc/Makefile.in34
-rw-r--r--builds/msvc/libzmq/libzmq.vcproj237
-rw-r--r--builds/msvc/msvc.sln32
-rw-r--r--builds/msvc/platform.hpp11
-rw-r--r--builds/msvc/zmq_forwarder/zmq_forwarder.vcproj176
-rw-r--r--builds/msvc/zmq_queue/zmq_queue.vcproj176
-rw-r--r--builds/msvc/zmq_streamer/zmq_streamer.vcproj176
-rwxr-xr-xconfig/config.guess149
-rwxr-xr-xconfig/config.sub47
-rwxr-xr-xconfigure3798
-rw-r--r--configure.in384
-rw-r--r--devices/Makefile.am3
-rw-r--r--devices/Makefile.in576
-rw-r--r--devices/zmq_forwarder/Makefile.am8
-rw-r--r--devices/zmq_forwarder/Makefile.in530
-rw-r--r--devices/zmq_forwarder/zmq_forwarder.cpp119
-rw-r--r--devices/zmq_queue/Makefile.am8
-rw-r--r--devices/zmq_queue/Makefile.in530
-rw-r--r--devices/zmq_queue/zmq_queue.cpp118
-rw-r--r--devices/zmq_streamer/Makefile.am8
-rw-r--r--devices/zmq_streamer/Makefile.in530
-rw-r--r--devices/zmq_streamer/zmq_streamer.cpp118
-rw-r--r--doc/Makefile.am20
-rw-r--r--doc/Makefile.in106
-rw-r--r--doc/zmq.734
-rw-r--r--doc/zmq.html866
-rw-r--r--doc/zmq.txt32
-rw-r--r--doc/zmq_bind.313
-rw-r--r--doc/zmq_bind.html738
-rw-r--r--doc/zmq_bind.txt4
-rw-r--r--doc/zmq_close.328
-rw-r--r--doc/zmq_close.html635
-rw-r--r--doc/zmq_close.txt18
-rw-r--r--doc/zmq_connect.313
-rw-r--r--doc/zmq_connect.html724
-rw-r--r--doc/zmq_connect.txt4
-rw-r--r--doc/zmq_cpp.712
-rw-r--r--doc/zmq_cpp.html763
-rw-r--r--doc/zmq_cpp.txt4
-rw-r--r--doc/zmq_device.3140
-rw-r--r--doc/zmq_device.txt138
-rw-r--r--doc/zmq_epgm.714
-rw-r--r--doc/zmq_epgm.html745
-rw-r--r--doc/zmq_epgm.txt8
-rw-r--r--doc/zmq_errno.310
-rw-r--r--doc/zmq_errno.html634
-rw-r--r--doc/zmq_errno.txt4
-rw-r--r--doc/zmq_forwarder.157
-rw-r--r--doc/zmq_forwarder.html613
-rw-r--r--doc/zmq_forwarder.txt33
-rw-r--r--doc/zmq_getsockopt.3445
-rw-r--r--doc/zmq_getsockopt.html1202
-rw-r--r--doc/zmq_getsockopt.txt180
-rw-r--r--doc/zmq_init.312
-rw-r--r--doc/zmq_init.html632
-rw-r--r--doc/zmq_init.txt7
-rw-r--r--doc/zmq_inproc.78
-rw-r--r--doc/zmq_inproc.html669
-rw-r--r--doc/zmq_inproc.txt2
-rw-r--r--doc/zmq_ipc.78
-rw-r--r--doc/zmq_ipc.html662
-rw-r--r--doc/zmq_ipc.txt2
-rw-r--r--doc/zmq_msg_close.38
-rw-r--r--doc/zmq_msg_close.html638
-rw-r--r--doc/zmq_msg_close.txt2
-rw-r--r--doc/zmq_msg_copy.38
-rw-r--r--doc/zmq_msg_copy.html647
-rw-r--r--doc/zmq_msg_copy.txt2
-rw-r--r--doc/zmq_msg_data.38
-rw-r--r--doc/zmq_msg_data.html633
-rw-r--r--doc/zmq_msg_data.txt2
-rw-r--r--doc/zmq_msg_init.38
-rw-r--r--doc/zmq_msg_init.html656
-rw-r--r--doc/zmq_msg_init.txt2
-rw-r--r--doc/zmq_msg_init_data.38
-rw-r--r--doc/zmq_msg_init_data.html669
-rw-r--r--doc/zmq_msg_init_data.txt2
-rw-r--r--doc/zmq_msg_init_size.38
-rw-r--r--doc/zmq_msg_init_size.html656
-rw-r--r--doc/zmq_msg_init_size.txt2
-rw-r--r--doc/zmq_msg_move.38
-rw-r--r--doc/zmq_msg_move.html636
-rw-r--r--doc/zmq_msg_move.txt2
-rw-r--r--doc/zmq_msg_size.38
-rw-r--r--doc/zmq_msg_size.html633
-rw-r--r--doc/zmq_msg_size.txt2
-rw-r--r--doc/zmq_pgm.714
-rw-r--r--doc/zmq_pgm.html745
-rw-r--r--doc/zmq_pgm.txt8
-rw-r--r--doc/zmq_poll.344
-rw-r--r--doc/zmq_poll.html764
-rw-r--r--doc/zmq_poll.txt21
-rw-r--r--doc/zmq_queue.157
-rw-r--r--doc/zmq_queue.html613
-rw-r--r--doc/zmq_queue.txt33
-rw-r--r--doc/zmq_recv.313
-rw-r--r--doc/zmq_recv.html729
-rw-r--r--doc/zmq_recv.txt5
-rw-r--r--doc/zmq_send.315
-rw-r--r--doc/zmq_send.html735
-rw-r--r--doc/zmq_send.txt7
-rw-r--r--doc/zmq_setsockopt.3306
-rw-r--r--doc/zmq_setsockopt.html1277
-rw-r--r--doc/zmq_setsockopt.txt125
-rw-r--r--doc/zmq_socket.376
-rw-r--r--doc/zmq_socket.html1403
-rw-r--r--doc/zmq_socket.txt82
-rw-r--r--doc/zmq_streamer.157
-rw-r--r--doc/zmq_streamer.html613
-rw-r--r--doc/zmq_streamer.txt33
-rw-r--r--doc/zmq_strerror.38
-rw-r--r--doc/zmq_strerror.html634
-rw-r--r--doc/zmq_strerror.txt2
-rw-r--r--doc/zmq_tcp.714
-rw-r--r--doc/zmq_tcp.html755
-rw-r--r--doc/zmq_tcp.txt8
-rw-r--r--doc/zmq_term.367
-rw-r--r--doc/zmq_term.html658
-rw-r--r--doc/zmq_term.txt36
-rw-r--r--doc/zmq_version.310
-rw-r--r--doc/zmq_version.html632
-rw-r--r--doc/zmq_version.txt4
-rw-r--r--foreign/openpgm/libpgm-2-1-28~dfsg.tar.gzbin340501 -> 0 bytes
-rw-r--r--foreign/openpgm/libpgm-5.1.114~dfsg.tar.gzbin0 -> 1051807 bytes
-rw-r--r--include/zmq.h49
-rw-r--r--include/zmq.hpp49
-rw-r--r--include/zmq_utils.h21
-rw-r--r--perf/Makefile.in73
-rw-r--r--perf/local_lat.cpp9
-rw-r--r--perf/local_thr.cpp9
-rw-r--r--perf/remote_lat.cpp9
-rw-r--r--perf/remote_thr.cpp17
-rw-r--r--src/Makefile.am175
-rw-r--r--src/Makefile.in1119
-rw-r--r--src/app_thread.cpp197
-rw-r--r--src/app_thread.hpp88
-rw-r--r--src/array.hpp (renamed from src/yarray.hpp)75
-rw-r--r--src/atomic_counter.hpp11
-rw-r--r--src/atomic_ptr.hpp11
-rw-r--r--src/blob.hpp9
-rw-r--r--src/clock.cpp118
-rw-r--r--src/clock.hpp60
-rw-r--r--src/command.cpp9
-rw-r--r--src/command.hpp50
-rw-r--r--src/config.hpp36
-rw-r--r--src/connect_session.cpp119
-rw-r--r--src/connect_session.hpp65
-rw-r--r--src/ctx.cpp340
-rw-r--r--src/ctx.hpp141
-rw-r--r--src/decoder.cpp (renamed from src/zmq_decoder.cpp)67
-rw-r--r--src/decoder.hpp85
-rw-r--r--src/device.cpp (renamed from src/queue.cpp)46
-rw-r--r--src/device.hpp (renamed from src/queue.hpp)15
-rw-r--r--src/devpoll.cpp86
-rw-r--r--src/devpoll.hpp34
-rw-r--r--src/dist.cpp196
-rw-r--r--src/dist.hpp92
-rw-r--r--src/encoder.cpp (renamed from src/zmq_encoder.cpp)33
-rw-r--r--src/encoder.hpp54
-rw-r--r--src/epoll.cpp70
-rw-r--r--src/epoll.hpp26
-rw-r--r--src/err.cpp50
-rw-r--r--src/err.hpp38
-rw-r--r--src/fd.hpp9
-rw-r--r--src/forwarder.cpp60
-rw-r--r--src/forwarder.hpp31
-rw-r--r--src/fq.cpp75
-rw-r--r--src/fq.hpp38
-rw-r--r--src/i_endpoint.hpp43
-rw-r--r--src/i_engine.hpp26
-rw-r--r--src/i_inout.hpp30
-rw-r--r--src/i_poll_events.hpp35
-rw-r--r--src/io_object.cpp41
-rw-r--r--src/io_object.hpp27
-rw-r--r--src/io_thread.cpp34
-rw-r--r--src/io_thread.hpp31
-rw-r--r--src/ip.cpp29
-rw-r--r--src/ip.hpp11
-rw-r--r--src/kqueue.cpp68
-rw-r--r--src/kqueue.hpp26
-rw-r--r--src/lb.cpp83
-rw-r--r--src/lb.hpp38
-rw-r--r--src/likely.hpp9
-rw-r--r--src/mailbox.cpp382
-rw-r--r--src/mailbox.hpp62
-rw-r--r--src/msg_content.hpp9
-rw-r--r--src/mutex.hpp11
-rw-r--r--src/named_session.cpp85
-rw-r--r--src/named_session.hpp57
-rw-r--r--src/object.cpp203
-rw-r--r--src/object.hpp71
-rw-r--r--src/options.cpp121
-rw-r--r--src/options.hpp27
-rw-r--r--src/own.cpp214
-rw-r--r--src/own.hpp140
-rw-r--r--src/owned.cpp71
-rw-r--r--src/owned.hpp89
-rw-r--r--src/pair.cpp112
-rw-r--r--src/pair.hpp41
-rw-r--r--src/pgm_receiver.cpp68
-rw-r--r--src/pgm_receiver.hpp43
-rw-r--r--src/pgm_sender.cpp77
-rw-r--r--src/pgm_sender.hpp30
-rw-r--r--src/pgm_socket.cpp719
-rw-r--r--src/pgm_socket.hpp29
-rw-r--r--src/pipe.cpp426
-rw-r--r--src/pipe.hpp169
-rw-r--r--src/platform.hpp.in24
-rw-r--r--src/poll.cpp74
-rw-r--r--src/poll.hpp29
-rw-r--r--src/poller.hpp9
-rw-r--r--src/poller_base.cpp99
-rw-r--r--src/poller_base.hpp84
-rw-r--r--src/pub.cpp162
-rw-r--r--src/pub.hpp44
-rw-r--r--src/pull.cpp61
-rw-r--r--src/pull.hpp26
-rw-r--r--src/push.cpp63
-rw-r--r--src/push.hpp26
-rw-r--r--src/reaper.cpp121
-rw-r--r--src/reaper.hpp77
-rw-r--r--src/rep.cpp248
-rw-r--r--src/rep.hpp54
-rw-r--r--src/req.cpp243
-rw-r--r--src/req.hpp59
-rw-r--r--src/select.cpp82
-rw-r--r--src/select.hpp29
-rw-r--r--src/semaphore.hpp189
-rw-r--r--src/session.cpp360
-rw-r--r--src/session.hpp126
-rw-r--r--src/signaler.cpp351
-rw-r--r--src/signaler.hpp71
-rw-r--r--src/socket_base.cpp814
-rw-r--r--src/socket_base.hpp206
-rw-r--r--src/stdint.hpp19
-rw-r--r--src/streamer.cpp60
-rw-r--r--src/sub.cpp182
-rw-r--r--src/sub.hpp53
-rw-r--r--src/swap.cpp (renamed from src/msg_store.cpp)70
-rw-r--r--src/swap.hpp (renamed from src/msg_store.hpp)47
-rw-r--r--src/tcp_connecter.cpp9
-rw-r--r--src/tcp_connecter.hpp11
-rw-r--r--src/tcp_listener.cpp48
-rw-r--r--src/tcp_listener.hpp17
-rw-r--r--src/tcp_socket.cpp9
-rw-r--r--src/tcp_socket.hpp11
-rw-r--r--src/thread.cpp83
-rw-r--r--src/thread.hpp28
-rw-r--r--src/transient_session.cpp41
-rw-r--r--src/transient_session.hpp52
-rw-r--r--src/trie.cpp (renamed from src/prefix_tree.cpp)51
-rw-r--r--src/trie.hpp (renamed from src/prefix_tree.hpp)26
-rw-r--r--src/uuid.cpp16
-rw-r--r--src/uuid.hpp9
-rw-r--r--src/windows.hpp9
-rw-r--r--src/wire.hpp9
-rw-r--r--src/xpub.cpp76
-rw-r--r--src/xpub.hpp61
-rw-r--r--src/xrep.cpp168
-rw-r--r--src/xrep.hpp42
-rw-r--r--src/xreq.cpp51
-rw-r--r--src/xreq.hpp25
-rw-r--r--src/xsub.cpp172
-rw-r--r--src/xsub.hpp80
-rw-r--r--src/yarray_item.hpp64
-rw-r--r--src/ypipe.hpp11
-rw-r--r--src/yqueue.hpp15
-rw-r--r--src/zmq.cpp708
-rw-r--r--src/zmq_connecter.cpp118
-rw-r--r--src/zmq_connecter.hpp54
-rw-r--r--src/zmq_decoder.hpp59
-rw-r--r--src/zmq_encoder.hpp55
-rw-r--r--src/zmq_engine.cpp119
-rw-r--r--src/zmq_engine.hpp37
-rw-r--r--src/zmq_init.cpp185
-rw-r--r--src/zmq_init.hpp52
-rw-r--r--src/zmq_listener.cpp41
-rw-r--r--src/zmq_listener.hpp26
-rw-r--r--tests/Makefile.am30
-rw-r--r--tests/Makefile.in707
-rw-r--r--tests/test_hwm.cpp68
-rw-r--r--tests/test_pair_inproc.cpp (renamed from src/streamer.hpp)26
-rw-r--r--tests/test_pair_ipc.cpp31
-rw-r--r--tests/test_pair_tcp.cpp31
-rw-r--r--tests/test_reqrep_inproc.cpp31
-rw-r--r--tests/test_reqrep_ipc.cpp31
-rw-r--r--tests/test_reqrep_tcp.cpp31
-rw-r--r--tests/test_shutdown_stress.cpp87
-rw-r--r--tests/testutil.hpp130
-rwxr-xr-xversion.sh2
-rw-r--r--zeromq.spec20
303 files changed, 20177 insertions, 36042 deletions
diff --git a/AUTHORS b/AUTHORS
index de72c85..b75ac86 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -6,29 +6,49 @@ Asko Kauppi <askok@dnainternet.net>
Barak Amar <barak.amar@gmail.com>
Bernd Prager <bernd@prager.ws>
Bernd Melchers <melchers@ZEDAT.FU-Berlin.DE>
+Bob Beaty <rbeaty@peak6.com>
Brian Buchanan <bwb@holo.org>
+Brett Cameron <Brett.Cameron@hp.com>
+Burak Arslan <burak-github@arskom.com.tr>
+Chia-liang Kao <clkao@clkao.org>
+Chris Rempel <csrl@gmx.com>
Chris Wong <chris@chriswongstudio.com>
+Christian Gudrian <christian.gudrian@fluidon.com>
Conrad D. Steenberg <conrad.steenberg@caltech.edu>
+Dhammika Pathirana <dhammika@gmail.com>
Dhruva Krishnamurthy <dhruva@ymail.com>
Dirk O. Kaar <dok@dok-net.net>
+Douglas Creager <douglas.creager@redjack.com>
Erich Heine <sophacles@gmail.com>
Erik Rigtorp <erik@rigtorp.com>
Frank Denis <zeromq@pureftpd.org>
George Neill <georgen@neillnet.com>
+Gerard Toonstra <gtoonstra@gmail.com>
Gonzalo Diethelm <gdiethelm@dcv.cl>
+Guido Goldstein <zmq@a-nugget.de>
+Ilja Golshtein <ilejncs@narod.ru>
Ivo Danihelka <ivo@danihelka.net>
+Jacob Rideout <jacob.rideout@returnpath.net>
Joe Thornber <joe.thornber@gmail.com>
Jon Dyte <jon@totient.co.uk>
Kamil Shakirov <kamils80@gmail.com>
+Marc Rossi <mrossi19@gmail.com>
Martin Hurton <hurtonm@gmail.com>
Martin Lucina <mato@kotelna.sk>
+Martin Pales <m.pales@gmail.com>
Martin Sustrik <sustrik@250bpm.com>
Matus Hamorsky <mhamorsky@gmail.com>
Max Wolf <YIDIEPXGXGPN@spammotel.com>
McClain Looney <m@loonsoft.com>
+Michael Compton <michael.compton@littleedge.co.uk>
Mikael Helbo Kjaer <mhk@designtech.dk>
+Mikko Koppanen <mkoppanen@php.net>
+Min Ragan-Kelley <benjaminrk@gmail.com>
+Neale Ferguson <neale@sinenomine.net>
+Nir Soffer <nirsof@gmail.com>
Pavel Gushcha <pavimus@gmail.com>
Pavol Malosek <malosek@fastmq.com>
+Peter Bourgon <peter.bourgon@gmail.com>
Pieter Hintjens <ph@imatix.com>
Piotr Trojanek <piotr.trojanek@gmail.com>
Sebastian Otaegui <feniix@gmail.com>
@@ -37,6 +57,8 @@ Tamara Kustarova <kustarova.tamara@gmail.com>
Taras Shpot <taras.shpot@eleks.com>
Tero Marttila <terom@fixme.fi>
Terry Wilson <terry@logivox.net>
+Thijs Terlouw <thijsterlouw@gmail.com>
+Toralf Wittner <toralf.wittner@gmail.com>
Vitaly Mayatskikh <v.mayatskih@gmail.com>
Credits
@@ -47,8 +69,8 @@ Adrian von Bidder <avbidder@fortytwo.ch>
Aleksey Yeschenko <aleksey@yeschenko.com>
Alessio Spadaro <alessio.spadaro@finservice.com>
Alexander Majorov <alexander.majorov@intel.com>
+Anh Vu <vietanh.vu@m4x.org>
Bernd Schumacher <bernd.schumacher@hp.com>
-Brett Cameron <Brett.Cameron@hp.com>
Brian Granger <ellisonbg.net@gmail.com>
Carsten Dinkelmann <din@foobar-cpa.de>
David Bahi <dbahi@novell.com>
@@ -59,6 +81,7 @@ John Apps <john.apps@hp.com>
Markus Fischer <markus.fischer@hpc-solutions.com>
Matt Muggeridge <Matt.Muggeridge@hp.com>
Michael Santy <Michael.Santy@dynetics.com>
+Oleg Sevostyanov <oleg.sev@gmail.com>
Paulo Henrique Silva <ph.silva@gmail.com>
Peter Busser <busserpeter@gmail.com>
Peter Lemenkov <lemenkov@gmail.com>
diff --git a/ChangeLog b/ChangeLog
index 3ac6d30..ef98a4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,3076 @@
# Generated by Makefile. Do not edit.
+commit 31d8b7f74daa3f094347876db2774112d80611fe
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Mon Mar 21 10:08:42 2011 +0100
+
+ Fixed 'documentation' in MAINTAINERS
+
+ MAINTAINERS | 6 +-----
+ 1 files changed, 1 insertions(+), 5 deletions(-)
+
+commit a4c98d20c29b48d35af3e438e763ee915e63e790
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Mon Mar 21 10:07:03 2011 +0100
+
+ Removed MSVC builds for standalone devices
+
+ builds/msvc/Makefile.am | 6 +-
+ builds/msvc/msvc.sln | 15 --
+ builds/msvc/zmq_forwarder/zmq_forwarder.vcproj | 176 ------------------------
+ builds/msvc/zmq_queue/zmq_queue.vcproj | 176 ------------------------
+ builds/msvc/zmq_streamer/zmq_streamer.vcproj | 176 ------------------------
+ 5 files changed, 1 insertions(+), 548 deletions(-)
+
+commit bcd6ab81fa440287172081b19667f26a202d5f1c
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Mon Mar 21 09:58:10 2011 +0100
+
+ Updated NEWS for v2.1.3
+
+ NEWS | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f42399ef8788c0f5367bd22f1e82f7944d7c3e37
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Mar 20 20:52:54 2011 +0100
+
+ Message atomicity bug in load-balancer fixed
+
+ If the peer getting the message have disconnected in the middle
+ of multiplart message, the remaining part of the message went
+ to a different peer. This patch fixes the issue.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ NEWS | 5 ++++-
+ src/lb.cpp | 25 ++++++++++++++++++++++++-
+ src/lb.hpp | 3 +++
+ 3 files changed, 31 insertions(+), 2 deletions(-)
+
+commit 2294c87d2c670e95595553d3fb7a13264216a540
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 20 17:27:43 2011 +0100
+
+ Fixed README git and man page URIs
+
+ README | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 795b9482ba3aa76b994f428f6ec549ac56438110
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 20 17:17:26 2011 +0100
+
+ Removed HTML generation of man pages
+
+ doc/Makefile.am | 6 +-----
+ 1 files changed, 1 insertions(+), 5 deletions(-)
+
+commit 2bae7f7dec5468f9102983d218944d7d557ea9a4
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 20 17:09:27 2011 +0100
+
+ Removed stand-alone devices
+
+ Makefile.am | 4 +-
+ NEWS | 4 +
+ configure.in | 2 -
+ devices/Makefile.am | 3 -
+ devices/zmq_forwarder/Makefile.am | 8 --
+ devices/zmq_forwarder/zmq_forwarder.cpp | 124 -------------------------------
+ devices/zmq_queue/Makefile.am | 8 --
+ devices/zmq_queue/zmq_queue.cpp | 123 ------------------------------
+ devices/zmq_streamer/Makefile.am | 8 --
+ devices/zmq_streamer/zmq_streamer.cpp | 123 ------------------------------
+ 10 files changed, 6 insertions(+), 401 deletions(-)
+
+commit d736cea05f9eb3e63c0ecb37ea78d4bff81ddfcf
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Mar 20 11:50:51 2011 +0100
+
+ Message atomicity problem solved in PUB socket
+
+ When new peer connects to a PUB socket while it is in the middle
+ of sending of multi-part messages, it gets just the remaining
+ part of the message, i.e. message atomicity is broken.
+
+ This patch drops the tail part of the message and starts sending
+ to the peer only when new message is started.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ NEWS | 3 +++
+ src/dist.cpp | 44 +++++++++++++++++++++++++++++++++++++++-----
+ src/dist.hpp | 15 +++++++++++++++
+ 3 files changed, 57 insertions(+), 5 deletions(-)
+
+commit 6e3c38ab2d85eaf46ad9e218914e29f9984a54c2
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 20 10:26:20 2011 +0100
+
+ Clarified scope of ZMQ_PAIR sockets
+
+ Signed-off-by: Pieter Hintjens <ph@imatix.com>
+
+ doc/zmq_socket.txt | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 8402e324296d5d0d8a3734ad67d27e879496d6e0
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Fri Mar 18 07:56:11 2011 +0000
+
+ Updated openpgm to libpgm-5.1.114~dfsg
+
+ NEWS | 2 +-
+ foreign/openpgm/libpgm-5.1.113~dfsg.tar.gz | Bin 473717 -> 0 bytes
+ foreign/openpgm/libpgm-5.1.114~dfsg.tar.gz | Bin 0 -> 1051807 bytes
+ 3 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 84131c004431520f2f62e0cc45e253c13575e6da
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Thu Mar 17 11:13:50 2011 +0100
+
+ Fixed documentation issues (GH-173)
+
+ doc/zmq_setsockopt.txt | 4 ++--
+ doc/zmq_socket.txt | 8 +++++---
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+commit eeefe8fad4f2a2b20c9cc005220722b2af075c69
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Mar 16 13:48:40 2011 +0100
+
+ Incorrect errno reported from tcp_listener_t::set_address
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/tcp_listener.cpp | 20 ++++++++++++++++----
+ 1 files changed, 16 insertions(+), 4 deletions(-)
+
+commit ab1fc89b84221407ee93d0f9a87405222d336a60
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Thu Mar 17 12:10:58 2011 +0800
+
+ Add path support for asciidoc and xmlto.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ NEWS | 2 +-
+ configure.in | 5 +++++
+ doc/Makefile.am | 10 +++++-----
+ 3 files changed, 11 insertions(+), 6 deletions(-)
+
+commit 6f12503c57a47cb491c4bf6281f843b2b04f7cf6
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Thu Mar 17 12:09:25 2011 +0800
+
+ Add silent rules to documentation generators.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ doc/Makefile.am | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 976b79e38946e6a573a6567c9a4e405f5438da6f
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Thu Mar 17 12:07:45 2011 +0800
+
+ Add silent rules to Automake.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ configure.in | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 046fea6c410295471e78f219ed077e41c63f3275
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Thu Mar 17 12:06:58 2011 +0800
+
+ Bootstrapping OpenPGM Autoconf system no longer required.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ configure.in | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit be4c3afd386576932abb25deff765af378095ff4
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Thu Mar 17 12:06:36 2011 +0800
+
+ Bump OpenPGM to 5.1.114.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ configure.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e713118fce2db84a067af81c43eaf5273860e741
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Thu Mar 17 12:04:03 2011 +0800
+
+ Add support for OpenPGM on OSX by pulling in RFC 3768 compatibility header.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ src/pgm_socket.hpp | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 37483e1b772e73de60444da5b4413a52e4269124
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Thu Mar 17 12:03:19 2011 +0800
+
+ Revert workaround for OpenPGM defining bool as fixed upstream.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ src/pgm_socket.hpp | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+commit 2a7c74c71d02d5f6a93ae3c6c6aa99473a97492b
+Author: Jon Dyte <jon@totient.co.uk>
+Date: Wed Mar 16 09:54:03 2011 +0100
+
+ reset socket state when identity message cannot be written to xrep
+
+ Signed-off-by: Jon Dyte <jon@totient.co.uk>
+
+ src/xrep.cpp | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit c10add3c0895546deec4adbaa0561c8a9ebb493b
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Tue Mar 15 12:45:26 2011 +0100
+
+ Fixed zmq::version style to match rest of API
+
+ include/zmq.hpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit adf31a5e057926e4c9ea04e01048e071979edb1b
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Tue Mar 15 10:51:21 2011 +0100
+
+ Fixed Makefile for docs
+
+ doc/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d085436c3e18b2e533c2379b99ea9d29ce9a4e51
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Mar 14 20:29:00 2011 +0100
+
+ FreeBSD complation error fixed
+
+ There was an error in pgm_receiver wrt strict aliasing.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ NEWS | 5 +++++
+ src/pgm_receiver.cpp | 5 ++++-
+ 2 files changed, 9 insertions(+), 1 deletions(-)
+
+commit 74507887ee55faf12b5ac53399b9e3e815fe526d
+Merge: 58e8f1d 1c31ed6
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Tue Mar 15 10:41:30 2011 +0100
+
+ Merge branch 'master' of github.com:zeromq/zeromq2-1
+
+commit 58e8f1d3682c2351917b168c05c1f4f47ae2b810
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Tue Mar 15 10:39:04 2011 +0100
+
+ Added zmq::version method to C++ API
+
+ Signed-off-by: Pieter Hintjens <ph@imatix.com>
+
+ include/zmq.hpp | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 1c31ed6671f5cfa769ed2b03e680e1f57b83e996
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Mar 14 07:11:30 2011 +0100
+
+ Remove obsolete assert from pgm_socket.cpp
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ NEWS | 2 ++
+ src/pgm_socket.cpp | 1 -
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 56743e499bdc7cd03eff692439b2c16913fba830
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 13 18:08:08 2011 +0100
+
+ Added ROUTER/DEALER socket aliases
+
+ NEWS | 3 +++
+ include/zmq.h | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 2f4d85fd1779d6bc9a506356d7a52ec43533a379
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 13 18:07:30 2011 +0100
+
+ Fixes to man pages
+
+ - Added missing man page for zmq_device(3)
+ - Removed man pages for undocumented zmq_queue(1), zmq_forwarder(1), zmq_streamer(1)
+
+ Signed-off-by: Pieter Hintjens <ph@imatix.com>
+
+ NEWS | 44 ++++++++++++++--------------
+ doc/Makefile.am | 2 +-
+ doc/zmq.txt | 20 ++++---------
+ doc/zmq_bind.txt | 2 +-
+ doc/zmq_close.txt | 2 +-
+ doc/zmq_connect.txt | 2 +-
+ doc/zmq_cpp.txt | 2 +-
+ doc/zmq_device.txt | 72 ++++++++++++++++++++++++++++++++++++--------
+ doc/zmq_errno.txt | 2 +-
+ doc/zmq_forwarder.txt | 33 --------------------
+ doc/zmq_getsockopt.txt | 2 +-
+ doc/zmq_init.txt | 2 +-
+ doc/zmq_inproc.txt | 2 +-
+ doc/zmq_ipc.txt | 2 +-
+ doc/zmq_msg_close.txt | 2 +-
+ doc/zmq_msg_copy.txt | 2 +-
+ doc/zmq_msg_data.txt | 2 +-
+ doc/zmq_msg_init.txt | 2 +-
+ doc/zmq_msg_init_data.txt | 2 +-
+ doc/zmq_msg_init_size.txt | 2 +-
+ doc/zmq_msg_move.txt | 2 +-
+ doc/zmq_msg_size.txt | 2 +-
+ doc/zmq_pgm.txt | 2 +-
+ doc/zmq_poll.txt | 2 +-
+ doc/zmq_queue.txt | 33 --------------------
+ doc/zmq_recv.txt | 2 +-
+ doc/zmq_send.txt | 2 +-
+ doc/zmq_setsockopt.txt | 2 +-
+ doc/zmq_socket.txt | 2 +-
+ doc/zmq_streamer.txt | 33 --------------------
+ doc/zmq_strerror.txt | 2 +-
+ doc/zmq_tcp.txt | 2 +-
+ doc/zmq_term.txt | 2 +-
+ doc/zmq_version.txt | 2 +-
+ 34 files changed, 115 insertions(+), 176 deletions(-)
+
+commit 46aa3f6f4a8328025fb5d13c33ff68770200be43
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Wed Aug 4 14:41:43 2010 +0200
+
+ Added man page for the zmq_device method
+
+ doc/zmq_device.txt | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 92 insertions(+), 0 deletions(-)
+
+commit af3f1fb864dfe842f76322e744e809dd1647b281
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 13 07:44:34 2011 +0100
+
+ Updated man page for ZMQ_ROUTER, ZMQ_DEALER
+
+ doc/zmq_socket.txt | 38 ++++++++++++++++++++++----------------
+ 1 files changed, 22 insertions(+), 16 deletions(-)
+
+commit 42c672aa781c3230ce2240f205eb924074c25a1c
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 13 06:54:57 2011 +0100
+
+ Defined ZMQ_DEALER and ZMQ_ROUTER
+
+ NEWS | 9 +++++++--
+ include/zmq.h | 6 ++++--
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+commit 6ff5b7f7abfa4830949631c131f752fdb5635ad2
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 13 06:54:36 2011 +0100
+
+ Restored multicast loop by default
+
+ src/options.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 63b842610872d364a5103739dab4827f6bf91ce1
+Author: guidog <github@a-nugget.de>
+Date: Fri Mar 11 12:20:36 2011 +0100
+
+ Added missing close method w/ check if socket is already closed.
+
+ Signed-off-by: guidog <github@a-nugget.de>
+
+ NEWS | 2 ++
+ include/zmq.hpp | 14 ++++++++++++--
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+commit 79fe799e1b4f06249f9d6ff97f5ed34e93a6c007
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Fri Mar 11 11:45:04 2011 +0100
+
+ Updated NEWS
+
+ NEWS | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 1de4d5b5653ee7e78511006ea72266edee7cce89
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Fri Mar 11 11:44:51 2011 +0100
+
+ Fixed doc of ZMQ_LINGER socket option
+
+ doc/zmq_setsockopt.txt | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit b62dd40f356037f8507e21e181690064afbe90ce
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Fri Mar 11 17:49:31 2011 +0800
+
+ Use new PGM_ODATA_MAX_RTE controlling original data instead of PGM_TXW_MAX_RTE covering entire channel.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ NEWS | 17 +++++++++++++----
+ src/pgm_socket.cpp | 6 +++---
+ 2 files changed, 16 insertions(+), 7 deletions(-)
+
+commit b66bf4d75d4974422f0a0313fdc38aa2b2dda58b
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Fri Mar 11 17:48:33 2011 +0800
+
+ Bump default rate to 40mbps, disable multicast loop.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ src/options.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 75cc68c04efad96e8dbfeedaea1595ad082fccfe
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Thu Mar 10 19:57:35 2011 +0000
+
+ Delete old openpgm package
+
+ NEWS | 11 +++++++++++
+ foreign/openpgm/libpgm-5.0.92~dfsg.tar.gz | Bin 444700 -> 0 bytes
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 8e389b0a20079ea604f2876639781e593e3f56ad
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Thu Mar 10 19:56:34 2011 +0000
+
+ Use OpenPGM autoconf
+
+ Makefile.am | 6 +-
+ configure.in | 84 ++++++++-----------------
+ foreign/openpgm/libpgm-5.1.113~dfsg.tar.gz | Bin 0 -> 473717 bytes
+ src/Makefile.am | 97 +---------------------------
+ 4 files changed, 31 insertions(+), 156 deletions(-)
+
+commit 946b81bf79d028445686e1d77260c5ed0eac4f15
+Author: Brett Cameron <Brett.Cameron@hp.com>
+Date: Tue Mar 8 14:39:52 2011 +0100
+
+ Different fixes to make OpenVMS port work.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ AUTHORS | 2 +-
+ NEWS | 2 ++
+ src/ip.cpp | 16 ++++++++++------
+ src/ip.hpp | 2 --
+ src/semaphore.hpp | 2 ++
+ src/stdint.hpp | 10 +---------
+ 6 files changed, 16 insertions(+), 18 deletions(-)
+
+commit 1dc25322b7361c342d310246b10b99ed5022be84
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Mar 9 16:34:37 2011 +0100
+
+ Windows build fixed
+
+ Compilation of ip.cpp have failed because EPROTONOSUPPORT
+ was undefined. Including zmq.h should help as the error
+ code is defined there.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ NEWS | 3 +++
+ src/ip.cpp | 2 ++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 2ddb106601460e3fa5bec2de93f374b0e1af6a5f
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Tue Mar 8 18:32:00 2011 +0800
+
+ Re-add PGM_TXW_MAX_RTE in order to have rate limiting.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ NEWS | 10 ++++++++++
+ src/pgm_socket.cpp | 5 ++++-
+ 2 files changed, 14 insertions(+), 1 deletions(-)
+
+commit 515945929dd92779176a20452a38b4d193fc2453
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 6 10:39:11 2011 +0100
+
+ Updated version number to 2.1.3
+
+ include/zmq.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0b694448f9b32f7528eb93443c2a94b6bb4fd8ed
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sun Mar 6 10:38:32 2011 +0100
+
+ Updated NEWS for 2.1.2
+
+ NEWS | 22 ++++++++++++++++++----
+ 1 files changed, 18 insertions(+), 4 deletions(-)
+
+commit 01923856da74d07877f5e773ea6d0397339f5a55
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Mar 3 12:37:11 2011 +0100
+
+ Bug caused by interaction of REQ/REP routing and HWM fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/xrep.cpp | 16 +++++++++++++++-
+ 1 files changed, 15 insertions(+), 1 deletions(-)
+
+commit c31d090860c21a27e69035acc42360dc8e27da87
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Mar 3 12:15:08 2011 +0100
+
+ Documentation wrt thread-safety cleaned up.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_init.txt | 5 +++++
+ doc/zmq_socket.txt | 13 +++----------
+ 2 files changed, 8 insertions(+), 10 deletions(-)
+
+commit 1096070ce2bb789abd9b210f0c2234e247259ce3
+Merge: b7a20bd 5856387
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Wed Mar 2 19:36:05 2011 +0100
+
+ Merge branch 'master' of github.com:zeromq/zeromq2-1
+
+commit b7a20bd3716d045565fa1a5b2bfd8c973be7af0e
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Mar 2 16:30:40 2011 +0100
+
+ The copyrights in file headers updated.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ autogen.sh | 8 +++++---
+ builds/msvc/platform.hpp | 3 ++-
+ devices/zmq_forwarder/zmq_forwarder.cpp | 3 ++-
+ devices/zmq_queue/zmq_queue.cpp | 3 ++-
+ devices/zmq_streamer/zmq_streamer.cpp | 3 ++-
+ include/zmq.h | 1 +
+ include/zmq.hpp | 3 ++-
+ include/zmq_utils.h | 3 ++-
+ perf/local_lat.cpp | 3 ++-
+ perf/local_thr.cpp | 3 ++-
+ perf/remote_lat.cpp | 3 ++-
+ perf/remote_thr.cpp | 3 ++-
+ src/array.hpp | 3 ++-
+ src/atomic_counter.hpp | 3 ++-
+ src/atomic_ptr.hpp | 3 ++-
+ src/blob.hpp | 3 ++-
+ src/clock.cpp | 3 ++-
+ src/clock.hpp | 3 ++-
+ src/command.cpp | 3 ++-
+ src/command.hpp | 3 ++-
+ src/config.hpp | 3 ++-
+ src/connect_session.cpp | 3 ++-
+ src/connect_session.hpp | 3 ++-
+ src/ctx.cpp | 3 ++-
+ src/ctx.hpp | 3 ++-
+ src/decoder.cpp | 3 ++-
+ src/decoder.hpp | 3 ++-
+ src/device.cpp | 3 ++-
+ src/device.hpp | 3 ++-
+ src/devpoll.cpp | 3 ++-
+ src/devpoll.hpp | 3 ++-
+ src/dist.cpp | 3 ++-
+ src/dist.hpp | 3 ++-
+ src/encoder.cpp | 3 ++-
+ src/encoder.hpp | 3 ++-
+ src/epoll.cpp | 3 ++-
+ src/epoll.hpp | 3 ++-
+ src/err.cpp | 3 ++-
+ src/err.hpp | 3 ++-
+ src/fd.hpp | 3 ++-
+ src/fq.cpp | 3 ++-
+ src/fq.hpp | 3 ++-
+ src/i_engine.hpp | 3 ++-
+ src/i_inout.hpp | 3 ++-
+ src/i_poll_events.hpp | 3 ++-
+ src/io_object.cpp | 3 ++-
+ src/io_object.hpp | 3 ++-
+ src/io_thread.cpp | 3 ++-
+ src/io_thread.hpp | 3 ++-
+ src/ip.cpp | 3 ++-
+ src/ip.hpp | 3 ++-
+ src/kqueue.cpp | 3 ++-
+ src/kqueue.hpp | 3 ++-
+ src/lb.cpp | 3 ++-
+ src/lb.hpp | 3 ++-
+ src/likely.hpp | 3 ++-
+ src/mailbox.cpp | 3 ++-
+ src/mailbox.hpp | 3 ++-
+ src/msg_content.hpp | 3 ++-
+ src/mutex.hpp | 3 ++-
+ src/named_session.cpp | 3 ++-
+ src/named_session.hpp | 3 ++-
+ src/object.cpp | 3 ++-
+ src/object.hpp | 3 ++-
+ src/options.cpp | 3 ++-
+ src/options.hpp | 3 ++-
+ src/own.cpp | 3 ++-
+ src/own.hpp | 3 ++-
+ src/pair.cpp | 3 ++-
+ src/pair.hpp | 3 ++-
+ src/pgm_receiver.cpp | 3 ++-
+ src/pgm_receiver.hpp | 3 ++-
+ src/pgm_sender.cpp | 3 ++-
+ src/pgm_sender.hpp | 3 ++-
+ src/pgm_socket.cpp | 3 ++-
+ src/pgm_socket.hpp | 3 ++-
+ src/pipe.cpp | 3 ++-
+ src/pipe.hpp | 3 ++-
+ src/poll.cpp | 3 ++-
+ src/poll.hpp | 3 ++-
+ src/poller.hpp | 3 ++-
+ src/poller_base.cpp | 3 ++-
+ src/poller_base.hpp | 3 ++-
+ src/pub.cpp | 3 ++-
+ src/pub.hpp | 3 ++-
+ src/pull.cpp | 3 ++-
+ src/pull.hpp | 3 ++-
+ src/push.cpp | 3 ++-
+ src/push.hpp | 3 ++-
+ src/reaper.cpp | 3 ++-
+ src/reaper.hpp | 3 ++-
+ src/rep.cpp | 3 ++-
+ src/rep.hpp | 3 ++-
+ src/req.cpp | 3 ++-
+ src/req.hpp | 3 ++-
+ src/select.cpp | 3 ++-
+ src/select.hpp | 3 ++-
+ src/semaphore.hpp | 3 ++-
+ src/session.cpp | 3 ++-
+ src/session.hpp | 3 ++-
+ src/socket_base.cpp | 3 ++-
+ src/socket_base.hpp | 3 ++-
+ src/stdint.hpp | 3 ++-
+ src/sub.cpp | 3 ++-
+ src/sub.hpp | 3 ++-
+ src/swap.cpp | 3 ++-
+ src/swap.hpp | 3 ++-
+ src/tcp_connecter.cpp | 3 ++-
+ src/tcp_connecter.hpp | 3 ++-
+ src/tcp_listener.cpp | 3 ++-
+ src/tcp_listener.hpp | 3 ++-
+ src/tcp_socket.cpp | 3 ++-
+ src/tcp_socket.hpp | 3 ++-
+ src/thread.cpp | 3 ++-
+ src/thread.hpp | 3 ++-
+ src/transient_session.cpp | 3 ++-
+ src/transient_session.hpp | 3 ++-
+ src/trie.cpp | 3 ++-
+ src/trie.hpp | 3 ++-
+ src/uuid.cpp | 3 ++-
+ src/uuid.hpp | 3 ++-
+ src/windows.hpp | 3 ++-
+ src/wire.hpp | 3 ++-
+ src/xpub.cpp | 3 ++-
+ src/xpub.hpp | 3 ++-
+ src/xrep.cpp | 3 ++-
+ src/xrep.hpp | 3 ++-
+ src/xreq.cpp | 3 ++-
+ src/xreq.hpp | 4 +++-
+ src/xsub.cpp | 3 ++-
+ src/xsub.hpp | 3 ++-
+ src/ypipe.hpp | 3 ++-
+ src/yqueue.hpp | 3 ++-
+ src/zmq.cpp | 3 ++-
+ src/zmq_connecter.cpp | 3 ++-
+ src/zmq_connecter.hpp | 3 ++-
+ src/zmq_engine.cpp | 3 ++-
+ src/zmq_engine.hpp | 3 ++-
+ src/zmq_init.cpp | 3 ++-
+ src/zmq_init.hpp | 3 ++-
+ src/zmq_listener.cpp | 3 ++-
+ src/zmq_listener.hpp | 3 ++-
+ tests/test_hwm.cpp | 3 ++-
+ tests/test_pair_inproc.cpp | 3 ++-
+ tests/test_pair_ipc.cpp | 3 ++-
+ tests/test_pair_tcp.cpp | 3 ++-
+ tests/test_reqrep_inproc.cpp | 3 ++-
+ tests/test_reqrep_ipc.cpp | 3 ++-
+ tests/test_reqrep_tcp.cpp | 3 ++-
+ tests/test_shutdown_stress.cpp | 3 ++-
+ tests/testutil.hpp | 3 ++-
+ 151 files changed, 305 insertions(+), 152 deletions(-)
+
+commit 58563871a84907cbde5f31f215e94d7bd2ad8908
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Mar 1 16:08:40 2011 +0100
+
+ Explicit identities bug in inproc transport fixed.
+
+ The identity of bound socket was not used. Instead, transient
+ identity was generated.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/socket_base.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0629aaf0ef46cdb6a57ddc7b91b647d9d57519c3
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Feb 26 08:42:20 2011 +0100
+
+ Memory leak in PUB/XPUB sockets fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/xpub.cpp | 14 ++++++--------
+ src/xpub.hpp | 4 ----
+ src/xsub.cpp | 7 ++-----
+ src/xsub.hpp | 4 ----
+ 4 files changed, 8 insertions(+), 21 deletions(-)
+
+commit ded079782173389357e6fa1023833d15d0cf4240
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Feb 25 08:58:01 2011 +0100
+
+ Socket with no owner objects is deallocated immediately
+
+ Till now the deallocation of such socket was delayed
+ till zmq_term() thus creating a "leak".
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/reaper.cpp | 7 ++++---
+ src/socket_base.cpp | 24 ++++++++++++++----------
+ src/socket_base.hpp | 4 ++++
+ 3 files changed, 22 insertions(+), 13 deletions(-)
+
+commit 929d26d9d75148a0dfb0463a53ce71ea781e5b7d
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Thu Feb 24 17:23:51 2011 +0100
+
+ Bumped version to 2.1.2
+
+ include/zmq.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b233204dc3dc6eacc51d45d75926743b72d2616b
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Feb 24 16:57:53 2011 +0100
+
+ Minor patch to zmq_getsockopt(3) man page
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_getsockopt.txt | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f4c1040ddcb579ca53fb34ef0ef83b130424070d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Feb 23 11:48:49 2011 +0100
+
+ Incorrect PGM sender/receiver creation fixed
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/connect_session.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit f7ce56b801fcec2c0bea28ffe4edba26f319edaa
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Wed Feb 23 10:51:07 2011 +0100
+
+ Updated release notes for version 2.1.1
+
+ NEWS | 581 +++++-------------------------------------------------------------
+ 1 files changed, 42 insertions(+), 539 deletions(-)
+
+commit 43e8868875e1d5287979e5b9060a9b16be45cc79
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Feb 22 16:23:36 2011 +0100
+
+ Added explicit error message in case of memory exhaustion
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/connect_session.cpp | 6 +++---
+ src/ctx.cpp | 6 +++---
+ src/decoder.hpp | 2 +-
+ src/encoder.hpp | 2 +-
+ src/epoll.cpp | 2 +-
+ src/err.hpp | 20 +++++++++++++-------
+ src/io_thread.cpp | 2 +-
+ src/ip.cpp | 2 +-
+ src/kqueue.cpp | 2 +-
+ src/object.cpp | 4 ++--
+ src/pgm_receiver.cpp | 1 +
+ src/pgm_sender.cpp | 2 +-
+ src/pgm_socket.cpp | 3 ++-
+ src/pipe.cpp | 8 ++++----
+ src/reaper.cpp | 2 +-
+ src/session.cpp | 2 --
+ src/socket_base.cpp | 6 +++---
+ src/swap.cpp | 13 ++++++++-----
+ src/trie.cpp | 6 +++---
+ src/yqueue.hpp | 4 ++--
+ src/zmq.cpp | 8 ++++----
+ src/zmq_connecter.cpp | 2 +-
+ src/zmq_init.cpp | 6 +++---
+ src/zmq_listener.cpp | 2 +-
+ 24 files changed, 61 insertions(+), 52 deletions(-)
+
+commit 98ccff1a24a056aef15372b131eee1c1bf8f62ca
+Author: Mikko Koppanen <mikko.koppanen@gmail.com>
+Date: Mon Feb 21 23:40:48 2011 +0100
+
+ Fixes build on at least CentOS 5
+
+ Signed-off-by: Mikko Koppanen <mikko.koppanen@gmail.com>
+
+ builds/redhat/zeromq.spec | 19 +++++++++++++------
+ 1 files changed, 13 insertions(+), 6 deletions(-)
+
+commit 0eea93526d210372c23041d50f4b401a94e3a006
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Feb 21 17:49:12 2011 +0100
+
+ Fix for memory leak caused by long identities
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/zmq_init.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 5c0931121ba1854766599b6b7dbd1a7937febd6d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Feb 21 11:22:54 2011 +0100
+
+ Computation of buffer size for PGM fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/pgm_socket.cpp | 41 +++++++++++++++++++++++++++++------------
+ src/pgm_socket.hpp | 3 +++
+ 2 files changed, 32 insertions(+), 12 deletions(-)
+
+commit 12486fecc4f8d9a3bed37cf3d732b1250b075e24
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Feb 18 17:57:59 2011 +0100
+
+ Fix MSVC and SunStudio builds with OpenPGM
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/pgm_socket.hpp | 5 +++++
+ src/zmq.cpp | 6 ++++++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 17e2ca71b4f6db76a4848d366defa36f1b19bdd7
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Feb 18 14:15:10 2011 +0100
+
+ Logging of duplicit identities added
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/ctx.cpp | 12 ++++++++++--
+ src/ctx.hpp | 3 ++-
+ src/object.cpp | 8 ++++++--
+ src/object.hpp | 2 +-
+ src/session.cpp | 1 +
+ 5 files changed, 20 insertions(+), 6 deletions(-)
+
+commit 1f536b2d3820ba5435086a77ad34d86a432b94c7
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Feb 17 14:20:19 2011 +0100
+
+ Init object is child of listener
+
+ This means that all the handshaking while accepting incoming
+ connection is done exclusively in I/O threads, thus it won't
+ overload the application thread's mailbox.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/zmq_listener.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 28f3e87fc6c8c5c7046234bf9a08ae62f26d7f3a
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Feb 17 10:33:38 2011 +0100
+
+ Add delay before reconnecting
+
+ So far ZMQ_RECONNECT_IVL delay was used only when TCP connect
+ failed. Now it is used even if connect succeeds and the peer
+ closes the connection afterwards.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/config.hpp | 3 ---
+ src/connect_session.cpp | 9 +++++----
+ src/connect_session.hpp | 2 +-
+ src/zmq_connecter.cpp | 4 ++--
+ src/zmq_connecter.hpp | 2 +-
+ 5 files changed, 9 insertions(+), 11 deletions(-)
+
+commit fbe5d859f461b0deaa6083fdee077e01e9b47b91
+Author: Michael Compton <michael.compton@littleedge.co.uk>
+Date: Tue Feb 15 09:33:19 2011 +0100
+
+ Added note regarding setting sockopt before bind/connect
+
+ Signed-off-by: Michael Compton <michael.compton@littleedge.co.uk>
+
+ AUTHORS | 1 +
+ doc/zmq_setsockopt.txt | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit ba26cc9938c33fe0837322ea34bcd438f9b7d207
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Feb 13 10:07:10 2011 +0100
+
+ Build problem with OpenPGM and MSVC fixed
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/zmq.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 14a0e147b2b89fc7fed92c7d9c806b6c53380400
+Author: Pieter Hintjens <ph@imatix.com>
+Date: Sat Feb 12 18:36:21 2011 +0100
+
+ Fixed win32 issue with WSAStartup
+
+ - ctx constructor was calling mailbox_t constructor implicitly
+ - moved WSAStartup and WSACleanup to be outside constructor/destructor
+
+ Signed-off-by: Pieter Hintjens <ph@imatix.com>
+
+ src/ctx.cpp | 17 -----------------
+ src/zmq.cpp | 19 +++++++++++++++++++
+ 2 files changed, 19 insertions(+), 17 deletions(-)
+
+commit e94790006ea6f4c64cc1df1c193aa1cf89a75100
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Feb 9 22:33:57 2011 +0100
+
+ reaper added to MSVC build
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 5b82b1ba30d136655c72f116ee2e372ded453952
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Feb 9 22:23:21 2011 +0100
+
+ Reaper thread waits for commands rather them retrieving them periodically
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/command.hpp | 5 ++++
+ src/object.cpp | 20 ++++++++++++++++
+ src/object.hpp | 2 +
+ src/reaper.cpp | 64 +++++++++++++++++---------------------------------
+ src/reaper.hpp | 13 +++-------
+ src/socket_base.cpp | 53 ++++++++++++++++++++++++++++-------------
+ src/socket_base.hpp | 21 +++++++++++++---
+ 7 files changed, 106 insertions(+), 72 deletions(-)
+
+commit 80ac398bba928fa7f245d2e107071677a13185cf
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Feb 9 15:32:15 2011 +0100
+
+ Initial implementation of reaper thread.
+
+ Reaper thread destroys the socket asynchronously.
+ zmq_term() can be interrupted by a signal (EINTR).
+ zmq_socket() will return ETERM after zmq_term() was called.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_socket.txt | 3 +-
+ doc/zmq_term.txt | 2 +
+ src/Makefile.am | 2 +
+ src/command.hpp | 15 +++++-
+ src/ctx.cpp | 158 +++++++++++++++++++++++---------------------------
+ src/ctx.hpp | 43 +++++++-------
+ src/io_thread.cpp | 2 +-
+ src/io_thread.hpp | 3 +
+ src/object.cpp | 42 ++++++++++++--
+ src/object.hpp | 8 +-
+ src/reaper.cpp | 139 ++++++++++++++++++++++++++++++++++++++++++++
+ src/reaper.hpp | 81 ++++++++++++++++++++++++++
+ src/socket_base.cpp | 18 +++---
+ src/socket_base.hpp | 8 ++-
+ 14 files changed, 394 insertions(+), 130 deletions(-)
+
+commit 889424e675eecd9d9c7d1121456401d5c43029a5
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Feb 8 16:19:37 2011 +0100
+
+ max_sockets honoured precisely
+
+ The internal log socket was subtracted from the number of
+ available sockets. So, if max_sockets was set to 100,
+ you could create only 99 sockets. Fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/ctx.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 5dcbc34396bb4d256916fafcbb2ddd646ad179e6
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Feb 8 14:46:27 2011 +0100
+
+ zmq_poll with no fds behaves decently
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/zmq.cpp | 30 ++++++++++++++++++++++++++++++
+ 1 files changed, 30 insertions(+), 0 deletions(-)
+
+commit 908b39bf8309044913a34c632cd432958dcf6960
+Author: Mikko Koppanen <mikko.koppanen@gmail.com>
+Date: Mon Feb 7 15:06:20 2011 +0100
+
+ m4_esyscmd_s doesnt seem to be portable across different systems
+
+ Signed-off-by: Mikko Koppanen <mikko.koppanen@gmail.com>
+
+ configure.in | 2 +-
+ version.sh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c8e5be87d82e73cfc8a6655d2c2b6779f7c223a5
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Feb 5 15:04:15 2011 +0100
+
+ test-hwm added to .gitignore
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ .gitignore | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 4efead1bbb8f3d2b84ad8e1fc88b65bc621f987f
+Author: Chris Rempel <csrl@gmx.com>
+Date: Sat Feb 5 14:42:21 2011 +0100
+
+ Fixed autogen.sh warnings on Debian 6 systems.
+
+ Signed-off-by: Chris Rempel <csrl@gmx.com>
+
+ Please enter the commit message for your changes. Lines starting
+
+ AUTHORS | 1 +
+ configure.in | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 042e34a5d99a9d39b0680d063878f13f5d7e7337
+Author: Thijs Terlouw <thijsterlouw@gmail.com>
+Date: Fri Feb 4 16:44:13 2011 +0100
+
+ operator void* () added to context_t.
+
+ Makes it possible to share the context from C++ to C.
+
+ Signed-off-by: Thijs Terlouw <thijsterlouw@gmail.com>
+
+ include/zmq.hpp | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 3f758ab2f45a07e3e77af4f1b32dc876f5a151ad
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Feb 3 09:59:54 2011 +0100
+
+ Don't use RLIMIT_NOFILES in devpoll_t.
+
+ The patch allows for running 0MQ on Solaris and HP-UX
+ even though ulimit for max number of file descriptors
+ is set to unlimited.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/devpoll.cpp | 20 ++++++++++----------
+ src/devpoll.hpp | 3 ++-
+ 2 files changed, 12 insertions(+), 11 deletions(-)
+
+commit ca1acc340c256a35f0db58805bba7cb337d9a5a3
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Feb 3 08:46:04 2011 +0100
+
+ RLIMIT_NOFILE not used in poll_t anymore
+
+ The problem was that RLIMIT_NOFILE can be set to RLIM_INIFINITY
+ (and that appears to be default on AIX) which caused 0MQ to fail.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/poll.cpp | 20 ++++++++++----------
+ src/poll.hpp | 3 ++-
+ 2 files changed, 12 insertions(+), 11 deletions(-)
+
+commit 1e0302633ea10766d21b2a70d62e6f16440c18d4
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Sun Jan 30 12:43:17 2011 +0100
+
+ Added WithOpenPGM configuration into MSVC builds
+
+ Signed-off-by: Mikko Koppanen <mikko.koppanen@gmail.com>
+
+ builds/msvc/libzmq/libzmq.vcproj | 77 ++++++++++++++++++++++++++++++++++++++
+ builds/msvc/msvc.sln | 17 ++++++++
+ 2 files changed, 94 insertions(+), 0 deletions(-)
+
+commit 72d320366f2a1076ced81f4e871c7affbb9ffb9d
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Sun Jan 30 11:51:30 2011 +0100
+
+ Added test for HWM
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ tests/Makefile.am | 5 +++-
+ tests/test_hwm.cpp | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 71 insertions(+), 1 deletions(-)
+
+commit 1b15eba9a9718adfeea5cecf499b8247596f6c71
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Jan 28 07:50:21 2011 +0100
+
+ Fixed the problem of subscription forwarding and PGM interaction
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/socket_base.cpp | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit f7f1dfc86dd649edbd789a5d157d74721338c912
+Author: Thijs Terlouw <thijsterlouw@gmail.com>
+Date: Wed Jan 26 07:01:06 2011 +0100
+
+ ZMQ_RECONNECT_IVL_MAX socket option added
+
+ It allows for exponential back-off strategy when reconnecting.
+
+ Signed-off-by: Thijs Terlouw <thijsterlouw@gmail.com>
+
+ AUTHORS | 1 +
+ doc/zmq_getsockopt.txt | 23 ++++++++++++++++++-
+ doc/zmq_setsockopt.txt | 24 ++++++++++++++++++--
+ include/zmq.h | 3 +-
+ src/options.cpp | 22 +++++++++++++++++++
+ src/options.hpp | 6 ++++-
+ src/zmq_connecter.cpp | 55 +++++++++++++++++++++++++++++++++--------------
+ src/zmq_connecter.hpp | 12 ++++++++-
+ 8 files changed, 120 insertions(+), 26 deletions(-)
+
+commit 8e61a11b398c95d829f24c388737eb122405c97b
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Thu Jan 20 22:13:01 2011 +0100
+
+ Do not execute ipc tests under MinGW
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ tests/Makefile.am | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 8561a55d2ca3f99ef7d122cf621b2379924152a5
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Thu Jan 20 22:12:25 2011 +0100
+
+ Remove unnecessary visibility pragmas
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ src/zmq.cpp | 9 ---------
+ 1 files changed, 0 insertions(+), 9 deletions(-)
+
+commit c91bf25645b27fb903886093b27fa153c60be2fd
+Author: Dhammika Pathirana <dhammika@gmail.com>
+Date: Thu Jan 20 07:52:40 2011 +0100
+
+ Fix handle connection reset during session init
+
+ Patch to handle nmap version probes.
+
+ Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
+
+ src/decoder.hpp | 4 ++++
+ src/zmq_engine.cpp | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 56bdba592cf336b2bd4241a2b8e331cd38a089e4
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Jan 18 15:57:45 2011 +0100
+
+ Fix cppcheck warnings: Prefer prefix ++/-- operators for non-primitive types.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/ctx.cpp | 6 +++---
+ src/epoll.cpp | 4 ++--
+ src/kqueue.cpp | 2 +-
+ src/own.cpp | 2 +-
+ src/pgm_receiver.cpp | 2 +-
+ src/poller_base.cpp | 2 +-
+ src/select.cpp | 4 ++--
+ src/xrep.cpp | 8 ++++----
+ 8 files changed, 15 insertions(+), 15 deletions(-)
+
+commit b262f2fe9ba02a6d2749e286eaadc65d489600c9
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Jan 17 14:51:01 2011 +0100
+
+ Typo fixed in zmq_send(3) man page.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_send.txt | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 667b247e322e2f0e99b680170a1d004f124b0568
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Mon Jan 17 14:45:24 2011 +0100
+
+ Cancel pending timers when decoder for PGM stalls
+
+ Otherwise the timer event can raise an input event
+ causing assertion on unprocessed data.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ src/pgm_receiver.cpp | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit a249d152003d7a7ebf048c2a9a0307abc1adb704
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Jan 15 20:16:00 2011 +0100
+
+ Fix MSVC build
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 59fa0c9b46a7f8291c68564ad71ef97dd0bae69e
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Jan 14 12:41:12 2011 +0100
+
+ Gerard Toonstra added to the authors file
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ AUTHORS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit a348d94c09ab93a19a57ec22a86782e45f1d06ac
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Jan 14 12:38:07 2011 +0100
+
+ Fair queueing of subscriptions added to XPUB socket
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/xpub.cpp | 19 ++++++++++++++++---
+ src/xpub.hpp | 6 ++++++
+ 2 files changed, 22 insertions(+), 3 deletions(-)
+
+commit 58c9830d90fc39727cec88e48f8985a499aa0ee7
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Jan 14 12:25:54 2011 +0100
+
+ XSUB socket has a subscription distributor
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/xsub.cpp | 7 +++++--
+ src/xsub.hpp | 4 ++++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 8eae7d8507b1c96aec28bca20a157bb7537c3eb8
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Jan 14 12:05:10 2011 +0100
+
+ 'message distribution mechanism' separated from XPUB socket
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/Makefile.am | 2 +
+ src/dist.cpp | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/dist.hpp | 76 ++++++++++++++++++++++++++
+ src/xpub.cpp | 119 ++--------------------------------------
+ src/xpub.hpp | 23 ++-------
+ 5 files changed, 249 insertions(+), 132 deletions(-)
+
+commit 18f29ded6a83875c27395d254c25e3d152ae1cc6
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Jan 13 11:44:23 2011 +0100
+
+ Make cppcheck not complain about "'operator=' should return something"
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/array.hpp | 4 ++--
+ src/atomic_counter.hpp | 2 +-
+ src/atomic_ptr.hpp | 2 +-
+ src/clock.hpp | 2 +-
+ src/connect_session.hpp | 2 +-
+ src/ctx.hpp | 2 +-
+ src/decoder.hpp | 2 +-
+ src/devpoll.hpp | 2 +-
+ src/encoder.hpp | 2 +-
+ src/epoll.hpp | 2 +-
+ src/fq.hpp | 2 +-
+ src/io_object.hpp | 2 +-
+ src/kqueue.hpp | 2 +-
+ src/lb.hpp | 2 +-
+ src/mailbox.hpp | 2 +-
+ src/mutex.hpp | 2 +-
+ src/named_session.hpp | 2 +-
+ src/object.hpp | 2 +-
+ src/own.hpp | 2 +-
+ src/pair.hpp | 2 +-
+ src/pgm_receiver.hpp | 2 +-
+ src/pgm_sender.hpp | 2 +-
+ src/pipe.hpp | 4 ++--
+ src/poll.hpp | 2 +-
+ src/poller_base.hpp | 2 +-
+ src/pub.hpp | 2 +-
+ src/pull.hpp | 2 +-
+ src/push.hpp | 2 +-
+ src/rep.hpp | 2 +-
+ src/req.hpp | 2 +-
+ src/select.hpp | 2 +-
+ src/semaphore.hpp | 6 +++---
+ src/session.hpp | 2 +-
+ src/socket_base.hpp | 2 +-
+ src/sub.hpp | 2 +-
+ src/swap.hpp | 4 ++++
+ src/tcp_connecter.hpp | 2 +-
+ src/tcp_listener.hpp | 2 +-
+ src/tcp_socket.hpp | 2 +-
+ src/thread.hpp | 2 +-
+ src/transient_session.hpp | 2 +-
+ src/trie.hpp | 2 +-
+ src/xpub.hpp | 2 +-
+ src/xrep.hpp | 2 +-
+ src/xreq.hpp | 2 +-
+ src/xsub.hpp | 2 +-
+ src/ypipe.hpp | 2 +-
+ src/yqueue.hpp | 2 +-
+ src/zmq_connecter.hpp | 2 +-
+ src/zmq_engine.hpp | 2 +-
+ src/zmq_init.hpp | 2 +-
+ src/zmq_listener.hpp | 2 +-
+ 52 files changed, 59 insertions(+), 55 deletions(-)
+
+commit 70513871082462c957e46986040ebe7b10d64557
+Author: Neale Ferguson <neale@sinenomine.net>
+Date: Wed Jan 12 09:22:25 2011 +0100
+
+ Support dynamic generation of C preprocessor definitions for PGM rather than hardcoding them.
+
+ Signed-off-by: Neale Ferguson <neale@sinenomine.net>
+
+ AUTHORS | 1 +
+ configure.in | 59 +++++++++++++++++++++++++++++++++++++++++++++++++-----
+ src/Makefile.am | 14 +------------
+ src/clock.cpp | 5 ++++
+ 4 files changed, 60 insertions(+), 19 deletions(-)
+
+commit 725ebce13ca7871002063c4a254bf532d35ee878
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Jan 11 21:12:51 2011 +0100
+
+ Version bumped to 2.1.1
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ include/zmq.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit bd0ba6e89a709cc8afbd5a7c3c4f9f533c428249
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Jan 10 13:53:30 2011 +0100
+
+ Size of inproc hwm and swap is sum of peers' hwms and swaps
+
+ The meat of the patch was contributed by Douglas Creager.
+ Martin Sustrik implemented storing peer options in inproc
+ endpoint repository.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ AUTHORS | 1 +
+ src/ctx.cpp | 18 +++++++++---------
+ src/ctx.hpp | 15 ++++++++++++---
+ src/object.cpp | 6 +++---
+ src/object.hpp | 4 ++--
+ src/socket_base.cpp | 34 +++++++++++++++++++++++++---------
+ 6 files changed, 52 insertions(+), 26 deletions(-)
+
+commit babdf48aacc585d57457da8dec1fb6ce262bf719
+Author: Dhammika Pathirana <dhammika@gmail.com>
+Date: Fri Jan 7 13:28:35 2011 +0100
+
+ Fix pipe writer termination
+
+ Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
+
+ src/pipe.cpp | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 8e0049e2fb60d31c07786fffe39fdc9c63369dfa
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Jan 7 12:59:48 2011 +0100
+
+ Disable sending messages on SUB socket
+
+ The ability was inherited from XSUB socket.
+ Now it's properly disabled.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/sub.cpp | 15 ++++++++++++++-
+ src/sub.hpp | 2 ++
+ 2 files changed, 16 insertions(+), 1 deletions(-)
+
+commit 08cd2ce05da74143b6154f7d665756870077c38d
+Author: Min Ragan-Kelley <benjaminrk@gmail.com>
+Date: Thu Jan 6 08:42:57 2011 +0100
+
+ resolve "function declaration isn't a prototype"
+
+ change two declarations in headers to form f(void); instead of f();
+ which eliminates the warnings when compiling against zeromq
+
+ Signed-off-by: MinRK <benjaminrk@gmail.com>
+
+ AUTHORS | 1 +
+ include/zmq.h | 2 +-
+ include/zmq_utils.h | 2 +-
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 472bdcd6b4995d2ab92e97aafa898f083ce1f3ba
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Jan 5 16:57:51 2011 +0100
+
+ Return ETERM from getsockopt(ZMQ_EVETS) if zmq_term() was called
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/socket_base.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 95eebbfffaf512d81721697026dbb5434c12c27d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Jan 3 20:50:24 2011 +0100
+
+ sunos/gcc3 compilation issue fixed
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/sub.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 51d2d9b9f82526a9b471dda272c1d54b3d1b1152
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Dec 20 13:06:36 2010 +0100
+
+ Yet one more fix for oversized messages.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/decoder.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 112d0cd52ec959a6bb4cf02ab03977bc22478246
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Dec 20 11:47:41 2010 +0100
+
+ Fix the segfault when over-sized message is rejected.
+
+ The in_progress message inside of decoder was left
+ uninitialised in such a case.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/decoder.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit cbbb1e925d699c8b42b2724740d68839c81684c3
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Sat Dec 18 12:13:10 2010 +0100
+
+ Fix passing through CFLAGS/CPPFLAGS/CXXFLAGS when using --enable-debug
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 12 ++++++------
+ configure.in | 5 +++++
+ 2 files changed, 11 insertions(+), 6 deletions(-)
+
+commit d15e881ea02232c3e875699b3c25f43ad2fd093c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Dec 17 16:30:42 2010 +0100
+
+ unplugged engine tries to manipulate the pollset -- fixed
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/zmq_engine.cpp | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit b19ee99bb1a2b19a6bf78c7fa2159a85aa608a10
+Author: Dhammika Pathirana <dhammika@gmail.com>
+Date: Fri Dec 17 15:30:56 2010 +0100
+
+ fix race condition in session init
+
+ Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
+
+ src/zmq_engine.cpp | 22 +++++++++++++++++++---
+ src/zmq_engine.hpp | 3 +++
+ src/zmq_init.cpp | 44 +++++++++++++++++++++++++++-----------------
+ src/zmq_init.hpp | 4 ++++
+ 4 files changed, 53 insertions(+), 20 deletions(-)
+
+commit 27e83cc5258e191a7d5977e202046447df7896b9
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Wed Dec 15 20:10:27 2010 +0100
+
+ Fixes assertion on pipe.cpp:237 when swap fills up.
+
+ Fixes swap::full () functionality
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ src/lb.cpp | 9 ++++++++-
+ src/pair.cpp | 5 ++++-
+ src/pipe.cpp | 8 ++++----
+ src/pipe.hpp | 6 +++---
+ src/swap.cpp | 15 ++++++++++++++-
+ src/swap.hpp | 8 ++++++--
+ 6 files changed, 39 insertions(+), 12 deletions(-)
+
+commit a46980babe076d34347629a54e9635466e6e2a9f
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Wed Dec 15 14:41:18 2010 +0100
+
+ Remove assertions from devices
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ devices/zmq_forwarder/zmq_forwarder.cpp | 6 ++++-
+ devices/zmq_queue/zmq_queue.cpp | 6 ++++-
+ devices/zmq_streamer/zmq_streamer.cpp | 6 ++++-
+ src/device.cpp | 33 ++++++++++--------------------
+ 4 files changed, 26 insertions(+), 25 deletions(-)
+
+commit f749f2d21c1b47e6dcd626633acff764a4484b99
+Author: Dhammika Pathirana <dhammika@gmail.com>
+Date: Mon Dec 13 15:40:26 2010 +0100
+
+ add basic uri validations
+
+ Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
+
+ src/socket_base.cpp | 50 ++++++++++++++++++++++++++++----------------------
+ src/socket_base.hpp | 4 ++++
+ 2 files changed, 32 insertions(+), 22 deletions(-)
+
+commit 22b2b9a2b6e1dd18d58ef51f453d2b4777e71be4
+Author: Dhammika Pathirana <dhammika@gmail.com>
+Date: Mon Dec 13 14:18:47 2010 +0100
+
+ fix overwriting errno on bind failure
+
+ Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
+
+ src/tcp_listener.cpp | 7 +++++--
+ src/tcp_listener.hpp | 3 +++
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+commit a9d969a73e303db2f6ddf436740d0bbef7e63dba
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Dec 9 21:44:15 2010 +0100
+
+ Bob Beaty added to the AUTHORS file
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ AUTHORS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit fcfad5682ed7a7f5108853d2a7039aedfd9a9ac2
+Author: Bob Beaty <rbeaty@peak6.com>
+Date: Thu Dec 9 21:42:58 2010 +0100
+
+ Added Recovery Interval in Milliseconds
+
+ For very high-speed message systems, the memory used for recovery can get to
+ be very large. The corrent limitation on that reduction is the ZMQ_RECOVERY_IVL
+ of 1 sec. I added in an additional option ZMQ_RECOVERY_IVL_MSEC, which is the
+ Recovery Interval in milliseconds. If used, this will override the previous
+ one, and allow you to set a sub-second recovery interval. If not set, the
+ default behavior is to use ZMQ_RECOVERY_IVL.
+
+ Signed-off-by: Bob Beaty <rbeaty@peak6.com>
+
+ doc/zmq_getsockopt.txt | 20 ++++++++++++++++++++
+ doc/zmq_setsockopt.txt | 24 ++++++++++++++++++++++++
+ include/zmq.h | 1 +
+ src/options.cpp | 18 ++++++++++++++++++
+ src/options.hpp | 2 ++
+ src/pgm_socket.cpp | 32 ++++++++++++++++++--------------
+ 6 files changed, 83 insertions(+), 14 deletions(-)
+
+commit 1d81d2f1d4549c2cd0999c9544b059c29706f260
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Tue Dec 7 11:15:51 2010 +0100
+
+ tar doesn't accept -C flag on solaris while extracting
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ configure.in | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+commit a3353150f845cf0f6e8f2355d3aad760bfba4b64
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Tue Dec 7 11:15:18 2010 +0100
+
+ Fix werror flag store/restore
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit aed2eeafdc2fce93738368749b61b36f98ea6cd6
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Tue Dec 7 11:14:46 2010 +0100
+
+ Fix visibility on rhel4
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
+ configure.in | 16 +++++++---------
+ 2 files changed, 53 insertions(+), 11 deletions(-)
+
+commit 9bb5323a1abce0dcf8ed56734313a5249003d868
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Tue Dec 7 11:10:21 2010 +0100
+
+ Clarify zmq_send() operation for ZMQ_PUB sockets
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ doc/zmq_socket.txt | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 73bbcb552d6fbd1b3744a1ee29202a19e4d2f46e
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Dec 6 23:10:50 2010 +0100
+
+ MSVC build fixed
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ builds/msvc/libzmq/libzmq.vcproj | 32 ++++++++------------------------
+ 1 files changed, 8 insertions(+), 24 deletions(-)
+
+commit 8d6cafe06696e17afff03adf4b33bd504b55e277
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Dec 6 22:57:29 2010 +0100
+
+ All devices conflated into a single implementation.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/Makefile.am | 8 +---
+ src/device.cpp | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/device.hpp | 31 +++++++++++++
+ src/forwarder.cpp | 60 ------------------------
+ src/forwarder.hpp | 31 -------------
+ src/queue.cpp | 130 -----------------------------------------------------
+ src/queue.hpp | 31 -------------
+ src/streamer.cpp | 60 ------------------------
+ src/streamer.hpp | 31 -------------
+ src/zmq.cpp | 24 ++++------
+ 10 files changed, 172 insertions(+), 364 deletions(-)
+
+commit ec61751e17fe4ceb62cc16750b12df6056c5962a
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Dec 6 22:36:10 2010 +0100
+
+ options.type correctly set for PUB/SUB/XPUB/XSUB
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/pub.cpp | 1 +
+ src/sub.cpp | 1 +
+ src/xpub.cpp | 2 +-
+ src/xsub.cpp | 2 +-
+ 4 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 8a6ff4ccd2ecbbfb7b2fd80fe621b8a05b0f9bbd
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Dec 6 09:44:23 2010 +0100
+
+ xup and xsub files added to the MSVC build
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ builds/msvc/libzmq/libzmq.vcproj | 16 ++++++++++++++++
+ 1 files changed, 16 insertions(+), 0 deletions(-)
+
+commit 2daa0bb49d52aeb1aa60c94505bdad72348e5d8e
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Dec 5 09:48:52 2010 +0100
+
+ XSUB accepts (un)subscriptions in form of messages.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/sub.cpp | 31 +++++++++++++++++++++++++++++++
+ src/sub.hpp | 4 ++++
+ src/xsub.cpp | 40 +++++++++++++++++++++++++---------------
+ src/xsub.hpp | 3 ++-
+ 4 files changed, 62 insertions(+), 16 deletions(-)
+
+commit c80e7b80cc726ca7c29493c2553c8d19792bb6e5
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Dec 4 23:14:38 2010 +0100
+
+ XPUB and XSUB socket types added.
+
+ These are just placeholders. At the moment XPUB behaves th same
+ as PUB and XSUB as SUB.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ include/zmq.h | 4 +-
+ src/Makefile.am | 4 +
+ src/pub.cpp | 144 +------------------------------------------
+ src/pub.hpp | 34 +----------
+ src/socket_base.cpp | 11 +++-
+ src/sub.cpp | 134 +---------------------------------------
+ src/sub.hpp | 38 +-----------
+ src/xpub.cpp | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/xpub.hpp | 73 ++++++++++++++++++++++
+ src/xsub.cpp | 161 ++++++++++++++++++++++++++++++++++++++++++++++++
+ src/xsub.hpp | 78 +++++++++++++++++++++++
+ 11 files changed, 506 insertions(+), 346 deletions(-)
+
+commit abc8b5e40c55deb96e7674b15629f2affa4eb92a
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Wed Dec 1 11:55:56 2010 +0100
+
+ Update NEWS file for 2.1.0 release
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ NEWS | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 73 insertions(+), 0 deletions(-)
+
+commit 4a3ed39a22655406e17c49fab4912c4681f3d7bf
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Wed Dec 1 11:52:05 2010 +0100
+
+ Bump OpenPGM to 5.0.92.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ configure.in | 2 +-
+ foreign/openpgm/libpgm-5.0.91~dfsg.tar.gz | Bin 444731 -> 0 bytes
+ foreign/openpgm/libpgm-5.0.92~dfsg.tar.gz | Bin 0 -> 444700 bytes
+ 3 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 520d621016691bcb2a0551147aaa38a9891080b3
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Wed Dec 1 11:11:25 2010 +0100
+
+ Bump ABI version to 1:0:0 for ZeroMQ 2.1.0 release
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ configure.in | 13 +++++++++----
+ 1 files changed, 9 insertions(+), 4 deletions(-)
+
+commit b70d628fad5ab97d24473b83fd18997b4e87477d
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Wed Dec 1 10:57:37 2010 +0100
+
+ Documentation updates for 2.1
+
+ - Clarify ZMQ_LINGER, zmq_close (), zmq_term () relationship
+ - New socket options
+ - Clarify thread safety of sockets and migration between threads
+ - Other minor and spelling fixes
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ doc/zmq.txt | 12 ++++-
+ doc/zmq_close.txt | 12 +++--
+ doc/zmq_errno.txt | 2 +-
+ doc/zmq_getsockopt.txt | 116 ++++++++++++++++++++++++++++++++----------------
+ doc/zmq_pgm.txt | 6 +-
+ doc/zmq_poll.txt | 11 +++--
+ doc/zmq_setsockopt.txt | 67 ++++++++++++++++++----------
+ doc/zmq_socket.txt | 24 +++++++---
+ doc/zmq_tcp.txt | 6 +-
+ doc/zmq_term.txt | 27 +++++++----
+ doc/zmq_version.txt | 2 +-
+ 11 files changed, 186 insertions(+), 99 deletions(-)
+
+commit 5bb0a339be31064900257e04e2ffd32e80911d63
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Wed Dec 1 10:33:07 2010 +0100
+
+ Prefix variables with "ac_zmq_"
+
+ - Added a macro for checking clang compiler
+ - Moved basic compiler checks to a macro
+ - Added a macro for checking if compiler supports a flag
+ - Added --enable-debug flag
+ - Added a macro for running normal autoconf check with compiler flags
+ - Added a macro for checking for verbose flag for different compilers (-Wall)
+ - Added a macro for turning on strict standards compliance
+ - Added a macro for turning warnings to errors
+ - Added a macro for checking if compiler supports given pragma
+ - Most of the flags now go through checks if the compilers supports them
+ rather than enumerating different compilers
+ - Added DSO symbol visibility for sun compiler
+ - Enabled verbose mode for sun compiler
+ - Fixed build for ICC 12.x by adding -wd279 to size_t checks
+ - Removed pkg-config checks as those don't seem to be used anywhere
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 461 ++++++++++++++++++++++++++++++++++++++++++++++-----
+ autogen.sh | 6 -
+ configure.in | 212 +++++++++++-------------
+ include/zmq.h | 14 +-
+ include/zmq_utils.h | 14 +-
+ 5 files changed, 532 insertions(+), 175 deletions(-)
+
+commit 17d7e6ede0f907461130302cf4bddcdf9e2737cf
+Merge: 28db150 289b1f5
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Dec 1 10:27:24 2010 +0100
+
+ Merge branch 'maint'
+
+ * maint:
+ Remove unnecessary cast in kevent_delete
+
+ Conflicts:
+ src/kqueue.cpp
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+commit 289b1f5ced492a2dc62edaba0016abde21093692
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Wed Dec 1 10:25:31 2010 +0100
+
+ Remove unnecessary cast in kevent_delete
+
+ Fixes the build on NetBSD where the compiler complains about casting NULL
+ to (int).
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ src/kqueue.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 28db150aaf7b1cffb996f1b27bc082f75acec261
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Mon Nov 29 10:52:22 2010 +0100
+
+ Fix thread thunker scope for MSVC.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ src/thread.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 325dd2f0914de502ae7687f94927fa98c20380c9
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Nov 27 22:19:43 2010 +0100
+
+ Functions passed to pthread_create are declared as extern "C"
+
+ So far these were declared as C++ static functions which
+ was incorrect and caused warnings with SunStudio.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/thread.cpp | 54 ++++++++++++++++++++++-----------------
+ src/thread.hpp | 10 +++---
+ tests/test_shutdown_stress.cpp | 19 ++++++++------
+ 3 files changed, 46 insertions(+), 37 deletions(-)
+
+commit 0bc2a05d84dc8e496a60d0c8def7689783e08e01
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Nov 27 12:51:43 2010 +0100
+
+ .gitignore modified to ignore test executables
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ .gitignore | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit c9584096e033850c77c4c3d4ee99e8073f7b26da
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Thu Nov 25 17:12:31 2010 +0100
+
+ Control symbol exports using -fvisibility
+
+ On systems using GCC 4.0 or newer which support symbol visibility in shared
+ libraries, use -fvisibility=hidden and only export explict API functions
+ defined in zmq.cpp. We do not enable -fvisibility on MinGW since this uses a
+ separate mechanism (__declspec).
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ configure.in | 12 ++++++++++++
+ include/zmq.h | 8 ++++++++
+ include/zmq_utils.h | 6 ++++++
+ src/Makefile.am | 3 +--
+ src/zmq.cpp | 8 ++++++++
+ 5 files changed, 35 insertions(+), 2 deletions(-)
+
+commit 734624be760b3c7942eb26bea77fca918cb1540d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Nov 25 14:05:43 2010 +0100
+
+ Typo fixed in a comment.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/i_engine.hpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 92618fd99ac19f3169552c25cbabffbe9e983f7f
+Author: Sebastian Otaegui <feniix@gmail.com>
+Date: Thu Nov 25 14:04:53 2010 +0100
+
+ Small fix for the rhel6 spec
+
+ Signed-off-by: Sebastian Otaegui <feniix@gmail.com>
+
+ builds/redhat/zeromq.spec | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit a689047de091b2ffbc58cde4a89e98119ae0f599
+Merge: ac40680 83d9af9
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Nov 22 16:07:15 2010 +0100
+
+ Merge branch 'maint'
+
+ * maint:
+ Mikko Koppanen becomes a maintainer of the build system.
+
+commit 83d9af99516fc620ffdfa6cd5a226ab70673cb5d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Nov 22 16:06:20 2010 +0100
+
+ Mikko Koppanen becomes a maintainer of the build system.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ MAINTAINERS | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ac40680ea2f6b32a3c451db1b606524e86a347dd
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Nov 19 12:35:06 2010 +0100
+
+ Problem with blob_t initialisation fixed.
+
+ HP's version of STL doesn't allow for initialisation of basic_string
+ (blob_t) using NULL pointer, while SGI's implementation is OK with
+ that. Fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/object.cpp | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit edf7c18d79b195001d7ed7d05ac30a4d7a64bce1
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Fri Nov 19 09:10:26 2010 +0100
+
+ Add a check that the compiler actually works.
+
+ The patch tests that the C and C++ compilers actually exist
+ and work. autoconf seems to default to 'g++' when C++ compiler is not
+ found, which causes the following error (when the compiler isn't
+ there):
+
+ checking for uuid_generate in -luuid... no
+ configure: error: cannot link with -luuid, install uuid-dev.
+
+ The config.log contains the real error message "g++ command not found"
+ but the error message shown to the user is misleading.
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 18 ++++++++++++++++++
+ configure.in | 6 +++++-
+ 2 files changed, 23 insertions(+), 1 deletions(-)
+
+commit 945c931daf0c053a9cdbfdbb3ec7d0e90c29fc10
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Thu Nov 18 11:51:27 2010 +0100
+
+ Run autoupdate on the configure.in
+
+ I ran autoupdate on the configure.in, which generated most of the
+ patch attached. There is also a small manual fix in which removes the
+ warning "Remember to add LT_INIT to configure.in" which I assume is
+ because AC_PROG_LIBTOOL was called inside a macro.
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 3 ---
+ configure.in | 13 +++++++------
+ 2 files changed, 7 insertions(+), 9 deletions(-)
+
+commit 72a7b93f124cdaee8082aff218f6497c366f53f9
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Wed Nov 17 15:10:43 2010 +0100
+
+ Allow building without documentation.
+
+ Allows building without documentation even if asciidoc and xmlto are
+ installed. This eases up working with the build system because doc
+ generation take quite a while on repeated builds.
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 41 +++++++++++++++++++++++++----------------
+ 1 files changed, 25 insertions(+), 16 deletions(-)
+
+commit c86375831d4002ac58501bacebb3fd12d5c651b8
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Wed Nov 17 15:09:06 2010 +0100
+
+ Remove unneeded substitutions
+
+ Couldn't find a place where these substs were actually used
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ configure.in | 15 ---------------
+ 1 files changed, 0 insertions(+), 15 deletions(-)
+
+commit b83d0a1bc077fdcc481fee40dcf4780669c3f3d2
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Wed Nov 17 15:07:59 2010 +0100
+
+ Remove unnecessary conditional
+
+ This conditional is unnecessary as BUILD_PGM can be negated in the test.
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ configure.in | 1 -
+ src/Makefile.am | 2 +-
+ 2 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 925595259b51dd84711b620afdf02245e537a38f
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Wed Nov 17 15:06:51 2010 +0100
+
+ MinGW32 build fixes
+
+ After long discussions in IRC we came to conclusion that there is no
+ elegant way to handle static builds with MinGW32. This patch sets
+ AC_DISABLE_STATIC by default on MinGW32 and Cygwin
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 27 +++++++++++++++++++++++++++
+ configure.in | 19 ++++++++++++++-----
+ 2 files changed, 41 insertions(+), 5 deletions(-)
+
+commit 3dbd5d58723bdc31eb00a6ebf4f643059a432f8c
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Wed Nov 17 15:05:01 2010 +0100
+
+ Fix mingw32 build
+
+ MinGW32 defines __int64_t as long long, which causes the build to fail
+ unless -Wno-long-long is used. In addition the shutdown_stress test
+ isn't currently compatible with Win.
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ configure.in | 3 ++-
+ tests/Makefile.am | 9 +++++++--
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+commit 34f50a6840fdf638bbd7887aa2438006baeb884d
+Merge: bd0ecf4 152c64f
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Nov 16 14:26:04 2010 +0100
+
+ Merge branch 'maint'
+
+ * maint:
+ FD_SETSIZE defaults to 1024 in MSVC build
+
+ Conflicts:
+ builds/msvc/libzmq/libzmq.vcproj
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+commit bd0ecf478466b27103af92db33ffebc3948f2e4e
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Nov 16 14:15:29 2010 +0100
+
+ FD_SETSIZE defaults to 1024 in MSVC build
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ builds/msvc/libzmq/libzmq.vcproj | 20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+commit 152c64f25df9d037e7f51874d2d66724337aad38
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Nov 16 14:04:55 2010 +0100
+
+ FD_SETSIZE defaults to 1024 in MSVC build
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ builds/msvc/libzmq/libzmq.vcproj | 36 ++++++++++++++++++------------------
+ 1 files changed, 18 insertions(+), 18 deletions(-)
+
+commit da3327cf8780ea4d454e0aa8904b5aab3c446b23
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Mon Nov 15 17:02:36 2010 +0100
+
+ Build refactoring
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 53 ++++++++++++++++++++++++++++++
+ configure.in | 97 +++++++++++++++++++++++++++++-------------------------
+ src/Makefile.am | 3 +-
+ 3 files changed, 106 insertions(+), 47 deletions(-)
+
+commit f77c8ca47ff77af44eab7b4b8538ed49ec428eda
+Merge: a2500ae ffcb0ba
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Nov 13 18:16:13 2010 +0100
+
+ Merge branch 'maint'
+
+ * maint:
+ Couple of patches for AIX build
+
+commit ffcb0baa735538b8b4a0f00799d1185adba2761f
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Nov 13 18:08:18 2010 +0100
+
+ Couple of patches for AIX build
+
+ - RAND_bytes function resides in crypto library
+ - pollfd on AIX used 'reqevents' instead of events and 'retnevents'
+ instead of 'revents'
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ AUTHORS | 1 +
+ configure.in | 1 +
+ src/zmq.cpp | 23 ++++++++++++++---------
+ 3 files changed, 16 insertions(+), 9 deletions(-)
+
+commit a2500ae3485d6243778b832d22dc6dc02a00f025
+Author: Chia-liang Kao <clkao@clkao.org>
+Date: Fri Nov 12 19:16:00 2010 +0100
+
+ Fix a bug that zmq_poll's select backend spins when timeout=-1, due to
+ ptimeout not properly recalculated after first pass.
+
+ Signed-off-by: Chia-liang Kao <clkao@clkao.org>
+
+ AUTHORS | 1 +
+ src/zmq.cpp | 32 ++++++++++++++++----------------
+ 2 files changed, 17 insertions(+), 16 deletions(-)
+
+commit 8abe67357ab905c5c86191c1d9005666f66b6ca0
+Merge: c021702 f7123de
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Nov 12 14:47:26 2010 +0100
+
+ Merge branch 'maint'
+
+ * maint:
+ Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal
+
+ Conflicts:
+ src/socket_base.cpp
+
+commit f7123de9434a96794e6a7cd83b398ceb18c9de8b
+Author: Marc Rossi <mrossi19@gmail.com>
+Date: Fri Nov 12 14:38:25 2010 +0100
+
+ Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal
+
+ Added block boolean var to second process_commands() invocation for blocking sockets
+ instead of always using true. This prevents the process_commands() call from hanging
+ when a message is received with an empty queue after the call to xrecv() but
+ prior to the initial call to process_commands() invoked when ++ticks == inbound_poll_rate.
+
+ Signed-off-by: Marc Rossi <mrossi19@gmail.com>
+
+ AUTHORS | 1 +
+ src/socket_base.cpp | 4 +++-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit c0217027ccd2267b05e017af436a842755d044b0
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Nov 6 08:02:14 2010 +0100
+
+ Coding style cleanup in mailbox.cpp
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/mailbox.cpp | 39 +++++++++++++++++++++------------------
+ 1 files changed, 21 insertions(+), 18 deletions(-)
+
+commit 9da84a5239e5356e34d872c2b5af1d19b9c7eb4f
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Nov 5 17:39:51 2010 +0100
+
+ signaler renamed to mailbox
+
+ For historical reasons queue to transfer commands between
+ threads was called 'signaler'. Given that it was used to
+ pass commands rather than signals it was renamed to 'mailbox',
+ see Erlang mailboxes.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ MAINTAINERS | 2 +-
+ builds/msvc/libzmq/libzmq.vcproj | 4 +-
+ src/Makefile.am | 4 +-
+ src/ctx.cpp | 14 +-
+ src/ctx.hpp | 6 +-
+ src/io_thread.cpp | 12 +-
+ src/io_thread.hpp | 15 +-
+ src/mailbox.cpp | 378 ++++++++++++++++++++++++++++++++++++++
+ src/mailbox.hpp | 61 ++++++
+ src/own.cpp | 2 +-
+ src/signaler.cpp | 366 ------------------------------------
+ src/signaler.hpp | 61 ------
+ src/socket_base.cpp | 12 +-
+ src/socket_base.hpp | 10 +-
+ 14 files changed, 479 insertions(+), 468 deletions(-)
+
+commit 9cfdb441f45057c7106a101835d65164fce9470a
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Nov 5 16:38:52 2010 +0100
+
+ slots renamed to tids
+
+ Threads were so far identified by integers called 'slots'.
+ This patch renames them to more comprehensible 'tid's (thread IDs).
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/ctx.cpp | 12 ++++++------
+ src/ctx.hpp | 6 +++---
+ src/io_thread.cpp | 4 ++--
+ src/io_thread.hpp | 2 +-
+ src/object.cpp | 14 +++++++-------
+ src/object.hpp | 8 ++++----
+ src/own.cpp | 4 ++--
+ src/own.hpp | 2 +-
+ src/pair.cpp | 4 ++--
+ src/pair.hpp | 2 +-
+ src/pub.cpp | 4 ++--
+ src/pub.hpp | 2 +-
+ src/pull.cpp | 4 ++--
+ src/pull.hpp | 2 +-
+ src/push.cpp | 4 ++--
+ src/push.hpp | 2 +-
+ src/rep.cpp | 4 ++--
+ src/rep.hpp | 2 +-
+ src/req.cpp | 4 ++--
+ src/req.hpp | 2 +-
+ src/socket_base.cpp | 24 ++++++++++++------------
+ src/socket_base.hpp | 4 ++--
+ src/sub.cpp | 4 ++--
+ src/sub.hpp | 2 +-
+ src/xrep.cpp | 4 ++--
+ src/xrep.hpp | 2 +-
+ src/xreq.cpp | 4 ++--
+ src/xreq.hpp | 2 +-
+ 28 files changed, 67 insertions(+), 67 deletions(-)
+
+commit 623a9c9f1b53bdda9ad61f58cdc7a286e3e474cd
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Nov 4 21:23:07 2010 +0100
+
+ Jacob Rideout added to the AUTGORS file.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ AUTHORS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0ada4f8e30088e6a91fef7a45fd7e5dd7bdb9d1d
+Author: Jacob Rideout <jacob.rideout@returnpath.net>
+Date: Thu Nov 4 21:21:01 2010 +0100
+
+ Fix documentation typos
+
+ Signed-off-by: Jacob Rideout <jacob.rideout@returnpath.net>
+
+ doc/zmq_getsockopt.txt | 6 +++---
+ doc/zmq_setsockopt.txt | 12 ++++++------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 1b39bcd88336ebed002e13a8ac3d4bc104b13718
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Thu Nov 4 17:54:47 2010 +0100
+
+ Automatically resize signalling socket buffer if full
+
+ If the socketpair used by signaler_t fills up, this can lead to deadlock.
+ This patch provides partial resolution by attempting to resize SO_SNDBUF on
+ the writer side, and if that fails we shall at least assert rather than
+ hang.
+
+ I've also refactored the signaler_t code to make the platform-dependent
+ parts clearer and have tested both the MSG_DONTWAIT and standard POSIX path
+ in recv.
+
+ The Win32 implementation currently does not implement resizing as I'm not
+ convinced that it's safe, but it will also assert like other platforms if
+ signaler_t::send() cannot succeed.
+
+ The OpenVMS implementation has been carried forward but is untested.
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ src/config.hpp | 4 -
+ src/signaler.cpp | 403 ++++++++++++++++++++++++++----------------------------
+ src/signaler.hpp | 18 +--
+ 3 files changed, 201 insertions(+), 224 deletions(-)
+
+commit 756f7df8c8e82a67f033049af47a3f783ad951e1
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Nov 4 16:11:04 2010 +0100
+
+ Previous FD_STSIZE patch reverted.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/select.cpp | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit 2246689c8fcf37cd69bd8098b21dc28a9abbcdeb
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Nov 4 13:12:40 2010 +0100
+
+ FD_SETSIZE for internal polling defaults to 1024
+
+ If, when compiling 0MQ you don't set FD_SETSIZE,
+ it defaults to 1024 rather than to 64.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/select.cpp | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit b90e621329688c83f21f26bbe0367966a245e607
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Nov 4 10:01:58 2010 +0100
+
+ minor typo fixed
+
+ Devpoll polling mechanism used ZMQ_HAVE_SOLRIS instead of
+ ZMQ_HAVE_SOLARIS in one case. Fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/devpoll.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d4a41067d3e873ba4a87c4711ad2f755e7de9157
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Nov 2 14:27:24 2010 +0100
+
+ HP-UX has no OPEN_MAX defined
+
+ devpoll_t used this constant to determine how many events to
+ retrieve from the poller in one go. The implementation was
+ changed not to depend on this constant.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/devpoll.cpp | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+commit de93f6359f061d08846cd203ad3ba4fda915e504
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Nov 2 13:30:20 2010 +0100
+
+ crypto library is needed on HP-UX to generate UUIDs
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ configure.in | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit dbcd38252435ff69f1043649a94ec985e7f1ff5b
+Merge: 0ad71f8 eb83678
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Nov 1 14:13:36 2010 +0100
+
+ Merge branch 'maint'
+
+ * maint:
+ Add INSTALL to Git, thus making it a normal file
+
+commit eb83678b2b5eaca07d6813cab5c7dea493ac4bc8
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Mon Nov 1 14:12:33 2010 +0100
+
+ Add INSTALL to Git, thus making it a normal file
+
+ INSTALL gets added in somewhat magically by automake, or not. Adding it into
+ Git ensures it's always included in the distribution.
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ .gitignore | 1 -
+ INSTALL | 237 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 237 insertions(+), 1 deletions(-)
+
+commit 0ad71f88fe5531011c0354f22eeb070b1f729c7d
+Author: Mikael Helbo Kjaer <mhk@designtech.dk>
+Date: Mon Nov 1 12:54:58 2010 +0100
+
+ select now uses Erase-Remove idiom for retired fds
+
+ Signed-off-by: Mikael Helbo Kjaer <mhk@designtech.dk>
+
+ src/select.cpp | 17 ++++++++---------
+ src/select.hpp | 3 +++
+ 2 files changed, 11 insertions(+), 9 deletions(-)
+
+commit 085b709021c44673d9bf65a5d639e3c2e99703af
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 30 18:17:53 2010 +0200
+
+ Documentation for zmq_close and zmq_term fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_close.txt | 12 ++++++------
+ doc/zmq_term.txt | 21 +++++++++------------
+ 2 files changed, 15 insertions(+), 18 deletions(-)
+
+commit 3d8eb071a2a664d8de1e2e2fa7cb46a4f2764e5e
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 30 16:17:08 2010 +0200
+
+ Coding style fixed for pgm_socket
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/pgm_socket.cpp | 211 ++++++++++++++++++++++++++++++++--------------------
+ src/pgm_socket.hpp | 5 +-
+ 2 files changed, 132 insertions(+), 84 deletions(-)
+
+commit b358df9fffd6a4155318356024358b8a1e2b9c9c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 30 15:08:28 2010 +0200
+
+ Name of "GNU Lesser Public License" corrected.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ builds/msvc/platform.hpp | 6 ++--
+ devices/zmq_forwarder/zmq_forwarder.cpp | 6 ++--
+ devices/zmq_queue/zmq_queue.cpp | 6 ++--
+ devices/zmq_streamer/zmq_streamer.cpp | 6 ++--
+ include/zmq.h | 6 ++--
+ include/zmq.hpp | 6 ++--
+ include/zmq_utils.h | 6 ++--
+ perf/local_lat.cpp | 6 ++--
+ perf/local_thr.cpp | 6 ++--
+ perf/remote_lat.cpp | 6 ++--
+ perf/remote_thr.cpp | 6 ++--
+ src/array.hpp | 6 ++--
+ src/atomic_counter.hpp | 6 ++--
+ src/atomic_ptr.hpp | 6 ++--
+ src/blob.hpp | 6 ++--
+ src/clock.cpp | 6 ++--
+ src/clock.hpp | 6 ++--
+ src/command.cpp | 6 ++--
+ src/command.hpp | 6 ++--
+ src/config.hpp | 6 ++--
+ src/connect_session.cpp | 6 ++--
+ src/connect_session.hpp | 6 ++--
+ src/ctx.cpp | 6 ++--
+ src/ctx.hpp | 6 ++--
+ src/decoder.cpp | 6 ++--
+ src/decoder.hpp | 6 ++--
+ src/devpoll.cpp | 6 ++--
+ src/devpoll.hpp | 6 ++--
+ src/encoder.cpp | 6 ++--
+ src/encoder.hpp | 6 ++--
+ src/epoll.cpp | 6 ++--
+ src/epoll.hpp | 6 ++--
+ src/err.cpp | 6 ++--
+ src/err.hpp | 6 ++--
+ src/fd.hpp | 6 ++--
+ src/forwarder.cpp | 6 ++--
+ src/forwarder.hpp | 6 ++--
+ src/fq.cpp | 6 ++--
+ src/fq.hpp | 6 ++--
+ src/i_engine.hpp | 6 ++--
+ src/i_inout.hpp | 6 ++--
+ src/i_poll_events.hpp | 32 +++++++++++++++---------------
+ src/io_object.cpp | 6 ++--
+ src/io_object.hpp | 6 ++--
+ src/io_thread.cpp | 6 ++--
+ src/io_thread.hpp | 6 ++--
+ src/ip.cpp | 6 ++--
+ src/ip.hpp | 6 ++--
+ src/kqueue.cpp | 6 ++--
+ src/kqueue.hpp | 6 ++--
+ src/lb.cpp | 6 ++--
+ src/lb.hpp | 6 ++--
+ src/likely.hpp | 6 ++--
+ src/msg_content.hpp | 6 ++--
+ src/mutex.hpp | 6 ++--
+ src/named_session.cpp | 6 ++--
+ src/named_session.hpp | 6 ++--
+ src/object.cpp | 6 ++--
+ src/object.hpp | 6 ++--
+ src/options.cpp | 6 ++--
+ src/options.hpp | 6 ++--
+ src/own.cpp | 6 ++--
+ src/own.hpp | 6 ++--
+ src/pair.cpp | 6 ++--
+ src/pair.hpp | 6 ++--
+ src/pgm_receiver.cpp | 6 ++--
+ src/pgm_receiver.hpp | 6 ++--
+ src/pgm_sender.cpp | 6 ++--
+ src/pgm_sender.hpp | 6 ++--
+ src/pgm_socket.cpp | 6 ++--
+ src/pgm_socket.hpp | 6 ++--
+ src/pipe.cpp | 6 ++--
+ src/pipe.hpp | 6 ++--
+ src/poll.cpp | 6 ++--
+ src/poll.hpp | 6 ++--
+ src/poller.hpp | 6 ++--
+ src/poller_base.cpp | 6 ++--
+ src/poller_base.hpp | 6 ++--
+ src/pub.cpp | 6 ++--
+ src/pub.hpp | 6 ++--
+ src/pull.cpp | 6 ++--
+ src/pull.hpp | 6 ++--
+ src/push.cpp | 6 ++--
+ src/push.hpp | 6 ++--
+ src/queue.cpp | 6 ++--
+ src/queue.hpp | 6 ++--
+ src/rep.cpp | 6 ++--
+ src/rep.hpp | 6 ++--
+ src/req.cpp | 6 ++--
+ src/req.hpp | 6 ++--
+ src/select.cpp | 6 ++--
+ src/select.hpp | 6 ++--
+ src/semaphore.hpp | 6 ++--
+ src/session.cpp | 6 ++--
+ src/session.hpp | 6 ++--
+ src/signaler.cpp | 6 ++--
+ src/signaler.hpp | 6 ++--
+ src/socket_base.cpp | 6 ++--
+ src/socket_base.hpp | 6 ++--
+ src/stdint.hpp | 6 ++--
+ src/streamer.cpp | 6 ++--
+ src/streamer.hpp | 6 ++--
+ src/sub.cpp | 6 ++--
+ src/sub.hpp | 6 ++--
+ src/swap.cpp | 6 ++--
+ src/swap.hpp | 6 ++--
+ src/tcp_connecter.cpp | 6 ++--
+ src/tcp_connecter.hpp | 6 ++--
+ src/tcp_listener.cpp | 6 ++--
+ src/tcp_listener.hpp | 6 ++--
+ src/tcp_socket.cpp | 6 ++--
+ src/tcp_socket.hpp | 6 ++--
+ src/thread.cpp | 6 ++--
+ src/thread.hpp | 6 ++--
+ src/transient_session.cpp | 6 ++--
+ src/transient_session.hpp | 6 ++--
+ src/trie.cpp | 6 ++--
+ src/trie.hpp | 6 ++--
+ src/uuid.cpp | 13 ++---------
+ src/uuid.hpp | 6 ++--
+ src/windows.hpp | 6 ++--
+ src/wire.hpp | 6 ++--
+ src/xrep.cpp | 6 ++--
+ src/xrep.hpp | 6 ++--
+ src/xreq.cpp | 6 ++--
+ src/xreq.hpp | 6 ++--
+ src/ypipe.hpp | 6 ++--
+ src/yqueue.hpp | 6 ++--
+ src/zmq.cpp | 6 ++--
+ src/zmq_connecter.cpp | 6 ++--
+ src/zmq_connecter.hpp | 6 ++--
+ src/zmq_engine.cpp | 6 ++--
+ src/zmq_engine.hpp | 6 ++--
+ src/zmq_init.cpp | 6 ++--
+ src/zmq_init.hpp | 6 ++--
+ src/zmq_listener.cpp | 6 ++--
+ src/zmq_listener.hpp | 6 ++--
+ tests/test_pair_inproc.cpp | 6 ++--
+ tests/test_pair_ipc.cpp | 6 ++--
+ tests/test_pair_tcp.cpp | 6 ++--
+ tests/test_reqrep_inproc.cpp | 6 ++--
+ tests/test_reqrep_ipc.cpp | 6 ++--
+ tests/test_reqrep_tcp.cpp | 6 ++--
+ tests/test_shutdown_stress.cpp | 6 ++--
+ tests/testutil.hpp | 6 ++--
+ 145 files changed, 448 insertions(+), 455 deletions(-)
+
+commit 3d01b929fe5e57311ea62fff4a37abbeaab1b3eb
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 29 08:19:07 2010 +0200
+
+ Peter Bourgon added to the AUTHORS file
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ AUTHORS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 9384faf7e5f2fb58d976df8b29f979402346207a
+Author: Peter Bourgon <peter.bourgon@gmail.com>
+Date: Fri Oct 29 08:16:59 2010 +0200
+
+ Add function to zmq::error_t to access errnum
+
+ Signed-off-by: Peter Bourgon <peter.bourgon@gmail.com>
+
+ include/zmq.hpp | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit dace2473f1cfea902dfd3be4a233f4092397d65a
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Oct 28 08:44:53 2010 +0200
+
+ Burak Arslan added to the AUTHORS file
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ AUTHORS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 3eb935ef6e211d2fa5094ae032777ed319253d11
+Author: Burak Arslan <burak-github@arskom.com.tr>
+Date: Thu Oct 28 08:41:28 2010 +0200
+
+ switch to c++-specific headers
+
+ Signed-off-by: Burak Arslan <burak-github@arskom.com.tr>
+
+ include/zmq.hpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9a1d4df0fd29e040756bff6302cf9a134074d9b9
+Author: Dhammika Pathirana <dhammika@gmail.com>
+Date: Wed Oct 27 09:37:32 2010 +0200
+
+ fix typo, destroy new engine
+
+ Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
+
+ src/session.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 465da7b17eef4c86020a5def41a87977410b965a
+Author: Dhammika Pathirana <dhammika@gmail.com>
+Date: Tue Oct 26 16:02:47 2010 +0200
+
+ drop connection requests with duplicate peer identity
+
+ Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
+
+ src/session.cpp | 9 +++++++--
+ src/zmq_init.hpp | 2 +-
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+commit 401986e6bb565f94d975acaba9504eb6ee3c8598
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Oct 26 15:35:56 2010 +0200
+
+ Build with MSVC2005 fixed
+
+ To use __rdtsc() function MSVC2005 requires including intrin.h
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ AUTHORS | 1 +
+ src/clock.cpp | 4 ++++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit e1debf15bbdb0747cffb6013d59fb3f73462a600
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Tue Oct 26 14:24:07 2010 +0200
+
+ Update to OpenPGM 5.0.91.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ configure.in | 2 +-
+ foreign/openpgm/libpgm-5.0.78.tar.gz | Bin 511599 -> 0 bytes
+ foreign/openpgm/libpgm-5.0.91~dfsg.tar.gz | Bin 0 -> 444731 bytes
+ 3 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 11af0fcc54d06052bbbf20c64a3ce31000d02f7d
+Merge: 71bef33 8ef53c0
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 23 22:12:47 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Fixes build on Linux using Sun Studio compiler
+
+commit 8ef53c0dc6d625bdeb95b7f9626cf58cf6babfed
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Fri Oct 15 10:43:22 2010 +0200
+
+ Fixes build on Linux using Sun Studio compiler
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ configure.in | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 71bef330fc9f09ee070c90d174fc0bcb7783b38d
+Author: Dhammika Pathirana <dhammika@gmail.com>
+Date: Sat Oct 23 20:59:54 2010 +0200
+
+ handle decoding malformed messages
+
+ Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
+
+ src/decoder.cpp | 26 ++++++++++++++++++--------
+ src/decoder.hpp | 23 +++++++++++++++++++----
+ src/zmq_engine.cpp | 26 ++++++++++++++++----------
+ 3 files changed, 53 insertions(+), 22 deletions(-)
+
+commit 8d6979922efff7183ce03b49715472e5b2a6a1df
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Sat Oct 23 14:35:02 2010 +0200
+
+ Changes for MSVC OpenPGM build.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ src/pgm_socket.cpp | 1 -
+ src/pgm_socket.hpp | 1 +
+ src/zmq.cpp | 1 +
+ 3 files changed, 2 insertions(+), 1 deletions(-)
+
+commit da59f8dd7a7f275eff98e5705767ac89ac503912
+Merge: e73c96b 21b0c0b
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 23 13:51:12 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ SunStudio fixed.
+
+commit 21b0c0b4f7896facbfcaf10c8eb777e72a505a45
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 23 13:49:13 2010 +0200
+
+ SunStudio fixed.
+
+ With SunStudio's implementation of STL basic_string constructor
+ doesn't accept NULL as a parameter even though size of string
+ is set to zero. Fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/object.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit e73c96ba30c5e9ada83592bc2289a56eeadf6155
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Oct 18 09:11:36 2010 +0200
+
+ Minor comment improvement.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/session.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 0c86f90280d69bd360f7566f9549c904c26d5e42
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Oct 17 10:26:06 2010 +0200
+
+ Minor typo fixed in zmq_getsockopt(3) man page.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_getsockopt.txt | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a780833683ed1f5bc4a112644836973f8282434b
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Oct 17 10:23:58 2010 +0200
+
+ ZMQ_BACKLOG socket option added.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_getsockopt.txt | 13 +++++++++++++
+ doc/zmq_setsockopt.txt | 13 +++++++++++++
+ include/zmq.h | 1 +
+ src/config.hpp | 4 ----
+ src/options.cpp | 19 +++++++++++++++++++
+ src/options.hpp | 3 +++
+ src/tcp_listener.cpp | 12 +++++++-----
+ src/tcp_listener.hpp | 3 ++-
+ src/zmq_listener.cpp | 2 +-
+ 9 files changed, 59 insertions(+), 11 deletions(-)
+
+commit e8e2944f45eab3e22dc46ceac3225a886ca468ad
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Oct 17 09:54:12 2010 +0200
+
+ ZMQ_RECONNECT_IVL socket options added.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_getsockopt.txt | 15 ++++++++++-
+ doc/zmq_setsockopt.txt | 13 ++++++++++
+ include/zmq.h | 1 +
+ src/config.hpp | 3 --
+ src/options.cpp | 59 +++++++++++++++++++++++++++++++++--------------
+ src/options.hpp | 3 ++
+ src/zmq_connecter.cpp | 15 ++++++-----
+ src/zmq_connecter.hpp | 2 +-
+ 8 files changed, 80 insertions(+), 31 deletions(-)
+
+commit 8b8837688a97c4d05aff01a6dea7ac5a35b21fa2
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 16 17:56:25 2010 +0200
+
+ Couple of bugs in zmq_poll fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/zmq.cpp | 16 ++++++++++++++--
+ 1 files changed, 14 insertions(+), 2 deletions(-)
+
+commit 72b15a6dae6c199d847ebde5ac73de238f0ebf75
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 16 16:05:34 2010 +0200
+
+ Implementation of zmq_strerror moved from zmq.cpp to err.cpp
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/err.cpp | 41 +++++++++++++++++++++++++++++++++++++++++
+ src/err.hpp | 9 ++++++---
+ src/zmq.cpp | 38 +-------------------------------------
+ 3 files changed, 48 insertions(+), 40 deletions(-)
+
+commit 61d38fbeed89d69516b9976c60b7711fefed6411
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 16 14:48:06 2010 +0200
+
+ Bug in low precision clock fixed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/clock.cpp | 4 ++--
+ src/clock.hpp | 3 +++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 0a03e86e9547fa7c221b316a5a943467adea3dfd
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 16 10:53:29 2010 +0200
+
+ ZMQ_LINGER socket option added.
+
+ 1. ZMQ_LINGER option can be set/get
+ 2. options are part of own_t base class rather than being declared
+ separately by individual objects
+ 3. Linger option is propagated with "term" command so that the
+ newest value of it is used rather than the stored old one.
+ 4. Session sets the linger timer if needed and terminates
+ as soon as it expires.
+ 5. Corresponding documentation updated.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_getsockopt.txt | 16 ++++++++++++++++
+ doc/zmq_setsockopt.txt | 16 ++++++++++++++++
+ include/zmq.h | 1 +
+ src/command.hpp | 1 +
+ src/object.cpp | 7 ++++---
+ src/object.hpp | 4 ++--
+ src/options.cpp | 18 ++++++++++++++++++
+ src/options.hpp | 3 +++
+ src/own.cpp | 20 ++++++++++++--------
+ src/own.hpp | 8 ++++++--
+ src/pair.cpp | 4 ++--
+ src/pair.hpp | 2 +-
+ src/pub.cpp | 4 ++--
+ src/pub.hpp | 2 +-
+ src/pull.cpp | 4 ++--
+ src/pull.hpp | 2 +-
+ src/push.cpp | 4 ++--
+ src/push.hpp | 2 +-
+ src/session.cpp | 40 ++++++++++++++++++++++++++++++++++++----
+ src/session.hpp | 17 ++++++++++++-----
+ src/socket_base.cpp | 4 ++--
+ src/socket_base.hpp | 6 +-----
+ src/sub.cpp | 4 ++--
+ src/sub.hpp | 2 +-
+ src/xrep.cpp | 4 ++--
+ src/xrep.hpp | 2 +-
+ src/xreq.cpp | 4 ++--
+ src/xreq.hpp | 2 +-
+ src/zmq_connecter.cpp | 5 ++---
+ src/zmq_connecter.hpp | 4 ----
+ src/zmq_init.cpp | 3 +--
+ src/zmq_init.hpp | 4 ----
+ src/zmq_listener.cpp | 7 +++----
+ src/zmq_listener.hpp | 6 +-----
+ 34 files changed, 158 insertions(+), 74 deletions(-)
+
+commit a1474e305762d32df2b79300d124aac7fa0181c8
+Author: Toralf Wittner <toralf.wittner@gmail.com>
+Date: Sat Oct 16 08:27:57 2010 +0200
+
+ Cancel tx_timer_id in pgm_sender_t::out_event().
+
+ Signed-off-by: Toralf Wittner <toralf.wittner@gmail.com>
+
+ AUTHORS | 1 +
+ src/pgm_sender.cpp | 6 +++---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 733c6780c557a0eaacdf17961fb8f3841c65f862
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 16 01:22:18 2010 +0200
+
+ Minor code clean-up to keep clang compiler happy.
+
+ "warning: extra ';' inside a struct or union [-pedantic]"
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/pipe.hpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b95f11aa0a7887f5eb8eb8e2e0f09532bc3604ba
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Sat Oct 16 01:05:15 2010 +0200
+
+ Don't set pedantic to yes if using ICC
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ acinclude.m4 | 17 +++++++++++++++++
+ configure.in | 13 +++++++++----
+ 2 files changed, 26 insertions(+), 4 deletions(-)
+
+commit 48b0a901b8056957e36ba52ae4416d656971bb47
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 16 00:53:50 2010 +0200
+
+ Obsolete compile-time option removed.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/config.hpp | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit ae5a3c8a99a30b54d0b079bbd98be286685056e8
+Merge: 18d46c8 710615c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 16 00:49:01 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Version number increased.
+
+ Conflicts:
+ include/zmq.h
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+commit 710615cdab8c8e500c259bb27df2af70f5ae8275
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 16 00:47:31 2010 +0200
+
+ Version number increased.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ include/zmq.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 18d46c81047fc2f8449a5b4ff3e41cc25bd1cfc2
+Merge: 027eed4 53d1677
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 15 19:38:52 2010 +0200
+
+ Merge branch 'maint'
+
commit 53d1677c8b0f85e309c6a067b47c80dedcffb5aa
Author: Martin Sustrik <sustrik@250bpm.com>
Date: Fri Oct 15 19:37:41 2010 +0200
@@ -11,6 +3082,16 @@ Date: Fri Oct 15 19:37:41 2010 +0200
NEWS | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
+commit 027eed41b8bf16cb8b2f9f83be1fe286b39e4fd8
+Merge: 2e9871c 6e95205
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 15 17:46:21 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Fix memory leak under Windows
+
commit 6e9520533395b19ed6f6a17de6f196aa5e93da9f
Author: Taras Shpot <taras.shpot@eleks.com>
Date: Fri Oct 15 17:45:02 2010 +0200
@@ -30,6 +3111,18 @@ Date: Fri Oct 15 17:45:02 2010 +0200
src/uuid.hpp | 2 +-
3 files changed, 4 insertions(+), 1 deletions(-)
+commit 2e9871ce34b5abc60ebc37c1887b76895537d62a
+Merge: eeb8e7c 5b44025
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Fri Oct 15 17:30:03 2010 +0200
+
+ Merge branch 'maint'
+
+ Conflicts:
+ configure.in
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
commit 5b44025602b6af952fc434a6e7bf8dff65a00be6
Author: Martin Lucina <mato@kotelna.sk>
Date: Fri Oct 15 17:27:10 2010 +0200
@@ -46,6 +3139,22 @@ Date: Fri Oct 15 17:27:10 2010 +0200
foreign/openpgm/libpgm-2.1.26.tar.gz | Bin 413863 -> 0 bytes
3 files changed, 1 insertions(+), 1 deletions(-)
+commit eeb8e7c8beef83fe8c23bde888a1081fc9e8e3ec
+Merge: 7b9e397 3cf01bf
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 15 17:13:36 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Makefile.am: Add missing files to distribution, improve maintainer-clean
+ configure.in: Extract API version from zmq.h
+ Added bin directory to ignore list.
+
+ Conflicts:
+ configure.in
+ include/zmq.h
+
commit 3cf01bf56e66657da795e43f09fa2499b2381dc9
Author: Martin Lucina <mato@kotelna.sk>
Date: Fri Oct 15 15:30:10 2010 +0200
@@ -81,6 +3190,93 @@ Date: Fri Oct 15 15:05:54 2010 +0200
version.sh | 21 +++++++++++++++++++++
4 files changed, 38 insertions(+), 13 deletions(-)
+commit 7b9e39724eeecf33dde3b0e4fd9f205480afb977
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 15 11:31:20 2010 +0200
+
+ Minor fix in devpoll.hpp
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/devpoll.hpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 17b0785744287d0897175ed13000fba710c2dc5b
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 15 11:29:20 2010 +0200
+
+ Destructor of poller_base_t made virtual.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/poller_base.hpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3e74a439c4b7901f3d3607a2d4142266bc1781b4
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Fri Oct 15 11:21:56 2010 +0200
+
+ Cast execute_timers() result to int
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ src/devpoll.cpp | 2 +-
+ src/epoll.cpp | 2 +-
+ src/kqueue.cpp | 2 +-
+ src/poll.cpp | 2 +-
+ src/select.cpp | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+commit b64b50ae218dbbc362eaeb0571a337650f623e3c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 15 10:58:19 2010 +0200
+
+ Timers correctly canceled by PGM engines on shutdown.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/pgm_receiver.cpp | 10 +++++++---
+ src/pgm_sender.cpp | 17 ++++++++++++++---
+ src/pgm_sender.hpp | 3 ++-
+ 3 files changed, 23 insertions(+), 7 deletions(-)
+
+commit e288f7a347eb5a2fd38043d930fc67c8e8bcce9b
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Fri Oct 15 10:43:22 2010 +0200
+
+ Fixes build on Linux using Sun Studio compiler
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ configure.in | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit e33e4d7650e36af7d09569de21f7f71b5670945c
+Author: Mikko Koppanen <mkoppanen@php.net>
+Date: Fri Oct 15 10:38:09 2010 +0200
+
+ ICC related qualifier fix
+
+ Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
+
+ AUTHORS | 1 +
+ src/pipe.hpp | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 03a18c27ace49cbcbb0c495e4c575c34b8f862a4
+Author: Martin Pales <m.pales@gmail.com>
+Date: Thu Oct 14 16:31:58 2010 +0200
+
+ zmq::clock_t : return correct value in rdtsc() on solaris
+
+ Function clock_t::rdtsc() now returns correct value when compiled
+ with sunstudio 12 compiler.
+
+ Signed-off-by: Martin Pales <m.pales@gmail.com>
+
+ src/clock.cpp | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
commit 26d7669464054a4aed3f0ee9643bffa0e01aab5c
Author: Gonzalo Diethelm <gonzalo.diethelm@diethelm.org>
Date: Thu Oct 14 08:02:43 2010 -0300
@@ -90,6 +3286,118 @@ Date: Thu Oct 14 08:02:43 2010 -0300
.gitignore | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
+commit b7386f5b5031b2e75fb4370069935d7f6a0eedbb
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Oct 14 12:13:52 2010 +0200
+
+ To insert to associateive STL containers value_type used instead of make_pair
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/ctx.cpp | 4 ++--
+ src/pgm_receiver.cpp | 2 +-
+ src/socket_base.cpp | 2 +-
+ src/xrep.cpp | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+commit f9e6d94be56fab6d1d8e281e48bb5d6091562acb
+Author: Martin Pales <m.pales@gmail.com>
+Date: Thu Oct 14 12:02:05 2010 +0200
+
+ zmq::poller_base_t : workaround for sunstudio compiler in add_timer()
+
+ A minor workaround to resolve compilation error with sunstudio compiler,
+ which does not yet support member templates for std::multimap.
+
+ Signed-off-by: Martin Pales <m.pales@gmail.com>
+
+ src/poller_base.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit cafcdbbe2bc9c78899568bb6cb957b700e12c66b
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Oct 14 09:34:09 2010 +0200
+
+ Safety measure in zmq_msg_close implemented
+
+ zmq_msg_close now empties the message on zmq_msg_close, thus not
+ leaving random data in the structure, that may be mistaken for
+ a valid message.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/zmq.cpp | 32 +++++++++++++++++++-------------
+ 1 files changed, 19 insertions(+), 13 deletions(-)
+
+commit b174ad2c45c746e56b41671a3d68ef496bba6b97
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Oct 14 09:16:49 2010 +0200
+
+ zmq_poll man page fixed to reflect the precise timeout semantics.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ doc/zmq_poll.txt | 8 +-------
+ 1 files changed, 1 insertions(+), 7 deletions(-)
+
+commit da73b7c6f60f2ea1adc6fbd99e22576b9ce2f316
+Author: Martin Pales <m.pales@gmail.com>
+Date: Thu Oct 14 08:38:11 2010 +0200
+
+ zmq::devpoll_t : correct a typo in loop()
+
+ A minor typo correction to resolve compilation error on Solaris.
+
+ Signed-off-by: Martin Pales <m.pales@gmail.com>
+
+ AUTHORS | 1 +
+ src/devpoll.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+commit e2167cecaefec6557c7a5712fb75e51487ff69a6
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Oct 13 21:39:20 2010 +0200
+
+ Precise timouts in zmq_poll implemented
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/zmq.cpp | 127 +++++++++++++++++++++++++++++++++++++++++-----------------
+ 1 files changed, 90 insertions(+), 37 deletions(-)
+
+commit 9d96e0037a9d027fd286f771fa2a8db5def485c8
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Oct 13 10:09:46 2010 +0200
+
+ Clean-up of the code related to attaching/detaching engines to sessions.
+
+ Session base class now handles the engine events exclusively. It notifies
+ derived session types using dedicated "attached" and "detached" events.
+
+ Couple of bugs was fixed along the way.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/connect_session.cpp | 9 ++++-----
+ src/connect_session.hpp | 3 ++-
+ src/named_session.cpp | 15 +++++----------
+ src/named_session.hpp | 5 +----
+ src/session.cpp | 18 ++++++++----------
+ src/session.hpp | 12 ++++++------
+ src/transient_session.cpp | 4 ++++
+ src/transient_session.hpp | 3 ++-
+ 8 files changed, 32 insertions(+), 37 deletions(-)
+
+commit 5ae878b891fa5189f5202f1577d22bdb9ba51f77
+Merge: 954d7f7 2568947
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Oct 13 08:01:13 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Add support for RHEL6 in the spec file
+
commit 2568947a71adc0e8ddad54b6054a3b3e532e1613
Author: Sebastian Otaegui <feniix@gmail.com>
Date: Wed Oct 13 07:59:50 2010 +0200
@@ -102,6 +3410,58 @@ Date: Wed Oct 13 07:59:50 2010 +0200
builds/redhat/zeromq.spec | 7 +++++++
2 files changed, 8 insertions(+), 0 deletions(-)
+commit 954d7f743dbc0c159794915c6deadc374dbf64d2
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Oct 12 17:55:09 2010 +0200
+
+ Avoid duplicate creation of pipes for a single session
+
+ When a session is being closed down its inbound and outbound
+ pipe pointers are set to null. If (re) connection happens at
+ that time, session may try to reinistantiate the pipes which
+ is wrong. This patch allows session to attach pipes only once
+ in its lifetime.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/session.cpp | 40 ++++++++++++++++++++++++----------------
+ src/session.hpp | 3 +++
+ 2 files changed, 27 insertions(+), 16 deletions(-)
+
+commit c6d74e0a0345cae2c09c6fb29911159331c93e64
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Tue Oct 12 12:26:21 2010 +0200
+
+ Drop PGM parameters to 100mb friendly range.
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ src/pgm_socket.cpp | 30 +++++++++++++-----------------
+ 1 files changed, 13 insertions(+), 17 deletions(-)
+
+commit 5b8af52efc0ddf1df5506a2800aa69bc50a44ddb
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Mon Oct 11 17:59:58 2010 +0200
+
+ Fix assertion in PGM transports on cancel_timer
+
+ Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
+
+ src/pgm_receiver.cpp | 2 ++
+ src/pgm_sender.cpp | 12 ++++++++----
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+commit e168173162dd26238a799c19142bab8b7885ebb3
+Merge: f22e85f 57428db
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Oct 11 16:42:10 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ configure.in: Do not patch libtool rpath handling
+ Fixing the Red Hat packaging
+
commit 57428db89885631128cb9a48b334b050eb83a512
Author: Martin Lucina <mato@kotelna.sk>
Date: Mon Oct 11 16:39:48 2010 +0200
@@ -135,6 +3495,62 @@ Date: Mon Oct 11 16:32:27 2010 +0200
configure.in | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
+commit f22e85f19f2bf58285e4984e875487f17c85e791
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Oct 11 12:23:18 2010 +0200
+
+ Reverting commit 1d431190f50c86f62460
+
+ The patch was supposed to check that pipe writer sends messages
+ in atomic fashion. However, it prevented the user to read
+ half of a message and close the socket.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/xrep.cpp | 7 -------
+ 1 files changed, 0 insertions(+), 7 deletions(-)
+
+commit 73e7ef37c2e72dd542d20ddc5be30cedce68e329
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Oct 10 09:23:37 2010 +0200
+
+ When XREP silently drops message, it does not empty it -- fixed
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/xrep.cpp | 33 +++++++++++++++++----------------
+ 1 files changed, 17 insertions(+), 16 deletions(-)
+
+commit f5030a93a52fc73292c16dae5f8e0e1b39732df0
+Author: Christian Gudrian <christian.gudrian@fluidon.com>
+Date: Sat Oct 9 19:19:50 2010 +0200
+
+ Execute the timers before pollset initialisation.
+
+ Since executing the timers might modify the source pollsets we have
+ to defer the initialisation until after the timers have executed.
+
+ Signed-off-by: Christian Gudrian <christian.gudrian@fluidon.com>
+
+ AUTHORS | 1 +
+ src/select.cpp | 6 +++---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+commit 318cdd1f24cd663702222cc182ae2ccac5e76870
+Merge: 214b560 ef8db78
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Oct 9 08:03:58 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Version macros added
+
+ Conflicts:
+ builds/msvc/platform.hpp
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
commit ef8db789a1c97152e84ff03c9a7f6e1e77d95981
Author: Martin Sustrik <sustrik@250bpm.com>
Date: Sat Oct 9 07:53:24 2010 +0200
@@ -155,6 +3571,166 @@ Date: Sat Oct 9 07:53:24 2010 +0200
src/zmq.cpp | 6 +++---
4 files changed, 14 insertions(+), 21 deletions(-)
+commit 214b56077a7e5d12813c8034013171d33283566c
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Fri Oct 8 22:06:41 2010 +0200
+
+ Fix missing platform.hpp in zmq_connecter.cpp
+
+ Missed testing on Win32
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ src/zmq_connecter.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit daf5d3273b1930af7e4c54ee597b89ecb3763000
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 8 21:42:55 2010 +0200
+
+ More cleanup of session termination process.
+
+ Fix in termination of session attached to a REP socket.
+ Several fixes of session termination in case of disconnection.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/connect_session.cpp | 2 ++
+ src/named_session.cpp | 1 +
+ src/session.cpp | 10 ++++++++--
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+commit f90c8d957ea2a11c73a307aae2494a26d22c2f3b
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Fri Oct 8 17:49:40 2010 +0200
+
+ Scalability improvements for large amounts of connections
+
+ Add signaler_sndbuf_size option to config.hpp which allows the user to
+ increase the size of the send buffer used by the signalling socketpair.
+
+ Implement random backoff for reconnection attempts using a primitive
+ pseudo-random generation to prevent reconnection storms.
+
+ Add wait_before_connect option to config.hpp to allow the user to enable
+ random delay even on initial connect. Default is false for low latency.
+
+ Signed-off-by: Martin Lucina <mato@kotelna.sk>
+
+ src/config.hpp | 9 ++++++++-
+ src/signaler.cpp | 39 ++++++++++++++++++++++++++++++++-------
+ src/zmq_connecter.cpp | 25 +++++++++++++++++++++----
+ src/zmq_connecter.hpp | 3 +++
+ 4 files changed, 64 insertions(+), 12 deletions(-)
+
+commit 7a685b0f88386b11c4c1fcbb45324aa28f4e2eac
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 8 17:23:21 2010 +0200
+
+ Clean-up of session termination process
+
+ Specifically, shutdown of child objects is initiated *before* termination
+ handshake with socket object.
+
+ Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
+
+ src/fq.cpp | 4 ++
+ src/fq.hpp | 1 +
+ src/pair.cpp | 12 ++++--
+ src/pair.hpp | 1 +
+ src/pipe.cpp | 7 +++
+ src/pipe.hpp | 1 +
+ src/session.cpp | 111 ++++++++++++++++++++++++++++---------------------------
+ src/session.hpp | 25 +++++++-----
+ src/xrep.cpp | 4 ++
+ src/xrep.hpp | 1 +
+ 10 files changed, 99 insertions(+), 68 deletions(-)
+
+commit 965fb7755b50ca1522f076da46fa3651812126e1
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Mon Oct 4 16:22:30 2010 +0200
+
+ configure.in: OpenPGM no longer requires pkg-config
+
+ configure.in | 14 +++-----------
+ 1 files changed, 3 insertions(+), 11 deletions(-)
+
+commit d62d721f1a6f7c9df627b3f3fa8e200ddc9bf5f5
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Mon Oct 4 16:14:57 2010 +0200
+
+ configure.in: Add amd64 to OpenPGM supported platforms
+
+ configure.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1d431190f50c86f624605ab11c1580b2d2f7ee06
+Author: Nir Soffer <nirsof@gmail.com>
+Date: Sat Oct 2 10:01:18 2010 +0200
+
+ make sure that reader does not terminate in the middle of a multipart message
+
+ AUTHORS | 1 +
+ src/xrep.cpp | 7 +++++++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 2142b8918a0cea79c79c8ed8ce5652148abe4a39
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 1 18:46:32 2010 +0200
+
+ issue 92 -- Assertion failed: inpipe && outpipe (pair.cpp:86) -- fixed
+
+ src/pair.cpp | 14 +++++++++-----
+ 1 files changed, 9 insertions(+), 5 deletions(-)
+
+commit 1a6cd59e8b423cdf3a4f4f854b37c5e0693baef6
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 1 16:03:08 2010 +0200
+
+ stress test for shutdown process added
+
+ tests/Makefile.am | 7 ++-
+ tests/test_shutdown_stress.cpp | 83 ++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 88 insertions(+), 2 deletions(-)
+
+commit 2a85cce189ae915e85bb567b1401d063284e622f
+Merge: 0bb76b6 8f9080e
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 1 13:37:59 2010 +0200
+
+ Merge branch 'master' of github.com:zeromq/zeromq2
+
+commit 0bb76b667b277b143a9a2901e8bf407f34da469d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Oct 1 13:37:46 2010 +0200
+
+ assert when xrep socket gets reconnected in the middle of the shutdown -- fixed
+
+ src/xrep.cpp | 35 ++++++++++++++++++++++-------------
+ 1 files changed, 22 insertions(+), 13 deletions(-)
+
+commit 8f9080ebb9ea5576c87a1412748aef1faf0653f6
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Thu Sep 30 15:30:24 2010 +0200
+
+ zmq_poll(): Fix busy-loop if timeout is zero
+
+ Fix a case where zmq_poll() (poll-based version) could go off into a busy-loop
+ if no revents are returned and the timeout passed in is zero.
+
+ src/zmq.cpp | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+commit ac9b05c36b9d1f5bb3f8465b4c56478c399a01f3
+Merge: 98fa2fa 79aea5f
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Sep 30 15:12:06 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed
+
commit 79aea5ffa61f969ec66205f7c9c8c1611a2fd8da
Author: Max Wolf <YIDIEPXGXGPN@spammotel.com>
Date: Thu Sep 30 15:10:47 2010 +0200
@@ -165,6 +3741,134 @@ Date: Thu Sep 30 15:10:47 2010 +0200
src/xrep.cpp | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
+commit 98fa2fa802773252a2c569ffea99bce1c5f9cd4c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Sep 30 14:03:54 2010 +0200
+
+ fix in XREP's fair queueing mechanism
+
+ src/xrep.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 7881ba1bcd2c940037e54a74d6aeb8376329cde4
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Sep 30 11:35:14 2010 +0200
+
+ minor whitespace fix
+
+ src/pgm_socket.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit eaa925eca7a3e0c64d184a4a96fec139166a7470
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Thu Sep 30 11:33:35 2010 +0200
+
+ FreeBSD doesn't define MSG_ERRQUEUE -- now it's defined in 0MQ
+
+ src/pgm_socket.cpp | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit ec2e85919e4a34a313e6d0df84cc421bc9682ad8
+Author: Ilja Golshtein <ilejncs@narod.ru>
+Date: Wed Sep 29 10:09:03 2010 +0200
+
+ C++ binding destructors don't throw exceptions
+
+ AUTHORS | 1 +
+ include/zmq.hpp | 6 ++----
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+commit d14be62499478f31cf641399982ecdf4f6f158c4
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Tue Sep 28 22:46:56 2010 +0200
+
+ more fixes to (e)pgm transport
+
+ src/pgm_receiver.cpp | 21 ++++++++++++-
+ src/pgm_receiver.hpp | 7 ++++
+ src/pgm_sender.cpp | 37 +++++++++++++++++++++-
+ src/pgm_sender.hpp | 7 ++++
+ src/pgm_socket.cpp | 81 +++++++++++++++++++++++++++++++++++++-------------
+ src/pgm_socket.hpp | 5 +++
+ 6 files changed, 134 insertions(+), 24 deletions(-)
+
+commit 96d85b20982926e60d5065cba3203971c9eeed63
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Tue Sep 28 16:58:51 2010 +0200
+
+ * Add assertions to check for OpenPGM calls with invalid parameters.
+ * Assertion to check that pgm_getaddrinfo is actually returning something.
+ * Missing pgm_connect call.
+ * Typo on TOS causing immediate abort.
+ * Placeholder calls for timeouts whilst continuing spin loop functionality.
+ * OpenPGM v5 now supports reference counting so remove init checks.
+ * Duplicate UDP unicast port setting, requires one unicast and one multicast.
+ * Incorrectly set socket rcvbuf size with sndbuf.
+ * Replace std::lexicographical_compare of TSI's with long word integer comparisons.
+ * pgm_socket_t::receive returns -1 on no data.
+
+ src/pgm_receiver.cpp | 2 +-
+ src/pgm_receiver.hpp | 12 ++---
+ src/pgm_socket.cpp | 109 ++++++++++++++++++++++++++++++++-----------------
+ src/zmq.cpp | 24 +++++------
+ 4 files changed, 87 insertions(+), 60 deletions(-)
+
+commit 00cd7d49c7f2b532b2349581b82577bc714f9bf8
+Author: Steven McCoy <steven.mccoy@miru.hk>
+Date: Tue Sep 28 16:35:29 2010 +0200
+
+ Upgrade to OpenPGM-5.0.78
+
+ configure.in | 16 +-
+ foreign/openpgm/libpgm-2.1.26.tar.gz | Bin 413863 -> 0 bytes
+ foreign/openpgm/libpgm-5.0.78.tar.gz | Bin 0 -> 511599 bytes
+ src/Makefile.am | 96 +++---
+ src/pgm_socket.cpp | 564 ++++++++++++++++++----------------
+ src/pgm_socket.hpp | 2 +-
+ src/zmq.cpp | 26 +-
+ 7 files changed, 364 insertions(+), 340 deletions(-)
+
+commit 10bb9d0405169487cd53c6f109091e036577860e
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Sep 28 15:32:12 2010 +0200
+
+ Dhammika Pathirana was missing from the AUTOHRS file for some reason -- fixed
+
+ AUTHORS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 87beaaa00d49d216f856b8322f1ad04e4f9ecea3
+Author: Gonzalo Diethelm <gdiethelm@dcv.cl>
+Date: Tue Sep 28 15:27:45 2010 +0200
+
+ ZMQ_TYPE socket option added
+
+ .gitignore | 1 +
+ doc/zmq_getsockopt.txt | 13 +++++++++++++
+ include/zmq.h | 1 +
+ src/options.cpp | 10 ++++++++++
+ src/options.hpp | 3 +++
+ src/pair.cpp | 1 +
+ src/pub.cpp | 1 +
+ src/pull.cpp | 1 +
+ src/push.cpp | 1 +
+ src/rep.cpp | 1 +
+ src/req.cpp | 1 +
+ src/sub.cpp | 1 +
+ src/xrep.cpp | 1 +
+ src/xreq.cpp | 1 +
+ 14 files changed, 37 insertions(+), 0 deletions(-)
+
+commit 6715f9b1858587db6aec826bdc9a7905bba8030e
+Merge: 16c3884 c1deb22
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Sep 28 07:51:59 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ crash when closing an ypipe -- fixed
+
commit c1deb226f4d1bc94c158c050088813aae96775e9
Author: Dhammika Pathirana <dhammika@gmail.com>
Date: Tue Sep 28 07:46:17 2010 +0200
@@ -183,6 +3887,146 @@ Date: Tue Sep 28 07:39:16 2010 +0200
src/req.cpp | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
+commit 16c3884a61b146040277ec61bfdbc553c883b4d6
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Sep 27 11:18:21 2010 +0200
+
+ MSVC build fixed
+
+ builds/msvc/libzmq/libzmq.vcproj | 42 +++++++++++++++++++++++++++++++++----
+ src/clock.cpp | 2 +-
+ src/ctx.cpp | 6 +++++
+ src/select.cpp | 3 +-
+ 4 files changed, 46 insertions(+), 7 deletions(-)
+
+commit e2f834d2947ad7e7f4e6bfb5be653af8b8a2a576
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Sep 27 09:53:30 2010 +0200
+
+ ZMQ_FD and ZMQ_EVENTS documentation added
+
+ doc/zmq_getsockopt.txt | 30 ++++++++++++++++++++++++++++++
+ 1 files changed, 30 insertions(+), 0 deletions(-)
+
+commit 30c1cba4e4276f4ddcb5a455fdd62d4d6bd1edd2
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Sep 27 09:34:00 2010 +0200
+
+ latency optimisation for the case where there are no timers
+
+ src/poller_base.cpp | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 238640a526c419392bf2df95de196db89ea6eb73
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 26 21:42:23 2010 +0200
+
+ timers properly implemented
+
+ src/config.hpp | 4 ---
+ src/devpoll.cpp | 35 ++++----------------------------
+ src/devpoll.hpp | 6 -----
+ src/epoll.cpp | 43 ++++++---------------------------------
+ src/epoll.hpp | 6 -----
+ src/kqueue.cpp | 40 +++++--------------------------------
+ src/kqueue.hpp | 6 -----
+ src/poll.cpp | 33 ++++++------------------------
+ src/poll.hpp | 6 -----
+ src/poller_base.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ src/poller_base.hpp | 27 +++++++++++++++++++++++++
+ src/select.cpp | 37 ++++++----------------------------
+ src/select.hpp | 6 -----
+ src/zmq_connecter.cpp | 3 +-
+ src/zmq_connecter.hpp | 2 +-
+ 15 files changed, 113 insertions(+), 193 deletions(-)
+
+commit 8d7bf6684cbb9625ec7c963b8867e2411b49eb57
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 26 19:22:33 2010 +0200
+
+ common base for all pollers created; the only thing it handles at the moment is 'load'
+
+ src/Makefile.am | 2 +
+ src/devpoll.cpp | 13 +----------
+ src/devpoll.hpp | 9 +------
+ src/epoll.cpp | 12 +---------
+ src/epoll.hpp | 9 +------
+ src/kqueue.cpp | 15 ++++---------
+ src/kqueue.hpp | 9 +------
+ src/poll.cpp | 12 +---------
+ src/poll.hpp | 9 +------
+ src/poller_base.cpp | 44 ++++++++++++++++++++++++++++++++++++++++
+ src/poller_base.hpp | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/select.cpp | 12 +---------
+ src/select.hpp | 9 +------
+ 13 files changed, 125 insertions(+), 86 deletions(-)
+
+commit cf815e8c785254d97190f223765fbbd19a1e6d52
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 26 18:30:03 2010 +0200
+
+ new interfaces for timers; the implementation is not changed yet
+
+ src/config.hpp | 4 ++++
+ src/devpoll.cpp | 6 +++---
+ src/devpoll.hpp | 7 +++----
+ src/epoll.cpp | 6 +++---
+ src/epoll.hpp | 4 ++--
+ src/i_poll_events.hpp | 2 +-
+ src/io_object.cpp | 10 +++++-----
+ src/io_object.hpp | 6 +++---
+ src/io_thread.cpp | 2 +-
+ src/io_thread.hpp | 2 +-
+ src/kqueue.cpp | 6 +++---
+ src/kqueue.hpp | 4 ++--
+ src/poll.cpp | 6 +++---
+ src/poll.hpp | 4 ++--
+ src/select.cpp | 6 +++---
+ src/select.hpp | 4 ++--
+ src/zmq_connecter.cpp | 8 ++++----
+ src/zmq_connecter.hpp | 3 +++
+ 18 files changed, 48 insertions(+), 42 deletions(-)
+
+commit be79a9fbc26a55c90b693485f69dfd17f710cb13
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 26 18:01:59 2010 +0200
+
+ minor beautifications
+
+ src/config.hpp | 4 +++-
+ src/connect_session.hpp | 3 +++
+ src/named_session.hpp | 3 +++
+ src/transient_session.hpp | 3 +++
+ 4 files changed, 12 insertions(+), 1 deletions(-)
+
+commit 5dae27d0ed92aba070f824a4bf5dfa7845aa165d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 26 16:55:54 2010 +0200
+
+ clock_t class added
+
+ src/Makefile.am | 2 +
+ src/clock.cpp | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/clock.hpp | 56 ++++++++++++++++++++++++++++
+ src/config.hpp | 7 ++++
+ src/socket_base.cpp | 38 +++++--------------
+ src/socket_base.hpp | 2 +-
+ src/zmq.cpp | 43 +++-------------------
+ 7 files changed, 181 insertions(+), 67 deletions(-)
+
+commit 7d5061798c93655796b1cf64afd7f5b8146a7681
+Merge: e478468 9129b79
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 26 13:36:05 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed
+
+ Conflicts:
+ src/app_thread.cpp
+
commit 9129b792486b87d4f54607321427c2df783c9ec1
Author: Martin Sustrik <sustrik@250bpm.com>
Date: Sun Sep 26 13:30:33 2010 +0200
@@ -192,6 +4036,194 @@ Date: Sun Sep 26 13:30:33 2010 +0200
src/app_thread.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
+commit e478468e52fcb085f9d429cee5dd6938c80343bc
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Sep 21 09:10:17 2010 +0200
+
+ minor error in comment fixed
+
+ src/socket_base.hpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9c118866003277222173ea04916c3e3b82c88b95
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Sep 21 09:00:46 2010 +0200
+
+ The flag in the socket has clear semantics now -- it tracks whether corresponding context was closed, it doesn't track whether zmq_close was called on the socket itself
+
+ src/socket_base.cpp | 41 +++++++++++++----------------------------
+ src/socket_base.hpp | 6 ++----
+ 2 files changed, 15 insertions(+), 32 deletions(-)
+
+commit 4d51a52874b814f65a31a0c1b8e0a36cb671697c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Sep 20 17:25:04 2010 +0200
+
+ zmq_poll (select version) now correctly assumes that ZMQ_FD is edge-trigerred
+
+ src/zmq.cpp | 27 ++++++++++-----------------
+ 1 files changed, 10 insertions(+), 17 deletions(-)
+
+commit f49b77eedcdacf9663050a20723ac964af7cdac0
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Mon Sep 20 16:55:46 2010 +0200
+
+ zmq_poll honours ZMQ_FORCE_POLL and ZMQ_FORCE_SELECT options
+
+ src/zmq.cpp | 25 +++++++++++++++++++++----
+ 1 files changed, 21 insertions(+), 4 deletions(-)
+
+commit 1abfc92d265bce4f60d63cd302319c451d2c451a
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Mon Sep 20 16:45:25 2010 +0200
+
+ minor problem in zmq_poll (select version) fixed
+
+ src/zmq.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 328c92a0a70b98b4a3bf09132bd8f8041e4c8628
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Sep 20 00:06:05 2010 +0200
+
+ problem with engine being attached to session while it's being terminated fixed
+
+ src/encoder.hpp | 2 +-
+ src/session.cpp | 40 ++++++++++++++++++++++++++++++++++++++--
+ src/session.hpp | 2 ++
+ src/zmq_engine.hpp | 5 +----
+ 4 files changed, 42 insertions(+), 7 deletions(-)
+
+commit 1d2399720b3fd06da5e7f9f4a211f30c57a9ce2d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 19 22:45:48 2010 +0200
+
+ zmq_init_t destroyed zmq_engine_t before plugging it out from the poller first -- fixed
+
+ src/zmq_engine.cpp | 10 +++++++++-
+ src/zmq_engine.hpp | 7 ++++++-
+ src/zmq_init.cpp | 2 +-
+ 3 files changed, 16 insertions(+), 3 deletions(-)
+
+commit cda3c96a7fed0ee603c13e787ac511a1ea171367
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 19 22:17:37 2010 +0200
+
+ minor code reorganisation in ctx_t::terminate
+
+ src/ctx.cpp | 31 +++++++++++++++----------------
+ 1 files changed, 15 insertions(+), 16 deletions(-)
+
+commit 938689a49128ca17d2bc9662f311c6dbb70240db
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 19 21:40:26 2010 +0200
+
+ synchronisation problem fixed in ctx_t
+
+ src/ctx.cpp | 2 ++
+ src/zmq_init.cpp | 5 ++++-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 471013a59fc7f41b694c0bc0b11a459d4c19700d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 19 20:43:14 2010 +0200
+
+ two races fixed in session creation
+
+ src/zmq_init.cpp | 16 ++++++++++++----
+ 1 files changed, 12 insertions(+), 4 deletions(-)
+
+commit 1f10208ad065c01e172669affdd48b6f2698ff4c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 19 08:42:19 2010 +0200
+
+ termination of pipe via delimiter message could stuck when no data were read from the pipe (because connection wasn't active) -- fixed
+
+ src/session.cpp | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 5153b6368be58d0fcaea262463a3fc08ea658f78
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sun Sep 19 08:39:53 2010 +0200
+
+ obsolete 'active' flag removed from session_t
+
+ src/session.cpp | 11 +++--------
+ src/session.hpp | 3 ---
+ 2 files changed, 3 insertions(+), 11 deletions(-)
+
+commit 4c6d07d3668558d910c9b1d19d52ccdeacc90574
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Sep 18 07:37:36 2010 +0200
+
+ single term ack counting mechanism for every socket (no separate mechanisms for fq_t and lb_t)
+
+ src/Makefile.am | 1 -
+ src/fq.cpp | 18 ++++++++----------
+ src/fq.hpp | 4 ++--
+ src/i_terminate_events.hpp | 38 --------------------------------------
+ src/lb.cpp | 18 ++++++++----------
+ src/lb.hpp | 4 ++--
+ src/own.hpp | 16 ++++++++--------
+ src/pull.cpp | 7 -------
+ src/pull.hpp | 6 +-----
+ src/push.cpp | 7 -------
+ src/push.hpp | 6 +-----
+ src/sub.cpp | 7 -------
+ src/sub.hpp | 6 +-----
+ src/xreq.cpp | 7 -------
+ src/xreq.hpp | 6 +-----
+ 15 files changed, 32 insertions(+), 119 deletions(-)
+
+commit fb6ce536d96c82e8f4378a87a5d59aefcc57a96d
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Sep 18 06:48:45 2010 +0200
+
+ more details on launch_sibling in comments
+
+ src/own.cpp | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 0c215fada4f448788069e42bda34609f74c8b64b
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Sep 18 06:42:46 2010 +0200
+
+ potential duplicate termination of pipes removed
+
+ src/fq.cpp | 1 +
+ src/lb.cpp | 1 +
+ src/socket_base.cpp | 10 ----------
+ 3 files changed, 2 insertions(+), 10 deletions(-)
+
+commit c7b9ba3ccdd5a18afb22dda1afee16c938076c25
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Sep 17 12:58:20 2010 +0200
+
+ reconnection process fixed when failure occurs during init phase
+
+ src/command.hpp | 3 ++-
+ src/session.cpp | 8 ++++++++
+ 2 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 85aa25e56cbf6f4194162235fc06bed8683b1bad
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Sep 17 12:32:46 2010 +0200
+
+ bug in REQ+multipart fixed
+
+ src/req.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit ff1080728f3a587ee472a64533fd7e44b365e6f0
+Merge: be159b6 e2802d9
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 15 16:58:00 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ values of RATE, RECOVERY_IVL and SWAP options are checked for negative values
+
commit e2802d9a4b7e518c549e8dd95a34d2424058f086
Author: Martin Sustrik <sustrik@250bpm.com>
Date: Wed Sep 15 16:44:57 2010 +0200
@@ -201,6 +4233,108 @@ Date: Wed Sep 15 16:44:57 2010 +0200
src/options.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
+commit be159b63169474b644ebd38177bf4e808ebb5487
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Mon Sep 13 13:27:48 2010 +0200
+
+ zmq::writer_t: Add missing test for swap
+
+ src/pipe.cpp | 34 +++++++++++++++++-----------------
+ 1 files changed, 17 insertions(+), 17 deletions(-)
+
+commit 92f9136ca6c69d2d1588ff5ff65e668e40e0f7eb
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Sep 10 13:11:08 2010 +0200
+
+ lefover assert removed
+
+ src/lb.cpp | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit a68e6739f4248e25a0f9a64c89729f55dfacb842
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Sep 9 08:25:00 2010 +0200
+
+ when no I/O threads are available error is raised instead of assertion
+
+ doc/zmq_bind.txt | 2 ++
+ doc/zmq_connect.txt | 2 ++
+ include/zmq.h | 2 +-
+ src/connect_session.cpp | 15 ++++++++++-----
+ src/ctx.cpp | 7 +++++--
+ src/ctx.hpp | 5 +++--
+ src/object.cpp | 4 ++--
+ src/object.hpp | 2 +-
+ src/socket_base.cpp | 21 ++++++++++++++++++---
+ src/zmq.cpp | 2 ++
+ src/zmq_connecter.cpp | 9 +++++++--
+ src/zmq_listener.cpp | 9 +++++++--
+ 12 files changed, 60 insertions(+), 20 deletions(-)
+
+commit 47e87b7e4b8dd6a0cfbc1f30ffcb06edfa83c853
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 8 15:45:59 2010 +0200
+
+ EMTHREAD error code returned to zmq.h to ensure backward compatibility
+
+ include/zmq.h | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 91ea20464439b5359a5d803181141fc756fa817c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 8 08:39:27 2010 +0200
+
+ EINTR returned from the blocking functions
+
+ doc/zmq_getsockopt.txt | 2 +
+ doc/zmq_poll.txt | 2 +
+ doc/zmq_recv.txt | 3 ++
+ doc/zmq_send.txt | 3 ++
+ doc/zmq_setsockopt.txt | 2 +
+ src/ctx.cpp | 5 ---
+ src/ctx.hpp | 3 --
+ src/io_thread.cpp | 8 ++++-
+ src/signaler.cpp | 47 +++++++++++++++----------------
+ src/signaler.hpp | 2 +-
+ src/socket_base.cpp | 71 ++++++++++++++++++++++++++---------------------
+ src/socket_base.hpp | 3 +-
+ src/zmq.cpp | 26 +++++++----------
+ 13 files changed, 93 insertions(+), 84 deletions(-)
+
+commit f374431ebe0f3e18a2b2adeafa8093ff59a9eac2
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Sep 7 17:06:33 2010 +0200
+
+ get rid of 'has virtual functions but non-virtual destructor' warnings in pipe.hpp
+
+ src/pipe.hpp | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 6d4ffd90dbda943e5d1215fb56d06eeac1b4420f
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Sep 7 15:49:54 2010 +0200
+
+ Bug in fq_t and lb_t (when used via ZMQ_EVENTS option) fixed
+
+ src/fq.cpp | 7 +++++--
+ src/lb.cpp | 6 +++---
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+commit b4740c14e7fc68040037d65bdfac4233b08c5a08
+Merge: d4c8de5 01c463c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Sep 4 19:10:17 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Version number incremented to 2.0.10
+ NEWS updated for 2.0.9
+
+ Conflicts:
+ builds/msvc/platform.hpp
+ configure.in
+
commit 01c463cc89626bf9d69500ab1f4957705663788e
Author: Martin Sustrik <sustrik@250bpm.com>
Date: Sat Sep 4 19:08:55 2010 +0200
@@ -220,6 +4354,18 @@ Date: Sat Sep 4 18:38:20 2010 +0200
NEWS | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
+commit d4c8de5050a183f4df72062ce3ff6ceca0128fdf
+Merge: 76f2e5d 1e84519
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Sat Sep 4 17:49:40 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Update .gitignore
+ doc: Add 0MQ version to XHTML11 backend footer
+ build: Generate ChangeLog in 'make dist', ZIP automatically
+
commit 1e8451961e498abd1da61e64f5baf48890e1563e
Author: Martin Lucina <mato@kotelna.sk>
Date: Sat Sep 4 17:44:11 2010 +0200
@@ -260,6 +4406,24 @@ Date: Sat Sep 4 17:26:36 2010 +0200
configure.in | 2 +-
3 files changed, 17 insertions(+), 2729 deletions(-)
+commit 76f2e5d5442d3200c8ca09681a887830775c84c0
+Merge: ca17612 db7fe85
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Sep 4 17:19:38 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Broken device numbering reverted
+ assert on malformed messages
+ forwarder and streamer devices handle multi-part messages correctly
+ improved null checking in zmq_term
+
+ Conflicts:
+ AUTHORS
+ include/zmq.h
+ src/zmq.cpp
+
commit db7fe858d6356988fb9a9270c235178e523b2370
Author: Martin Sustrik <sustrik@250bpm.com>
Date: Sat Sep 4 17:12:08 2010 +0200
@@ -299,6 +4463,20 @@ Date: Thu Aug 26 12:14:53 2010 +0200
src/zmq.cpp | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
+commit ca176121deb8dbdc62d8a37fec377c07fc786480
+Merge: 2673a84 51a84c1
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Sat Sep 4 16:24:21 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ zmq::select_t, zmq_poll(): assert if FD_SETSIZE reached
+ zmq.h: Fix typo and use of C99 comment
+
+ Conflicts:
+ src/zmq.cpp
+
commit 51a84c15ded2d70985c9d971ebdf3f3c9c18d590
Author: Martin Lucina <mato@kotelna.sk>
Date: Sat Sep 4 16:12:33 2010 +0200
@@ -321,6 +4499,24 @@ Date: Sat Sep 4 16:10:14 2010 +0200
include/zmq.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
+commit 2673a84e07b93b8607958516c55341c2eb220a6e
+Merge: 0a1f7e3 ee3444f
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Sat Sep 4 16:01:31 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ doc: Update zmq_socket(3) for 2.0.8 API changes
+ Revert "Added man page for the zmq_device method"
+ Revert "Added clean target that deletes generated man pages"
+ Revert "Various changes to documentation project:"
+ Revert "Reverting 'clean' change to Makefile"
+ Revert "Removed empty man pages for old standalone devices"
+ Revert "Further cleanups on reference manual"
+ Revert "Small improvements to zmq_device(3) page"
+ Revert "Removed wip zmq_deviced from master"
+
commit ee3444ff93888a052cd1ba48aa22892f7077a7a0
Author: Martin Lucina <mato@kotelna.sk>
Date: Sat Sep 4 16:00:26 2010 +0200
@@ -473,6 +4669,21 @@ Date: Sat Sep 4 15:51:09 2010 +0200
doc/zmq_deviced.txt | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 149 insertions(+), 2 deletions(-)
+commit 0a1f7e3524338690551c04ebfccd896a0b96f399
+Merge: a81a373 14853c2
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Sep 2 08:07:40 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Prior to this patch prefix_tree asserts.
+ Fix for signaler_t on HP-UX and AIX platforms
+ Mikael Kjaer added to AUTHORS
+
+ Conflicts:
+ src/trie.cpp
+
commit 14853c2db528b3fd6eed84786053549e71f61bb7
Author: Jon Dyte <jon@totient.co.uk>
Date: Thu Sep 2 07:52:02 2010 +0200
@@ -508,6 +4719,16 @@ Date: Thu Sep 2 07:26:14 2010 +0200
AUTHORS | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
+commit a81a37399b2ab4143aedf3ff4c442655b9e7e9b7
+Merge: 47aaf10 59315eb
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 1 18:42:15 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ Erasure of retired fd's in select.cpp causes an assertion in MSVC 2008 STL
+
commit 59315ebdcb565d23ba78ba0ca8581cef465fc9bd
Author: Mikael Helbo Kjær <mhk@designtech.dk>
Date: Wed Sep 1 18:39:12 2010 +0200
@@ -523,6 +4744,20 @@ Date: Wed Sep 1 18:39:12 2010 +0200
src/select.cpp | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
+commit 47aaf10211a0f3380dc82942a8cb4eba8c3c7ea3
+Merge: 0fe7d3c 99ddfa7
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 1 18:35:48 2010 +0200
+
+ Merge branch 'maint'
+
+ * maint:
+ maint: will become 2.0.9
+
+ Conflicts:
+ builds/msvc/platform.hpp
+ configure.in
+
commit 99ddfa7d65a4556bdbb68fd1831e2de73595f0c7
Author: Martin Sustrik <sustrik@250bpm.com>
Date: Wed Sep 1 18:22:03 2010 +0200
@@ -533,6 +4768,696 @@ Date: Wed Sep 1 18:22:03 2010 +0200
configure.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
+commit 0fe7d3c998f65fb93b0f3d15c40d8bc2fe0923ad
+Merge: 651c1ad 6a0c323
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 1 15:29:19 2010 +0200
+
+ conflicts resolved
+
+commit 651c1adc80ddc724877f2ebedf07d18e21e363f6
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 1 15:24:46 2010 +0200
+
+ sys transport introdced; inproc://log moved to sys://log
+
+ src/ctx.cpp | 2 +-
+ src/socket_base.cpp | 10 +++++-----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 6a0c323bb231a2460c238cd0b93293fcd482f9bc
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 1 13:31:45 2010 +0200
+
+ MSVC build fixed
+
+ builds/msvc/libzmq/libzmq.vcproj | 24 ++++++++----------------
+ src/ctx.cpp | 6 ++++--
+ 2 files changed, 12 insertions(+), 18 deletions(-)
+
+commit ce0972dca3982538fd123b61fbae3928fad6d1e7
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 1 07:57:38 2010 +0200
+
+ context creates an inproc endpoint ('inproc://log') to distribute 0MQ's log messages
+
+ src/ctx.cpp | 25 +++++++++++++++++++++++--
+ src/ctx.hpp | 10 ++++++++++
+ src/object.cpp | 5 +++++
+ src/object.hpp | 5 +++++
+ 4 files changed, 43 insertions(+), 2 deletions(-)
+
+commit db73c76314d7109da4b400a3edb107c4eda802a2
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 1 07:56:04 2010 +0200
+
+ assert when pipe attaches to PUB socket in process of termination -- fixed
+
+ src/pub.cpp | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit aaa07613d3d7ff1eafcec3d38769f806fae5ac5c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 1 07:54:57 2010 +0200
+
+ pipe being attached to the PAIR socket during its termination process is immediately asked to terminate itself
+
+ src/pair.cpp | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 47c064f2eaa01c324e06588a4f07892762e78fcd
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Sep 1 07:35:15 2010 +0200
+
+ hangup when closing socket with no pipes attached -- fixed
+
+ src/fq.cpp | 5 +++++
+ src/lb.cpp | 5 +++++
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 090e460d6f09b5611d34a4867efb6cf46dd44a34
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Aug 31 21:03:34 2010 +0200
+
+ naming cleanup: yarray->array
+
+ src/Makefile.am | 3 +-
+ src/array.hpp | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/ctx.hpp | 4 +-
+ src/fq.hpp | 4 +-
+ src/lb.hpp | 4 +-
+ src/pipe.hpp | 6 +-
+ src/pub.hpp | 4 +-
+ src/socket_base.hpp | 4 +-
+ src/yarray.hpp | 110 --------------------------------------
+ src/yarray_item.hpp | 64 ----------------------
+ 10 files changed, 160 insertions(+), 189 deletions(-)
+
+commit f5acbb5095901e56a9bfd29b9a8c1c7d3f165ce3
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Aug 31 07:01:40 2010 +0200
+
+ naming cleanup: zmq_encoder->encoder, zmq_decoder->decoder
+
+ src/Makefile.am | 6 +--
+ src/decoder.cpp | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/decoder.hpp | 47 +++++++++++++++++----
+ src/encoder.cpp | 89 +++++++++++++++++++++++++++++++++++++++
+ src/encoder.hpp | 39 +++++++++++++----
+ src/pgm_receiver.cpp | 2 +-
+ src/pgm_receiver.hpp | 6 +-
+ src/pgm_sender.hpp | 4 +-
+ src/zmq_decoder.cpp | 114 --------------------------------------------------
+ src/zmq_decoder.hpp | 59 --------------------------
+ src/zmq_encoder.cpp | 89 ---------------------------------------
+ src/zmq_encoder.hpp | 55 ------------------------
+ src/zmq_engine.hpp | 8 ++--
+ 13 files changed, 283 insertions(+), 349 deletions(-)
+
+commit e45583c0f2b8fb11f119317e7c94052c07c24ea8
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Aug 30 17:04:51 2010 +0200
+
+ OSX build fixed -- semaphore replaced by mutex
+
+ src/semaphore.hpp | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 53 insertions(+), 2 deletions(-)
+
+commit f0a36f9994e0a4e6e509bdf4b6dd75af27f984bb
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Aug 30 15:28:08 2010 +0200
+
+ Minor patch to zmq_cpp(7)
+
+ doc/zmq_cpp.txt | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit fba90af8a7cc4a790cc9c77b6313fc253b51c36c
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Mon Aug 30 12:10:40 2010 +0200
+
+ Issue 54 - socket_base.cpp:162 comparison error
+
+ src/socket_base.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 68d62cfb4eb89549a3118e8e396531452b1174c3
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 28 14:07:26 2010 +0200
+
+ MSVC build fixed
+
+ builds/msvc/libzmq/libzmq.vcproj | 32 ++++++++++++++++----------------
+ 1 files changed, 16 insertions(+), 16 deletions(-)
+
+commit 0a8473deddae61a8c9221c3df089239ac2e2ca62
+Author: Guido Goldstein <zmq@a-nugget.de>
+Date: Sat Aug 28 13:58:23 2010 +0200
+
+ Added tests for transports per socket
+
+ tests/Makefile.am | 17 +++++++--
+ tests/simple.cpp | 32 -----------------
+ tests/test_pair.cpp | 78 ------------------------------------------
+ tests/test_pair_inproc.cpp | 30 ++++++++++++++++
+ tests/test_pair_ipc.cpp | 30 ++++++++++++++++
+ tests/test_pair_tcp.cpp | 30 ++++++++++++++++
+ tests/test_reqrep.cpp | 77 -----------------------------------------
+ tests/test_reqrep_inproc.cpp | 30 ++++++++++++++++
+ tests/test_reqrep_ipc.cpp | 30 ++++++++++++++++
+ tests/test_reqrep_tcp.cpp | 30 ++++++++++++++++
+ tests/testutil.hpp | 69 +++++++++++++++++++++++++++++++++++--
+ 11 files changed, 258 insertions(+), 195 deletions(-)
+
+commit 6ec783e7023b4c4d4d10a3870b4c560684ae7069
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 28 13:26:19 2010 +0200
+
+ prefix_tree_t renamed to trie_t
+
+ src/Makefile.am | 4 +-
+ src/prefix_tree.cpp | 180 ---------------------------------------------------
+ src/prefix_tree.hpp | 55 ----------------
+ src/sub.hpp | 4 +-
+ src/trie.cpp | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/trie.hpp | 58 ++++++++++++++++
+ 6 files changed, 242 insertions(+), 239 deletions(-)
+
+commit beea535f9d7ff210ea035de190c0d87184ee1963
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 28 13:18:53 2010 +0200
+
+ swap's block size made into a compile-time parameter
+
+ src/config.hpp | 4 ++++
+ src/swap.cpp | 5 +++--
+ src/swap.hpp | 2 +-
+ 3 files changed, 8 insertions(+), 3 deletions(-)
+
+commit d8b975f4e73ae940c0c0f9c8c6c7aac1199fee09
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 28 13:14:45 2010 +0200
+
+ msg_store_t renamed to swap_t
+
+ src/Makefile.am | 4 +-
+ src/msg_store.cpp | 307 -----------------------------------------------------
+ src/msg_store.hpp | 114 --------------------
+ src/pipe.cpp | 2 +-
+ src/pipe.hpp | 4 +-
+ src/swap.cpp | 307 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/swap.hpp | 114 ++++++++++++++++++++
+ 7 files changed, 426 insertions(+), 426 deletions(-)
+
+commit d90b4071151e3752208d3a9d49fb50845f89ab1b
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 28 13:06:58 2010 +0200
+
+ refactoring of pipe/swap interaction
+
+ src/pipe.cpp | 194 ++++++++++++++++++++++++++++++----------------------------
+ src/pipe.hpp | 39 ++++++------
+ 2 files changed, 120 insertions(+), 113 deletions(-)
+
+commit 42000d2c4f988a164eaeb9b580a4f588d91e353e
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 28 10:15:03 2010 +0200
+
+ terminology unified: revive->activate
+
+ src/command.hpp | 13 ++++++-------
+ src/fq.cpp | 4 ++--
+ src/object.cpp | 26 +++++++++++++-------------
+ src/object.hpp | 8 ++++----
+ src/pipe.cpp | 8 ++++----
+ src/pipe.hpp | 4 ++--
+ src/socket_base.cpp | 5 +++--
+ 7 files changed, 34 insertions(+), 34 deletions(-)
+
+commit 92923cd40b645af844c5ed1055a0a45c6daa3c89
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 28 08:44:12 2010 +0200
+
+ bug in pipe deactivation fixed
+
+ src/pipe.cpp | 8 +++-----
+ src/socket_base.cpp | 2 +-
+ tests/test_pair.cpp | 7 ++++---
+ tests/test_reqrep.cpp | 4 ++--
+ 4 files changed, 10 insertions(+), 11 deletions(-)
+
+commit 035c937ee7452708a9dd3abd851fda6a753808f4
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 28 07:02:22 2010 +0200
+
+ zmq_poll: account for the fact that ZMQ_FD is edge-triggered
+
+ src/zmq.cpp | 31 ++++++++++++++++++++++++-------
+ 1 files changed, 24 insertions(+), 7 deletions(-)
+
+commit 67aa788577fb49474dd7329b14316d25f1b3c08b
+Author: Guido Goldstein <zmq@a-nugget.de>
+Date: Sat Aug 28 06:31:40 2010 +0200
+
+ Fixed socket states in tests
+
+ tests/test_pair.cpp | 3 +++
+ tests/test_reqrep.cpp | 3 +++
+ tests/testutil.hpp | 6 +++++-
+ 3 files changed, 11 insertions(+), 1 deletions(-)
+
+commit 4d9b046977f895f8d61731672a5e84967ed85eb2
+Author: Guido Goldstein <zmq@a-nugget.de>
+Date: Fri Aug 27 21:13:45 2010 +0200
+
+ two tests added
+
+ AUTHORS | 1 +
+ tests/Makefile.am | 4 ++-
+ tests/simple.cpp | 2 +-
+ tests/test_pair.cpp | 74 +++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_reqrep.cpp | 74 +++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/testutil.hpp | 64 ++++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 217 insertions(+), 2 deletions(-)
+
+commit 0b76f234a2c521194029c6708c394391dfc66ea7
+Merge: 35cb1fa 98dc118
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Fri Aug 27 18:41:10 2010 +0200
+
+ Merge branch 'master' of github.com:zeromq/zeromq2
+
+commit 35cb1fade62a92fdccc9fa0d75a3b69115c56c35
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Fri Aug 27 18:35:59 2010 +0200
+
+ Add a basic framework for a test suite
+
+ The test suite uses the standard automake support. Tests are always built,
+ but run only when you do a "make check".
+
+ Makefile.am | 4 ++--
+ configure.in | 2 +-
+ tests/Makefile.am | 8 ++++++++
+ tests/simple.cpp | 32 ++++++++++++++++++++++++++++++++
+ 4 files changed, 43 insertions(+), 3 deletions(-)
+
+commit 98dc11843e3234e3d70b50d4f650089e7cf99e63
+Author: Dhammika Pathirana <dhammika@gmail.com>
+Date: Fri Aug 27 18:06:37 2010 +0200
+
+ assert on malformed messages
+
+ src/zmq_decoder.cpp | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 56faac7f19bf2a6d2c7b6e0c2e35fcb667a72a48
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Aug 27 15:01:38 2010 +0200
+
+ zmq_poll returns prematurely even if infinite timeout is set - fixed
+
+ src/zmq.cpp | 204 +++++++++++++++++++++++++++++++++--------------------------
+ 1 files changed, 114 insertions(+), 90 deletions(-)
+
+commit 3cb84b5ceac0f8652a99ec61152a865292e02cf1
+Author: Jon Dyte <jon@totient.co.uk>
+Date: Fri Aug 27 06:59:55 2010 +0200
+
+ forwarder and streamer devices handle multi-part messages correctly
+
+ src/forwarder.cpp | 17 ++++++++++++++---
+ src/queue.cpp | 15 ++++++++-------
+ src/streamer.cpp | 17 ++++++++++++++---
+ 3 files changed, 36 insertions(+), 13 deletions(-)
+
+commit 43f2c6ff5b15d6feae2bd608e50503f7d4c62682
+Author: Ivo Danihelka <ivo@danihelka.net>
+Date: Thu Aug 26 12:14:53 2010 +0200
+
+ improved null checking in zmq_term
+
+ AUTHORS | 1 +
+ src/zmq.cpp | 7 ++++---
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit b608c19c5a28f0f49a106bfddf680f0a410df6c8
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Aug 24 15:58:48 2010 +0200
+
+ MSVC build fixed
+
+ builds/msvc/libzmq/libzmq.vcproj | 52 ++++++++++++++++++++++++-------------
+ src/pipe.hpp | 9 +++---
+ src/socket_base.cpp | 1 +
+ 3 files changed, 40 insertions(+), 22 deletions(-)
+
+commit 9b8993efb48ccbe3df917338cc078129b5af495b
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Aug 24 11:19:22 2010 +0200
+
+ elementary fixes to the named session
+
+ src/named_session.cpp | 21 +++++++++++----------
+ src/session.cpp | 37 +++++++++++--------------------------
+ src/session.hpp | 9 ++++-----
+ src/socket_base.cpp | 12 ++++++------
+ src/socket_base.hpp | 7 +++----
+ src/zmq_init.cpp | 6 ++----
+ 6 files changed, 37 insertions(+), 55 deletions(-)
+
+commit 46d70555659c05a0c8d95c6d7aa8c7e0cc5ebc66
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Aug 24 10:20:55 2010 +0200
+
+ connecter object unregisters its fd correctly
+
+ src/zmq_connecter.cpp | 12 ++++--------
+ src/zmq_connecter.hpp | 1 -
+ 2 files changed, 4 insertions(+), 9 deletions(-)
+
+commit 87655b0b9d9121465e0b2ea1976b0879b1b1f756
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Aug 24 09:57:15 2010 +0200
+
+ listener object unregisters its fd correctly
+
+ src/zmq_engine.cpp | 3 ---
+ src/zmq_listener.cpp | 5 ++---
+ src/zmq_listener.hpp | 2 +-
+ 3 files changed, 3 insertions(+), 7 deletions(-)
+
+commit 0d5f3ebbdad12a63e7cc28c53c38d750761a75e3
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Tue Aug 24 09:39:17 2010 +0200
+
+ sessions created by listerner are correctly shut down
+
+ src/session.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 5a731e73c855cd96040b3ecd55ef3b65606e1eb6
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 14 08:53:52 2010 +0200
+
+ added ZMQ_MAKE_VALGRIND_HAPPY compile-time option
+
+ perf/remote_thr.cpp | 8 ++++++--
+ src/object.cpp | 36 ++++++++++++++++++++++++++++++++++++
+ 2 files changed, 42 insertions(+), 2 deletions(-)
+
+commit 43e34d028115c43577713c0c3e1f0c33b0aac94a
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 14 08:37:38 2010 +0200
+
+ engine leak fixed; pgm compilation fixed
+
+ src/connect_session.cpp | 20 ++++++++------------
+ src/i_engine.hpp | 4 ++++
+ src/pgm_receiver.cpp | 12 +++++++++---
+ src/pgm_receiver.hpp | 7 ++++---
+ src/pgm_sender.cpp | 12 +++++++++---
+ src/pgm_sender.hpp | 7 ++++---
+ src/session.cpp | 3 +++
+ src/socket_base.cpp | 2 --
+ src/zmq_engine.cpp | 6 ++++++
+ src/zmq_engine.hpp | 1 +
+ 10 files changed, 48 insertions(+), 26 deletions(-)
+
+commit 45f83d78a56f4b3a812c87fec03a75558445b2ab
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Aug 12 15:03:51 2010 +0200
+
+ one more dezombification bug fixed
+
+ src/ctx.cpp | 33 +++++++++------------------------
+ src/ctx.hpp | 7 +------
+ src/object.cpp | 5 -----
+ src/object.hpp | 3 ---
+ src/own.cpp | 7 ++++++-
+ src/own.hpp | 5 ++++-
+ src/socket_base.cpp | 21 ++++++++++++++++-----
+ src/socket_base.hpp | 12 ++++++++++--
+ 8 files changed, 46 insertions(+), 47 deletions(-)
+
+commit 936dbf956b0f1471a96fc06bcba67765257dbc4a
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Thu Aug 12 08:16:18 2010 +0200
+
+ dezombification procedure fixed
+
+ src/ctx.cpp | 46 ++++++++++++++++++++++++++++++++++------------
+ src/ctx.hpp | 12 ++++++++----
+ src/object.cpp | 5 +++++
+ src/object.hpp | 3 +++
+ src/socket_base.cpp | 10 ++++++----
+ src/socket_base.hpp | 4 ++--
+ src/zmq.cpp | 2 +-
+ 7 files changed, 59 insertions(+), 23 deletions(-)
+
+commit 76bd6e73c335dbebd8bd30565f83a810058f2cc8
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Aug 11 17:06:49 2010 +0200
+
+ engine termination on disconnect fixed
+
+ src/connect_session.cpp | 2 +-
+ src/connect_session.hpp | 6 +++---
+ src/session.cpp | 14 ++++++++++++--
+ src/session.hpp | 1 +
+ src/transient_session.cpp | 2 +-
+ src/transient_session.hpp | 5 +++--
+ 6 files changed, 21 insertions(+), 9 deletions(-)
+
+commit d13933bc62fce71b5a58118020e0dd3776e79aa9
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Aug 11 14:09:56 2010 +0200
+
+ I/O object hierarchy implemented
+
+ src/Makefile.am | 11 +-
+ src/command.hpp | 4 +-
+ src/connect_session.cpp | 115 ++++++++++++
+ src/connect_session.hpp | 60 ++++++
+ src/ctx.cpp | 6 +-
+ src/ctx.hpp | 2 +-
+ src/fq.cpp | 21 ++-
+ src/fq.hpp | 11 +-
+ src/i_engine.hpp | 15 +-
+ src/i_inout.hpp | 21 +--
+ src/i_terminate_events.hpp | 38 ++++
+ src/io_object.cpp | 22 ++-
+ src/io_object.hpp | 10 +-
+ src/lb.cpp | 22 ++-
+ src/lb.hpp | 11 +-
+ src/named_session.cpp | 87 +++++++++
+ src/named_session.hpp | 56 ++++++
+ src/object.cpp | 26 ++--
+ src/object.hpp | 23 ++-
+ src/own.cpp | 198 ++++++++++++++++++++
+ src/own.hpp | 132 +++++++++++++
+ src/owned.cpp | 77 --------
+ src/owned.hpp | 94 ----------
+ src/pair.cpp | 28 ++-
+ src/pair.hpp | 7 +-
+ src/pub.cpp | 26 ++-
+ src/pub.hpp | 8 +-
+ src/pull.cpp | 14 +-
+ src/pull.hpp | 17 ++-
+ src/push.cpp | 14 +-
+ src/push.hpp | 17 ++-
+ src/session.cpp | 161 ++++++-----------
+ src/session.hpp | 73 +++++---
+ src/socket_base.cpp | 435 +++++++++++++-------------------------------
+ src/socket_base.hpp | 68 ++-----
+ src/sub.cpp | 12 +-
+ src/sub.hpp | 11 +-
+ src/transient_session.cpp | 36 ++++
+ src/transient_session.hpp | 46 +++++
+ src/xrep.cpp | 25 ++-
+ src/xrep.hpp | 12 +-
+ src/xreq.cpp | 17 +-
+ src/xreq.hpp | 13 +-
+ src/zmq_connecter.cpp | 38 ++---
+ src/zmq_connecter.hpp | 24 +--
+ src/zmq_engine.cpp | 52 ++---
+ src/zmq_engine.hpp | 14 +-
+ src/zmq_init.cpp | 142 +++++++-------
+ src/zmq_init.hpp | 33 ++--
+ src/zmq_listener.cpp | 19 +-
+ src/zmq_listener.hpp | 11 +-
+ 51 files changed, 1441 insertions(+), 994 deletions(-)
+
+commit ee1f1af0091d9bdffa0e5ce1783da925b3cd7e56
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Sat Aug 7 21:04:30 2010 +0200
+
+ zmq_poll(): Fix some corner cases
+
+ Trying to optimize out the case where items_[i]. events is 0 would
+ result in a bogus pollfds[i]. Similarly in the select()-based impl,
+ while not strictly necessary it's better to get ZMQ_FD even if
+ events is 0 since that detects ETERM and friends.
+
+ src/zmq.cpp | 14 ++++++++------
+ 1 files changed, 8 insertions(+), 6 deletions(-)
+
+commit a85d1e51bff991a0d2f93ded2724e0ee290edf12
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Sat Aug 7 20:35:42 2010 +0200
+
+ zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt2
+
+ Rewrite the select()-based zmq_poll() implementation to use
+ ZMQ_FD and ZMQ_EVENTS.
+
+ Also fix some corner cases: We should not pollute revents with
+ unrequested events, and we don't need to poll on ZMQ_FD at all
+ if a pollitem with no events set was passed in.
+
+ src/zmq.cpp | 227 +++++++++++++++++++++++-----------------------------------
+ 1 files changed, 90 insertions(+), 137 deletions(-)
+
+commit 6b1ca2cb1e0adc9f28aae8d322b0832a3b174a04
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Sat Aug 7 18:33:44 2010 +0200
+
+ Fix whitespace
+
+ Dunno where those <TAB>s came from...
+
+ src/zmq.cpp | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit cd12508418530724f10a353fc3a14ab321d0be8e
+Author: Martin Lucina <mato@kotelna.sk>
+Date: Sat Aug 7 18:24:12 2010 +0200
+
+ zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt1
+
+ Rewrite zmq_poll() to use ZMQ_FD and ZMQ_EVENTS introduced on the
+ wip-shutdown branch. Only do the poll()-based version of zmq_poll (), the
+ select()-based version will not compile at the moment.
+
+ src/zmq.cpp | 169 +++++++++++++++++++----------------------------------------
+ 1 files changed, 54 insertions(+), 115 deletions(-)
+
+commit eb7b8a413a99b2e43e8feee410f2b860e99e7056
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 7 11:24:07 2010 +0200
+
+ REP socket layered on top of XREP socket
+
+ src/rep.cpp | 263 +++++++++--------------------------------------------------
+ src/rep.hpp | 49 ++----------
+ 2 files changed, 45 insertions(+), 267 deletions(-)
+
+commit 3e97c0fef49e511dcae400e134876581cdae43f3
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Sat Aug 7 09:52:34 2010 +0200
+
+ REQ socket implementation is layered on top of XREQ
+
+ src/fq.cpp | 7 ++
+ src/pipe.cpp | 6 +-
+ src/req.cpp | 243 ++++++++--------------------------------------------------
+ src/req.hpp | 54 +------------
+ 4 files changed, 47 insertions(+), 263 deletions(-)
+
+commit f77edfce26bf50ab6eae6550d33f345c9785acca
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Aug 6 20:55:37 2010 +0200
+
+ Destruction of session is delayed till both in & out pipes are closed
+
+ src/pipe.cpp | 5 -----
+ src/pipe.hpp | 4 ----
+ src/session.cpp | 7 ++++---
+ 3 files changed, 4 insertions(+), 12 deletions(-)
+
+commit 05d908492dc382941fc633ad7082b5bd86e84e67
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Fri Aug 6 17:49:37 2010 +0200
+
+ WIP: Socket migration between threads, new zmq_close() semantics
+
+ Sockets may now be migrated between OS threads; sockets may not be used by
+ more than one thread at any time. To migrate a socket to another thread the
+ caller must ensure that a full memory barrier is called before using the
+ socket from the target thread.
+
+ The new zmq_close() semantics implement the behaviour discussed at:
+
+ http://lists.zeromq.org/pipermail/zeromq-dev/2010-July/004244.html
+
+ Specifically, zmq_close() is now deterministic and while it still returns
+ immediately, it does not discard any data that may still be queued for
+ sending. Further, zmq_term() will now block until all outstanding data has
+ been sent.
+
+ TODO: Many bugs have been introduced, needs testing. Further, SO_LINGER or
+ an equivalent mechanism (possibly a configurable timeout to zmq_term())
+ needs to be implemented.
+
+ include/zmq.h | 70 ++++----
+ src/Makefile.am | 15 +-
+ src/app_thread.cpp | 195 --------------------
+ src/app_thread.hpp | 88 ---------
+ src/config.hpp | 5 +-
+ src/ctx.cpp | 249 ++++++++++++--------------
+ src/ctx.hpp | 94 ++++------
+ src/fq.cpp | 29 ++-
+ src/fq.hpp | 17 ++-
+ src/i_endpoint.hpp | 43 -----
+ src/io_thread.cpp | 5 +-
+ src/io_thread.hpp | 2 +-
+ src/lb.cpp | 21 ++-
+ src/lb.hpp | 13 +-
+ src/object.cpp | 29 ++--
+ src/object.hpp | 14 +-
+ src/owned.cpp | 10 +-
+ src/owned.hpp | 9 +-
+ src/pair.cpp | 72 +++++---
+ src/pair.hpp | 26 ++-
+ src/pipe.cpp | 250 +++++++++++++++-----------
+ src/pipe.hpp | 111 +++++++-----
+ src/pub.cpp | 62 +++-----
+ src/pub.hpp | 21 +--
+ src/pull.cpp | 48 +-----
+ src/pull.hpp | 16 +--
+ src/push.cpp | 50 +-----
+ src/push.hpp | 16 +--
+ src/rep.cpp | 81 ++++++---
+ src/rep.hpp | 30 ++--
+ src/req.cpp | 65 ++++---
+ src/req.hpp | 32 ++--
+ src/semaphore.hpp | 135 ++++++++++++++
+ src/session.cpp | 62 ++++---
+ src/session.hpp | 26 ++-
+ src/socket_base.cpp | 495 +++++++++++++++++++++++++++++++++++++--------------
+ src/socket_base.hpp | 100 +++++++----
+ src/sub.cpp | 40 +----
+ src/sub.hpp | 11 +-
+ src/thread.cpp | 20 --
+ src/thread.hpp | 9 -
+ src/xrep.cpp | 65 ++++----
+ src/xrep.hpp | 26 ++-
+ src/xreq.cpp | 37 +---
+ src/xreq.hpp | 10 +-
+ src/zmq.cpp | 7 +-
+ src/zmq_encoder.cpp | 2 +-
+ 47 files changed, 1427 insertions(+), 1406 deletions(-)
+
+commit b7e0fa972f45d21e45cacb93a1a92d38fdc11f40
+Author: Martin Sustrik <sustrik@250bpm.com>
+Date: Wed Aug 25 15:38:43 2010 +0200
+
+ 'master' will become 2.1.x release
+
+ builds/msvc/platform.hpp | 4 ++--
+ configure.in | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
commit 1e089f7163c8c59b60b39742ee4bc40e1ca843c5
Author: Martin Lucina <mato@kotelna.sk>
Date: Wed Aug 25 13:11:20 2010 +0200
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..d3c5b40
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,237 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+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'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/MAINTAINERS b/MAINTAINERS
index 9d65ad4..539c807 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -34,20 +34,16 @@ Component: Multiplexing (zmq_poll)
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
-Component: Devices
+Component: Generic Infrastructure (context, mailbox, command, pipe)
Maintainer: Martin Sustrik
Contact: sustrik@250bpm.com
-Component: Generic Infrastructure (context, signaler, command, pipe)
-Maintainer: Martin Sustrik
-Contact: sustrik@250bpm.com
-
-Component: Documentation
+Component: Reference manual
Maintainer: Martin Lucina
Contact: mato@kotelna.sk
Component: Autotools build system
-Maintainer: Martin Lucina
+Maintainer: Mikko Koppanen, Martin Lucina
Contact: mato@kotelna.sk
Component: MSVC build system
diff --git a/Makefile.am b/Makefile.am
index dbad6e1..9fa7001 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I config
-SUBDIRS = src doc perf devices
-DIST_SUBDIRS = src doc perf devices builds/msvc
+SUBDIRS = $(pgm_srcdir) src doc perf tests
+DIST_SUBDIRS = src doc perf tests builds/msvc
EXTRA_DIST = \
autogen.sh \
@@ -31,8 +31,8 @@ dist-hook:
fi
-cp $(top_srcdir)/builds/redhat/zeromq.spec $(distdir)/zeromq.spec
-sed s/\@PACKAGE_VERSION\@/@PACKAGE_VERSION@/ -i $(distdir)/zeromq.spec
- -rm -rf $(distdir)/foreign/openpgm/@pgm_basename@
+ -rm -rf $(distdir)/foreign/openpgm/build-staging
distclean-local:
- -rm -rf $(top_srcdir)/foreign/openpgm/@pgm_basename@
+ -rm -rf $(top_srcdir)/foreign/openpgm/build-staging
maintainer-clean-local:
-rm -rf $(top_srcdir)/config
diff --git a/Makefile.in b/Makefile.in
index 19a83d1..c85fd32 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -36,7 +36,7 @@ host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
- COPYING.LESSER NEWS config/compile config/config.guess \
+ COPYING.LESSER INSTALL NEWS config/compile config/config.guess \
config/config.sub config/depcomp config/install-sh \
config/ltmain.sh config/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -44,7 +44,8 @@ am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
$(top_srcdir)/config/ltoptions.m4 \
$(top_srcdir)/config/ltsugar.m4 \
$(top_srcdir)/config/ltversion.m4 \
- $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.in
+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -53,6 +54,12 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/platform.hpp
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -107,8 +114,10 @@ distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
+ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -134,8 +143,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -147,6 +154,7 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@
LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
LIPO = @LIPO@
@@ -169,13 +177,13 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
+XMLTO = @XMLTO@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -183,6 +191,8 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@
+ac_zmq_have_xmlto = @ac_zmq_have_xmlto@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -200,12 +210,6 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
-have_asciidoc = @have_asciidoc@
-have_gzip = @have_gzip@
-have_perl = @have_perl@
-have_pkg_config = @have_pkg_config@
-have_python = @have_python@
-have_xmlto = @have_xmlto@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -215,7 +219,6 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-inttypes = @inttypes@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
@@ -226,21 +229,22 @@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pgm_basename = @pgm_basename@
+pgm_srcdir = @pgm_srcdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
-stdint = @stdint@
+subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I config
-SUBDIRS = src doc perf devices
-DIST_SUBDIRS = src doc perf devices builds/msvc
+SUBDIRS = $(pgm_srcdir) src doc perf tests
+DIST_SUBDIRS = src doc perf tests builds/msvc
EXTRA_DIST = \
autogen.sh \
version.sh \
@@ -754,9 +758,9 @@ dist-hook:
fi
-cp $(top_srcdir)/builds/redhat/zeromq.spec $(distdir)/zeromq.spec
-sed s/\@PACKAGE_VERSION\@/@PACKAGE_VERSION@/ -i $(distdir)/zeromq.spec
- -rm -rf $(distdir)/foreign/openpgm/@pgm_basename@
+ -rm -rf $(distdir)/foreign/openpgm/build-staging
distclean-local:
- -rm -rf $(top_srcdir)/foreign/openpgm/@pgm_basename@
+ -rm -rf $(top_srcdir)/foreign/openpgm/build-staging
maintainer-clean-local:
-rm -rf $(top_srcdir)/config
diff --git a/NEWS b/NEWS
index 930ac3e..b081165 100644
--- a/NEWS
+++ b/NEWS
@@ -1,537 +1,192 @@
-0MQ version 2.0.10 (Stable), released on 2010/10/15
-===================================================
-
-New functionality
------------------
-* Upgrade OpenPGM to 2.1.28~dfsg (Martin Lucina)
-* Added a ZMQ_VERSION macro to zmq.h for compile-time API version
- detection (Martin Sustrik, Gonzalo Diethelm, Martin Lucina)
-
-Bug fixes:
-----------
-* Fix memory leak under Windows (Taras Shpot)
-* Makefile.am: Add missing files to distribution, improve
- maintainer-clean (Martin Lucina)
-* Add support for RHEL6 in the spec file (Sebastian Otaegui)
-* configure.in: Do not patch libtool rpath handling (Martin Lucina)
-* Fixing the Red Hat packaging (Martin Sustrik)
-* zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed
- (Max Wolf)
-* crash when closing an ypipe -- fixed (Dhammika Pathirana)
-* REQ socket can die when reply is delivered on wrong unerlying
- connection -- fixed (Martin Sustrik)
-* if TSC jumps backwards (in case of migration to a different CPU core)
- latency peak may occur -- fixed (Martin Sustrik)
-* values of RATE, RECOVERY_IVL and SWAP options are checked for negative
- values (Martin Sustrik)
-
-
-0MQ version 2.0.9 (Stable), released on 2010/09/04
+0MQ version 2.1.3 (Stable), released on 2011/03/21
==================================================
Bug fixes
---------
-* Broken device numbering fixed.
-* HP-UX/AIX build fixed.
-* Handling multi-part messages in forwarder and streamer devices fixed.
-* Couple of minor bug fixes, see the ChangeLog for details.
+* Fix to PUSH sockets, which would sometimes deliver tail frames of a
+ multipart message to new subscribers (Martin Sustrik).
+* Fix to PUB sockets, which would sometimes deliver tail frames of a
+ multipart message to new subscribers (Martin Sustrik).
-0MQ version 2.0.8 (Stable), released on 2010/08/25
-==================================================
+* Re-add PGM_TXW_MAX_RTE in order to have rate limiting on pgm transport
+ over OpenPGM (Steven McCoy).
-New functionality
------------------
+* Windows build was broken due to EPROTONOSUPPORT not being defined. This
+ has now been fixed (Martin Sustrik).
-* The ZMQ_SWAP functionality has now been implemented for all socket types.
+* Various fixes to make OpenVMS port work (Brett Cameron).
-Bug fixes
----------
-
-* Many bug fixes (about 30), see the ChangeLog for details.
+* Corrected Reference Manual to note that ZMQ_LINGER socket option may be
+ set at any time, not just before connecting/binding (Pieter Hintjens).
+* Fix to C++ binding to properly close sockets (Guido Goldstein).
-Documentation
--------------
+* Removed obsolete assert from pgm_socket.cpp (Martin Sustrik).
-* zmq_device(3) is now documented and describes the built-in devices.
+Changes
+-------
-* The ZMQ_XREQ and ZMQ_XREP socket types are now documented in zmq_socket(3).
+* Removed stand-alone devices (/devices subdirectory) from distribution.
+ These undocumented programs remain available in older packages (Pieter
+ Hintjens).
+* OpenPGM default rate raised to 40mbps by default (Steven McCoy).
-Interface
----------
+* ZMQ_DEALER and ZMQ_ROUTER macros provided to ease upgrade to 0MQ/3.0.
+ These are scheduled to replace ZMQ_XREQ and ZMQ_XREP (Pieter Hintjens).
-* By popular demand, the zmq_stopwatch_start, zmq_stopwatch_stop and zmq_sleep
- functions have been added back into distribution. This API is now in a
- separate include file, zmq_utils.h.
+* Added man page for zmq_device(3) which was hereto undocumented (Pieter
+ Hintjens).
-* The ZMQ_UPSTREAM and ZMQ_DOWNSTREAM socket types have been renamed to
- ZMQ_PULL and ZMQ_PUSH for clarity. The old names are still defined for
- compatibility reasons and will be removed in a future version.
+* Removed zmq_queue(3), zmq_forwarder(3), zmq_streamer(3) man pages
+ (Pieter Hintjens).
-* API calls that expect non-null parameters now return -1 and set errno to
- EFAULT if null parameters are passed.
+OpenPGM Integration
+-------------------
+* Upgraded OpenPGM to version 5.1.114 (Steven McCoy, Mikko Koppanen).
-Thanks to
----------
+* Build system now calls OpenPGM build process directly, allowing easier
+ future upgrades of OpenPGM (Mikko Koppanen).
-Everyone.
-
-
-0MQ version 2.0.7 (Beta), released on 2010/06/04
-================================================
-
-
-Distribution
-------------
-
-* The core documentation has been updated with many clarifications, especially
- in the description of the functionality provided by the different socket
- types.
-
-* The version of OpenPGM bundled with 0MQ has been updated to the 2.1.26 release.
+* Build system allows configuration with arbitrary versions of OpenPGM
+ (./configure --with-pgm=libpgm-x.y.z) (Mikko Koppanen).
+* OpenPGM uses new PGM_ODATA_MAX_RTE controlling original data instead of
+ PGM_TXW_MAX_RTE covering entire channel (Steven McCoy).
Building
--------
-* GCC-isms have been removed from the code and build system across the board;
- 0MQ should now build with no issues when using compilers other than GCC.
+* 0MQ builds properly on FreeBSD (Mikko Koppanen).
+
+0MQ version 2.1.2 (rc2), released on 2011/03/06
+===============================================
-Interface
+Bug fixes
---------
-* The zmq_init() function now has only a single parameter; the number of 0MQ
- I/O threads to create in the context being initialised. The app_threads and
- flags parameters have been removed.
+* 0MQ now correctly handles durable inproc sockets; previously it ignored
+ explicit identities on inproc sockets.
-* The ZMQ_P2P socket type has been renamed to ZMQ_PAIR.
+* Various memory leaks were fixed.
-* The ZMQ_LWM socket option has been removed; the low water mark for a socket
- is now computed automatically by 0MQ.
+* OpenPGM sender/receiver creation fixed.
-* A zmq_getsockopt() function has been added.
+0MQ version 2.1.1 (rc1), released on 2011/02/23
+===============================================
New functionality
-----------------
-* Multi-hop request/reply is fully supported. This feature allows the insertion
- of device(s) between ZMQ_REQ and ZMQ_REP sockets thus enabling scenarios
- such as multi-threaded server, shared service queue, and other interesting
- messaging topologies. The entire infrastructure is transparent to
- applications.
+* New socket option ZMQ_RECONNECT_IVL_MAX added, allows for exponential
+ back-off strategy when reconnecting.
-* Multi-part messages. A 0MQ message may now be composed of 1 or more message
- parts; each message part is an independent zmq_msg_t in its own right. 0MQ
- ensures atomic delivery of messages; peers shall receive either all message
- parts of a message or none at all.
+* New socket option ZMQ_RECOVERY_IVL_MSEC added, as a fine-grained
+ counterpart to ZMQ_RECOVERY_IVL (for multicast transports).
- This feature allows for seamless zero-copy message passing when data are
- scattered in memory, and is an important building block for multi-hop
- messaging topologies.
+* If memory is exhausted, 0MQ warns with an explicit message before
+ aborting the process.
-* Context termination and ETERM. The zmq_term() function has been
- changed to interrupt any blocking operations on open sockets, causing them to
- return the newly defined ETERM error code. This allows for orderly
- application termination, especially when multiple application threads are
- involved.
+Bug fixes
+---------
+* 0MQ no longer asserts in mailbox.cpp when multiple peers connect with
+ the same identity.
-0MQ version 2.0.6 (Beta), released on 2010/03/16
-================================================
+* 0MQ no longer asserts when rejecting an oversized message.
+* 0MQ no longer asserts in pipe.cpp when the swap fills up.
-Distribution
-------------
+* zmq_poll now works correctly with an empty poll set.
-* The 0MQ core distribution has been slimmed down to include only the core
- C library and C++ language binding. Pointers to other language bindings can
- be found on the website. Examples have also been removed from the
- core and can be found elsewhere. Performance tests specific to a language
- binding can be found bundled with that language binding.
+* Many more.
-* The 0MQ reference manual supplied with the distribution has been
- extensively rewritten, and is now provided in HTML as well as UNIX
- manpage format.
+Building
+--------
-* Commencing with this release, a 0MQ version numbering scheme has been
- introduced. The numbering scheme used is MAJOR.MINOR.PATCH. The "Beta" or
- "Stable" label is informative only and does not constitute
- part of the library version number, therefore this release is numbered
- 2.0.6 as the sixth release of 2.0.
+* 0MQ now builds correctly on CentOS, Debian 6, and SunOS/gcc3.
-* The version of OpenPGM bundled with 0MQ has been updated to the stable
- 2.0.24 release.
+* Added WithOpenPGM configuration into MSVC builds.
+Known issues
+------------
-Building
---------
+* OpenPGM integration is still not fully stable.
-* Many portability fixes, including support for new platforms: FreeBSD,
- NetBSD, HP-UX and Cygwin.
-* Invocation of configure has been simplified, all functionality is now
- built by default with the exception of OpenPGM.
+0MQ version 2.1.0 (Beta), released on 2010/12/01
+================================================
+New functionality
+-----------------
-Interface
----------
+* New semantics for zmq_close () and zmq_term () ensure that all messages
+ are sent before the application terminates. This behaviour may be
+ modified using the new ZMQ_LINGER socket option; for further details
+ refer to the reference manual.
-* The udp transport has been renamed to epgm to avoid confusion with
- unreliable unicast.
+* The new socket options ZMQ_FD and ZMQ_EVENTS provide a way to integrate
+ 0MQ sockets into existing poll/event loops.
-* A ZMQ_POLLERR constant has been added to allow for polling on errors on
- Berkeley sockets with zmq_poll().
+* Sockets may now be migrated between OS threads, as long as the
+ application ensures that a full memory barrier is issued.
-* The zmq_version() function has been introduced and returns the version
- number of the 0MQ library.
+* The 0MQ ABI exported by libzmq.so has been formalised; DSO symbol
+ visibility is used on supported platforms to ensure that only public ABI
+ symbols are exported. The library ABI version has been set to 1.0.0 for
+ this release.
-* The zmq_flush() function and ZMQ_NOFLUSH flag of zmq_send() have been
- deprecated and will be removed in a future release.
+* OpenPGM has been updated to version 5.0.92. This version no longer
+ depends on GLIB, and integration with 0MQ should be much improved.
+* zmq_poll() now honors timeouts precisely, and no longer returns if no
+ events are signaled.
-Wire format
------------
+* Blocking calls now return EINTR if interrupted by the delivery of a
+ signal; this also means that language bindings which previously had
+ problems with handling SIGINT/^C should now work correctly.
-* The 0MQ wire format has been changed. A flags field has been added to
- allow for future extensions.
+* The ZMQ_TYPE socket option was added; this allows retrieval of the socket
+ type after creation.
+* Added a ZMQ_VERSION macro to zmq.h for compile-time API version
+ detection.
-New functionality
------------------
+* The ZMQ_RECONNECT_IVL and ZMQ_BACKLOG socket options have been added.
-* The experimental ZMQ_P2P socket type has been implemented.
+Bug fixes
+---------
-* Flow control has been implemented for all socket types. For details see
- the ZMQ_HWM and ZMQ_LWM socket options.
+* Forwarder and streamer devices now handle multi-part messages correctly.
-* Subscription filters are internally matched with O(1) complexity.
+* 0MQ no longer asserts when malformed data is received on the wire.
+* 0MQ internal timers now work correctly if the TSC jumps backwards.
-Licensing
----------
+* The internal signalling functionality (mailbox) has been improved
+ to automatically resize socket buffers on POSIX systems.
-* iMatix corporation has granted the following exception regarding static
- linking with the 0MQ library:
+* Many more.
- As a special exception, iMatix gives you permission to link this
- library with independent modules to produce an executable,
- regardless of the license terms of these independent modules, and
- to copy and distribute the resulting executable under terms of
- your choice, provided that you also meet, for each linked
- independent module, the terms and conditions of the license of
- that module. An independent module is a module which is not
- derived from or based on this library. If you modify this
- library, you must extend this exception to your version of the
- library.
+Building
+--------
+* 0MQ now builds correctly with many more non-GCC compilers (Sun Studio,
+ Intel ICC, CLang).
-Thanks to
----------
+* AIX and HP-UX builds should work now.
-This release of 0MQ was made possible by many contributors from the community,
-including:
+* FD_SETSIZE has been set to 1024 by default for MSVC builds.
-* Adrian von Bidder <avbidder@fortytwo.ch>, for contributing Debian packages.
+* Windows builds using GCC (MinGW) now work out of the box.
+
+Distribution
+------------
-* Aleksey Yeschenko <aleksey@yeschenko.com>, for contributing a Lua binding.
-
-* Alessio Spadaro <alessio.spadaro@finservice.com>, for help with porting to
- HP-UX.
-
-* Bernd Prager <bernd@prager.ws>, for help with porting to Cygwin.
-
-* Brian E. Granger <ellisonbg@gmail.com>, for maintaining the Python binding.
-
-* Martin Hurton <hurtonm@gmail.com>, for implementing flow control.
-
-* Martin Lucina <mato@kotelna.sk>, for rewriting the 0MQ reference manual and
- many portability fixes.
-
-* Michael Santy <Michael.Santy@dynetics.com>, for testing this release with
- Infiniband.
-
-* Steven McCoy <steven@miru.hk>, for help with OpenPGM.
-
-* Toralf Wittner <toralf.wittner@gmail.com>, for contributing a Haskell
- binding.
-
--------------------------------------------------------------------------------
-
-Version 2.0-beta2
-
-ZMQII-29 Add timeout to zmq_poll function
-ZMQII-30 Build fails on MacOS X
-ZMQII-31 memory leak in zmq_poll (on timeout)
-ZMQII-33 zmq_poll may exceed timeout if signal interrupts the waiting
-ZMQII-34 ensure that poll won't return POLLIN event when the message will be filtered out anyway
-ZMQII-36 Chat example & forwarder broken because of changes subscribe semantics
-ZMQII-37 SIGSEGV when polling on REQ socket
-ZMQII-38 Compiler complains about missing virtual constructors
-ZMQII-39 Implement IPC transport
-
-Version 2.0-beta1
-
-ZMQII-27 Allow setting SNDBUF and RCVBUF size from 0MQ API
-ZMQII-22 Deadlock on zmq_close
-ZMQII-25 Implement streamed request/reply
-ZMQII-24 SEGFAULT when anonymous session disconnects
-ZMQII-26 Use zero-copy for large messages
-ZMQII-19 add --disable-eventfd configure option
-
-Version 2.0-alpha3
-
-ZMQII-17 Allow multiple senders for sigle mcast group aka multicast bus.
-ZMQII-16 Change "struct zmq_msg_t" to "zmq_msg_t" in C binding.
-ZMQII-15 Implement REQ/REP sockets.
-ZMQII-14 Change default for ZMQ_MCAST_LOOP to true.
-
-Version 2.0-alpha2
-
-ZMQII-11 Implement forwarder device
-ZMQII-10 Make connections interrupted during the init phase be closed silently
-ZMQII-8 Failure during orphan pipe deallocation
-ZMQII-7 Pipe detach fails on shutdown
-ZMQII-6 connection refused in tcp_connecter::connect leads to assert
-ZMQII-5 Only one consumer in a process gets the message
-ZMQII-4 Failure in dev/poll poller
-ZMQII-3 Implement message filtering
-ZMQII-2 SIGSEGV in zmq_connecter_init_t::read
-ZMQII-1 Win32 - failure on shutdown
-
-Version 2.0-alpha1
-
-Large scale refactoring of the code and new socket-like API.
-
-Version 1.0.1
-
-ZMQ-289 Return -1 from bind when remote object is not registered in zmq_server
-ZMQ-288 Return -1 from create_exchange /queue when object can not be created
-ZMQ-287 Disabling receiving messages from queue
-ZMQ-286 create handle_t class with == and != operators
-ZMQ-285 multiple listeners listening on the same machine with UDP encap.
-ZMQ-284 mask function inaccessible via Java on Windows
-ZMQ-283 Lua binding for 0MQ
-ZMQ-282 Cannot send message containing zero byte via Ruby
-ZMQ-281 Publisher restart fails on PGM and Win/Linux
-ZMQ-280 Broken build using MSVC 2005
-ZMQ-278 Load-balancing exchange doesn't load balance
-ZMQ-277 TCL binding
-ZMQ-276 Check for pkg-config in autogen.sh script
-ZMQ-275 Check for eventfd by running test program during ./configure
-ZMQ-274 can not compile estimate_cpu_freq with PERF_CPU_FREQUENCY set
-ZMQ-273 gcc (GCC) 4.4.0 invalid conversion from const char* to char*
-ZMQ-272 make sure message content is created properly
-
-Version 1.0.0
-
-ZMQ-271 Build OpenPGM with 0MQ build system
-ZMQ-270 0MQ windows pgm support
-ZMQ-269 Constness is better for the zmq_send data_ argument
-ZMQ-267 assert in api_thread.cpp384 void zmqapi_thread_tprocess_command
-ZMQ-266 Memory coruption in api_thread_tcreate
-ZMQ-265 Missing librbzmq.vcproj file
-ZMQ-264 Java examples can not be run on OpenVMS
-ZMQ-263 Warning preventing compilation of chat example
-ZMQ-262 CLONE -QNX port -- working in 6.4.0?
-ZMQ-261 add --with-rubydir configure option
-ZMQ-260 syntax error caught by gcc 4.4
-ZMQ-253 Allow to establish arbitrary AMQP wiring on connection startup
-ZMQ-249 Handle EAGAIN and EWOULDBLOCK as the same error
-ZMQ-248 Call in/out events directly from I/O thread
-ZMQ-247 Move physical thread from poller to individual I/O threads
-ZMQ-240 Pack Java classes into a .jar
-ZMQ-239 make --with-clr imply --with-c
-ZMQ-237 Java extension not working with Win32 package
-ZMQ-235 JAVA build fails if PATH is not set to JDK/bin
-ZMQ-228 Make java documentation via JavaDoc
-ZMQ-226 Move Jzmq to org.zmq package
-ZMQ-204 Use non-blocking accept
-ZMQ-130 Optimise mux_t for large number of idle connections
-
-Version 0.6.1
-
-ZMQ-254 Race condition in pipe_twriter_terminated
-ZMQ-255 Python perf tests broken
-ZMQ-257 pgm build fails various declared errors
-ZMQ-259 Ruby extension for libzmq
-
-Version 0.6
-
-ZMQ-73 Redesign MT throughput test
-ZMQ-102 Move load-balancing functionality from 0.3.3 branch to the trunk
-ZMQ-136 Check I/O threads for rm_fd(x) followed by add_fd(x) behavior
-ZMQ-138 Avoid exporting 0MQ symbols from libs using 0MQ on Windows
-ZMQ-147 Python app hang-up, unresponsive to Ctrl+C
-ZMQ-164 Add reconnection functionality to PGM
-ZMQ-166 Slow down the reconnection process
-ZMQ-176 Update examples to reflect the auto-reconnect feature
-ZMQ-179 Implement OS-agnostic time measurement
-ZMQ-180 What happens if queue is full & disconnection occurs?
-ZMQ-183 Change OpenPGM to PGM in build options
-ZMQ-185 Move msg_store to the trunk
-ZMQ-186 Write an example to demonstrate load-balancing
-ZMQ-187 Declaring same object (exchange, queue) twice doesn't fail
-ZMQ-188 Schemas used by global object URIs don't conform to RFC3986
-ZMQ-190 Compile libdnzmq with /clr support (no old syntax)
-ZMQ-193 Reconnect on Solaris platform not working
-ZMQ-194 Let sender use RDTSC mechanism for command throttling in MSVC build
-ZMQ-195 Failure during fg
-ZMQ-196 System out of sockets after number of reconnections
-ZMQ-197 Offload signal handling from I/O threads
-ZMQ-198 Timers can never expire
-ZMQ-199 Make receive in libczmq zero-copy
-ZMQ-200 Virtualise global locator
-ZMQ-202 Check out SCTP support on QNX
-ZMQ-203 Add auto-reconnect to AMQP engine
-ZMQ-205 Check handling of async errors on a socket
-ZMQ-206 Make zmq_server not to drop the endpoint info on service disconnect
-ZMQ-207 zmq_server should be able to read endpoint info from XML file
-ZMQ-210 Switch perf tests to load-balancing mode
-ZMQ-211 Port Data Dam functionality to Win32
-ZMQ-212 Integrate add and inc in atomic_counter into a single function
-ZMQ-213 When 0MQ infrastructure is terminated, sockets are not closed correctly
-ZMQ-215 Java on Win32 platform not stopping in case of assertion
-ZMQ-217 zmq_server can be crashed by incorect input data
-ZMQ-218 C# integration not working anymore
-ZMQ-219 Change .NET extesnsion to use CamelCase
-ZMQ-220 Check whether individual APIs conforms to API guidelines document
-ZMQ-221 Allow to create global object w/o specifying the location
-ZMQ-222 SPARC code for atomic_counter broken
-ZMQ-223 Rename czmq/jzmq/dnzmq etc. to simple "zmq"
-ZMQ-225 Application fails when it's connected from telnet
-
-Version 0.5
-
-ZMQ-17 look at pgm_transport_set_recv_only and ...send_only
-ZMQ-26 Allow for "any" network interface
-ZMQ-31 Implement SCTP support
-ZMQ-45 Normalise API vs. I/O thread
-ZMQ-78 Make connection establishment asynchronous
-ZMQ-79 Refactor handling of broken connections
-ZMQ-100 Move flow control and queue limits from 0.3.3 branch to the trunk
-ZMQ-101 Move reconnection functionality from 0.3.3 branch to the trunk
-ZMQ-112 build via cmake (makefile generator)
-ZMQ-115 Identify SPARC V9 microarc and/or availability of CAS instruction
-ZMQ-116 Implement .NET extension
-ZMQ-129 Make engine_source part of the polling object
-ZMQ-139 /dev/poll introduces latency on Solaris
-ZMQ-144 Investigate latency impact of using eventfd instead of socketpair on Linux
-ZMQ-146 Check whether i386 and x86_64 in atomic_ptr can be unified
-ZMQ-148 Change watermarks from int to uint64_t
-ZMQ-149 Virtualise creation of 0MQ connections
-ZMQ-150 Negative numbers in unsigned type in atomic_counter
-ZMQ-151 Modify build system to build SCTP extension
-ZMQ-152 Merge BP/PGM functionality into the trunk
-ZMQ-153 compiler warnings on solaris
-ZMQ-155 Build libzmq with sctp support witch cmake
-ZMQ-160 Get rid of create functions in engines
-ZMQ-162 CMakeLists.txt files not updated with latest changes
-ZMQ-165 Implement reconnection notifications
-ZMQ-169 Return queue id from receive function in libpyzmq
-ZMQ-171 Add AMQP support to 0MQ
-ZMQ-173 Throughput test should accept 2 interface specifications
-ZMQ-174 When application is killed on Win32, zmq_server fails
-ZMQ-175 Chatroom example doesn't pass messages after reconnection
-ZMQ-177 Update language extensions to take advantage of auto-reconnect
-ZMQ-181 Rafactor the code to support multiple notification types
-
-Version 0.4
-
-ZMQ-21 Clean up the command passing code
-ZMQ-36 autogen/configure fails on Solaris
-ZMQ-39 Check whether using CAS for btsr and izte on x86 platform improves latency
-ZMQ-40 Check autogen on FreeBSD
-ZMQ-41 Check autogen on OS X
-ZMQ-43 Use +m instead of memory in atomic operations
-ZMQ-46 Get rid of administrative pseudo-thread
-ZMQ-63 -mcpu=v9 CPPFLAG should be used only at sparc achitecture
-ZMQ-64 gcc 3.4.3 on opensolaris complains about -mcpu flag
-ZMQ-65 No error report when host name resolving fails
-ZMQ-66 Several files use atoi without including stdlib.h
-ZMQ-69 Make stdint.hpp hand-written rather than generated
-ZMQ-71 Virtualise thread management
-ZMQ-72 Remove platform.hpp
-ZMQ-74 Implement win32 version of tcp_socket and tcp_listener
-ZMQ-75 Virtualise mutexes
-ZMQ-76 Implement win32 version of ysemaphore_t
-ZMQ-80 Virtualise polling mechanisms
-ZMQ-81 Implement 'select' polling mechanism
-ZMQ-82 Rename i_context to i_thread
-ZMQ-83 "Resource temporarily unavailable" when running on 266MHz box
-ZMQ-84 zmq_server stops to respond
-ZMQ-89 Make i_pollable derived from i_engine
-ZMQ-94 Report error when malloc fails
-ZMQ-95 Add /dev/poll method of polling
-ZMQ-96 Add support for kqueue method of polling
-ZMQ-97 OpenBSD port
-ZMQ-98 QNX port
-ZMQ-99 use pyexec_LTLIBRARIES primary for libpyzmq
-ZMQ-103 Use non blocking sockets
-ZMQ-106 memory leak when sending message from Java
-ZMQ-111 Get rid of speculative operations
-ZMQ-113 Windows compiler (_MSC_VER 1310) doesn't support strncpy_s function
-ZMQ-117 select_thread doesn't implement rm_fd function
-ZMQ-119 select thread fails on shudown
-ZMQ-121 Fix all I/O threads to handle rm_fd correctly
-ZMQ-124 include gaurd is wrong
-ZMQ-126 Refactor I/O threads implementation to avoid duplication of common functionality.
-ZMQ-131 select_thread fails on Windows
-ZMQ-132 Pointer to poller_t is used before it is fully initialised
-ZMQ-134 Thread management in constructors/destructors
-ZMQ-135 Move retired list to the polling strategy-specific object
-ZMQ-137 Assertion fails at bp_engine, line 132, error_handler is not set
-
-Version 0.3.2
-
-ZMQ-54 Test programs are compiled with --rpath
-
-Version 0.3.1
-
-ZMQ-25 Allow to use network interface name instead of IP address
-ZMQ-29 Implement speculative write to socket
-ZMQ-33 Assign ports to global objects automatically
-ZMQ-34 Message size of zero causes application to hang up
-ZMQ-42 Change locators to deal with a single object type
-ZMQ-44 Some of the objects have non-functional auto-generated copy constructors
-ZMQ-47 Camera example is broken
-ZMQ-48 Sender fails when receiver disconnects
-ZMQ-50 Warning in chat example
-ZMQ-51 Make it possible to use single include (zmq.hpp) for client apps
-ZMQ-53 Segmentation fault when binding to non-existent queue
-ZMQ-55 raw_message_init (data,size,ffn) allocates more memory than needed
-ZMQ-56 zmq_server fails if too many apps disconnect abruptly
-ZMQ-58 Implement C binding for 0MQ
-ZMQ-59 Implement Java binding for 0MQ
-ZMQ-60 Implement Python binding for 0MQ
-ZMQ-62 Write man pages
-
-Version 0.3
-
-ZMQ-1 poll_thread hangs in destructor
-ZMQ-4 Missing -D_REENTRANT command line parameter while compiling 0MQ
-ZMQ-5 Check for buffer overflows in AMQP/0-9 marshaller/unmarshaller
-ZMQ-6 Allow dynamic adding of engines to poll_thread
-ZMQ-7 Implement dynamic assignment of engine IDs to engines
-ZMQ-9 Implement event batching in ysocketpair
-ZMQ-10 Remove remaining references to HAVE_CONFIG_H from the code
-ZMQ-11 Move 'alive' flag to the dispatcher
-ZMQ-12 Move dispatcher signalers into a separate array
-ZMQ-13 Allow up to 63 threads on x86_64 platform
-ZMQ-14 Implement new type of lock-free pipe
-ZMQ-15 Implement an infrastructure to pass arbitrary commands between threads
-ZMQ-16 missing stats_raw_den.R, stats_raw_lat.R in dist package
-ZMQ-20 Sync problem with ypollset/atomic_bitmap
-ZMQ-24 Redundant poll
-ZMQ-30 Implement epoll suport
-ZMQ-37 Identify SPARC V9 microarc and/or availability of CAS instruction
-
-Version 0.2
-
-ZMQ-2 Failure when mutexes are used atomic_uint32
-ZMQ-3 socket hangup at OS X
+* A simple framework for regression tests has been added, along with a few
+ basic self-tests. The tests can be run using "make check".
diff --git a/README b/README
index 65b774a..dd9ec9f 100644
--- a/README
+++ b/README
@@ -18,15 +18,16 @@ See the INSTALL file included with the distribution.
Resources
---------
-Extensive documentation is provided with the distribution. Refer to
-doc/zmq.html, or "man zmq" after you have installed 0MQ on your system.
+A reference manual is provided with the distribution. Refer to "man zmq"
+after you have installed 0MQ on your system, or see http://api.zeromq.org.
Website: http://www.zeromq.org/
Development mailing list: zeromq-dev@lists.zeromq.org
Announcements mailing list: zeromq-announce@lists.zeromq.org
-Git repository: http://github.com/zeromq/zeromq2
+Git repository for this release: http://github.com/zeromq/zeromq2-1.
+Repository for current development: http://github.com/zeromq/zeromq2.
0MQ developers can also be found on the IRC channel #zeromq, on the
Freenode network (irc.freenode.net).
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..1257c9e
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,540 @@
+dnl ##############################################################################
+dnl # AC_ZMQ_CONFIG_LIBTOOL #
+dnl # Configure libtool. Requires AC_CANONICAL_HOST #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CONFIG_LIBTOOL], [{
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ # Libtool configuration for different targets
+ case "${host_os}" in
+ *mingw32*|*cygwin*)
+ # Disable static build by default
+ AC_DISABLE_STATIC
+ ;;
+ *)
+ # Everything else with static enabled
+ AC_ENABLE_STATIC
+ ;;
+ esac
+}])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_CHECK_LANG_ICC([action-if-found], [action-if-not-found]) #
+dnl # Check if the current language is compiled using ICC #
+dnl # Adapted from http://software.intel.com/en-us/forums/showthread.php?t=67984 #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_LANG_ICC],
+ [AC_CACHE_CHECK([whether we are using Intel _AC_LANG compiler],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler],
+ [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+[[#ifndef __INTEL_COMPILER
+ error if not ICC
+#endif
+]])],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="yes" ; $1],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="no" ; $2])
+])])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_CHECK_LANG_SUN_STUDIO([action-if-found], [action-if-not-found]) #
+dnl # Check if the current language is compiled using Sun Studio #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_LANG_SUN_STUDIO],
+ [AC_CACHE_CHECK([whether we are using Sun Studio _AC_LANG compiler],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler],
+ [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+[[#if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C)
+ error if not sun studio
+#endif
+]])],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="yes" ; $1],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="no" ; $2])
+])])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_CHECK_LANG_CLANG([action-if-found], [action-if-not-found]) #
+dnl # Check if the current language is compiled using clang #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_LANG_CLANG],
+ [AC_CACHE_CHECK([whether we are using clang _AC_LANG compiler],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler],
+ [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+[[#ifndef __clang__
+ error if not clang
+#endif
+]])],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="yes" ; $1],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="no" ; $2])
+])])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) #
+dnl # Check if the current language is compiled using clang #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_LANG_GCC4],
+ [AC_CACHE_CHECK([whether we are using gcc >= 4 _AC_LANG compiler],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler],
+ [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+[[#if (!defined __GNUC__ || __GNUC__ < 4)
+ error if not gcc4 or higher
+#endif
+]])],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="yes" ; $1],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="no" ; $2])
+])])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_CHECK_DOC_BUILD #
+dnl # Check whether to build documentation and install man-pages #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_DOC_BUILD], [{
+ # Allow user to disable doc build
+ AC_ARG_WITH([documentation], [AS_HELP_STRING([--without-documentation],
+ [disable documentation build even if asciidoc and xmlto are present [default=no]])])
+
+ if test "x$with_documentation" = "xno"; then
+ ac_zmq_build_doc="no"
+ ac_zmq_install_man="no"
+ else
+ # Determine whether or not documentation should be built and installed.
+ ac_zmq_build_doc="yes"
+ ac_zmq_install_man="yes"
+ # Check for asciidoc and xmlto and don't build the docs if these are not installed.
+ AC_CHECK_PROG(ac_zmq_have_asciidoc, asciidoc, yes, no)
+ AC_CHECK_PROG(ac_zmq_have_xmlto, xmlto, yes, no)
+ if test "x$ac_zmq_have_asciidoc" = "xno" -o "x$ac_zmq_have_xmlto" = "xno"; then
+ ac_zmq_build_doc="no"
+ # Tarballs built with 'make dist' ship with prebuilt documentation.
+ if ! test -f doc/zmq.7; then
+ ac_zmq_install_man="no"
+ AC_MSG_WARN([You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed.])
+ AC_MSG_WARN([Documentation will not be built and manual pages will not be installed.])
+ fi
+ fi
+
+ # Do not install man pages if on mingw
+ if test "x$ac_zmq_on_mingw32" = "xyes"; then
+ ac_zmq_install_man="no"
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to build documentation])
+ AC_MSG_RESULT([$ac_zmq_build_doc])
+
+ AC_MSG_CHECKING([whether to install manpages])
+ AC_MSG_RESULT([$ac_zmq_install_man])
+
+ AM_CONDITIONAL(BUILD_DOC, test "x$ac_zmq_build_doc" = "xyes")
+ AM_CONDITIONAL(INSTALL_MAN, test "x$ac_zmq_install_man" = "xyes")
+}])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_CHECK_LANG_COMPILER([action-if-found], [action-if-not-found]) #
+dnl # Check that compiler for the current language actually works #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_LANG_COMPILER], [{
+ # Test that compiler for the current language actually works
+ AC_CACHE_CHECK([whether the _AC_LANG compiler works],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_compiler_works],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="yes" ; $1],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="no" ; $2])
+ ])
+
+ if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_compiler_works" != "xyes"; then
+ AC_MSG_ERROR([Unable to find a working _AC_LANG compiler])
+ fi
+}])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_CHECK_COMPILERS #
+dnl # Check compiler characteristics. This is so that we can AC_REQUIRE checks #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_COMPILERS], [{
+ # For that the compiler works and try to come up with the type
+ AC_LANG_PUSH([C])
+ AC_ZMQ_CHECK_LANG_COMPILER
+
+ AC_ZMQ_CHECK_LANG_ICC
+ AC_ZMQ_CHECK_LANG_SUN_STUDIO
+ AC_ZMQ_CHECK_LANG_CLANG
+ AC_ZMQ_CHECK_LANG_GCC4
+ AC_LANG_POP([C])
+
+ AC_LANG_PUSH(C++)
+ AC_ZMQ_CHECK_LANG_COMPILER
+
+ AC_ZMQ_CHECK_LANG_ICC
+ AC_ZMQ_CHECK_LANG_SUN_STUDIO
+ AC_ZMQ_CHECK_LANG_CLANG
+ AC_ZMQ_CHECK_LANG_GCC4
+ AC_LANG_POP([C++])
+
+ # Set GCC and GXX variables correctly
+ if test "x$GCC" = "xyes"; then
+ if test "xyes" = "x$ac_zmq_cv_c_intel_compiler"; then
+ GCC="no"
+ fi
+ fi
+
+ if test "x$GXX" = "xyes"; then
+ if test "xyes" = "x$ac_zmq_cv_cxx_intel_compiler"; then
+ GXX="no"
+ fi
+ fi
+}])
+
+dnl ############################################################################
+dnl # AC_ZMQ_CHECK_LANG_FLAG([flag], [action-if-found], [action-if-not-found]) #
+dnl # Check if the compiler supports given flag. Works for C and C++ #
+dnl # Sets ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no #
+dnl ############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_LANG_FLAG], [{
+
+ AC_REQUIRE([AC_PROG_GREP])
+
+ AC_MSG_CHECKING([whether _AC_LANG compiler supports $1])
+
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag
+ ac_[]_AC_LANG_ABBREV[]_werror_flag="yes"
+
+ case "x[]_AC_LANG_ABBREV" in
+ xc)
+ ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ ;;
+ xcxx)
+ ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $1"
+ ;;
+ *)
+ AC_MSG_WARN([testing compiler characteristic on an unknown language])
+ ;;
+ esac
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ # 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 AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no"
+ else
+ eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="yes"
+ fi],
+ [eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no"])
+
+ case "x[]_AC_LANG_ABBREV" in
+ xc)
+ CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS"
+ ;;
+ xcxx)
+ CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS"
+ ;;
+ *)
+ # nothing to restore
+ ;;
+ esac
+
+ # Restore the werror flag
+ ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save
+
+ # Call the action as the flags are restored
+ AS_IF([eval test x$]AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"],
+ [AC_MSG_RESULT(yes) ; $2], [AC_MSG_RESULT(no) ; $3])
+
+}])
+
+dnl ####################################################################################
+dnl # AC_ZMQ_CHECK_LANG_FLAG_PREPEND([flag], [action-if-found], [action-if-not-found]) #
+dnl # Check if the compiler supports given flag. Works for C and C++ #
+dnl # This macro prepends the flag to CFLAGS or CPPFLAGS accordingly #
+dnl # Sets ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no #
+dnl ####################################################################################
+AC_DEFUN([AC_ZMQ_CHECK_LANG_FLAG_PREPEND], [{
+ AC_ZMQ_CHECK_LANG_FLAG([$1])
+ case "x[]_AC_LANG_ABBREV" in
+ xc)
+ AS_IF([eval test x$]AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"],
+ [CFLAGS="$1 $CFLAGS"; $2], $3)
+ ;;
+ xcxx)
+ AS_IF([eval test x$]AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"],
+ [CPPFLAGS="$1 $CPPFLAGS"; $2], $3)
+ ;;
+ esac
+}])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_CHECK_ENABLE_DEBUG([action-if-found], [action-if-not-found]) #
+dnl # Check whether to enable debug build and set compiler flags accordingly #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_ENABLE_DEBUG], [{
+
+ # Require compiler specifics
+ AC_REQUIRE([AC_ZMQ_CHECK_COMPILERS])
+
+ # This flag is checked also in
+ AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
+ [Enable debugging information [default=no]])])
+
+ AC_MSG_CHECKING(whether to enable debugging information)
+
+ if test "x$enable_debug" = "xyes"; then
+
+ # GCC, clang and ICC
+ if test "x$GCC" = "xyes" -o \
+ "x$ac_zmq_cv_c_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_c_clang_compiler" = "xyes"; then
+ CFLAGS="-g -O0 "
+ elif test "x$ac_zmq_cv_c_sun_studio_compiler" = "xyes"; then
+ CFLAGS="-g0 "
+ fi
+
+ # GCC, clang and ICC
+ if test "x$GXX" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then
+ CPPFLAGS="-g -O0 "
+ CXXFLAGS="-g -O0 "
+ # Sun studio
+ elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then
+ CPPFLAGS="-g0 "
+ CXXFLAGS="-g0 "
+ fi
+
+ if test "x$ZMQ_ORIG_CFLAGS" != "xnone"; then
+ CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}"
+ fi
+ if test "x$ZMQ_ORIG_CPPFLAGS" != "xnone"; then
+ CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}"
+ fi
+ if test "x$ZMQ_ORIG_CXXFLAGS" != "xnone"; then
+ CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}"
+ fi
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+}])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_CHECK_WITH_FLAG([flags], [macro]) #
+dnl # Runs a normal autoconf check with compiler flags #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_CHECK_WITH_FLAG], [{
+ ac_zmq_check_with_flag_save_CFLAGS="$CFLAGS"
+ ac_zmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS"
+
+ CFLAGS="$CFLAGS $1"
+ CPPFLAGS="$CPPFLAGS $1"
+
+ # Execute the macro
+ $2
+
+ CFLAGS="$ac_zmq_check_with_flag_save_CFLAGS"
+ CPPFLAGS="$ac_zmq_check_with_flag_save_CPPFLAGS"
+}])
+
+dnl ##############################################################################
+dnl # AC_ZMQ_LANG_WALL([action-if-found], [action-if-not-found]) #
+dnl # How to define -Wall for the current compiler #
+dnl # Sets ac_zmq_cv_[]_AC_LANG_ABBREV[]__wall_flag variable to found style #
+dnl ##############################################################################
+AC_DEFUN([AC_ZMQ_LANG_WALL], [{
+
+ AC_MSG_CHECKING([how to enable additional warnings for _AC_LANG compiler])
+
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag=""
+
+ # C compilers
+ case "x[]_AC_LANG_ABBREV" in
+ xc)
+ # GCC, clang and ICC
+ if test "x$GCC" = "xyes" -o \
+ "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall"
+ # Sun studio
+ elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-v"
+ fi
+ ;;
+ xcxx)
+ # GCC, clang and ICC
+ if test "x$GXX" = "xyes" -o \
+ "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall"
+ # Sun studio
+ elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="+w"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ # Call the action
+ if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" != "x"; then
+ AC_MSG_RESULT([$ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag])
+ $1
+ else
+ AC_MSG_RESULT([not found])
+ $2
+ fi
+}])
+
+dnl ####################################################################
+dnl # AC_ZMQ_LANG_STRICT([action-if-found], [action-if-not-found]) #
+dnl # Check how to turn on strict standards compliance #
+dnl ####################################################################
+AC_DEFUN([AC_ZMQ_LANG_STRICT], [{
+ AC_MSG_CHECKING([how to enable strict standards compliance in _AC_LANG compiler])
+
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag=""
+
+ # C compilers
+ case "x[]_AC_LANG_ABBREV" in
+ xc)
+ # GCC, clang and ICC
+ if test "x$GCC" = "xyes" -o "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic"
+ elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi"
+ # Sun studio
+ elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-Xc"
+ fi
+ ;;
+ xcxx)
+ # GCC, clang and ICC
+ if test "x$GXX" = "xyes" -o "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic"
+ elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi"
+ # Sun studio
+ elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-compat=5"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ # Call the action
+ if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag" != "x"; then
+ AC_MSG_RESULT([$ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag])
+ $1
+ else
+ AC_MSG_RESULT([not found])
+ $2
+ fi
+}])
+
+dnl ########################################################################
+dnl # AC_ZMQ_LANG_WERROR([action-if-found], [action-if-not-found]) #
+dnl # Check how to turn warnings to errors #
+dnl ########################################################################
+AC_DEFUN([AC_ZMQ_LANG_WERROR], [{
+ AC_MSG_CHECKING([how to turn warnings to errors in _AC_LANG compiler])
+
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag=""
+
+ # C compilers
+ case "x[]_AC_LANG_ABBREV" in
+ xc)
+ # GCC, clang and ICC
+ if test "x$GCC" = "xyes" -o "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror"
+ # Sun studio
+ elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all"
+ fi
+ ;;
+ xcxx)
+ # GCC, clang and ICC
+ if test "x$GXX" = "xyes" -o "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror"
+ # Sun studio
+ elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ # Call the action
+ if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag" != "x"; then
+ AC_MSG_RESULT([$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag])
+ $1
+ else
+ AC_MSG_RESULT([not found])
+ $2
+ fi
+}])
+
+dnl ################################################################################
+dnl # AC_ZMQ_CHECK_LANG_PRAGMA([pragma], [action-if-found], [action-if-not-found]) #
+dnl # Check if the compiler supports given pragma #
+dnl ################################################################################
+AC_DEFUN([AC_ZMQ_CHECK_LANG_PRAGMA], [{
+ # Need to know how to enable all warnings
+ AC_ZMQ_LANG_WALL
+
+ AC_MSG_CHECKING([whether _AC_LANG compiler supports pragma $1])
+
+ # Save flags
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag
+ ac_[]_AC_LANG_ABBREV[]_werror_flag="yes"
+
+ if test "x[]_AC_LANG_ABBREV" = "xc"; then
+ ac_zmq_cv_check_lang_pragma_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag"
+ elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then
+ ac_zmq_cv_check_lang_pragma_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag"
+ else
+ AC_MSG_WARN([testing compiler characteristic on an unknown language])
+ fi
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#pragma $1]])],
+ [eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="yes" ; AC_MSG_RESULT(yes)],
+ [eval AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="no" ; AC_MSG_RESULT(no)])
+
+ if test "x[]_AC_LANG_ABBREV" = "xc"; then
+ CFLAGS="$ac_zmq_cv_check_lang_pragma_save_CFLAGS"
+ elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then
+ CPPFLAGS="$ac_zmq_cv_check_lang_pragma_save_CPPFLAGS"
+ fi
+
+ ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save
+
+ # Call the action as the flags are restored
+ AS_IF([eval test x$]AS_TR_SH(ac_zmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)[ = "xyes"],
+ [$2], [$3])
+}])
+
+dnl ################################################################################
+dnl # AC_ZMQ_CHECK_LANG_VISIBILITY([action-if-found], [action-if-not-found]) #
+dnl # Check if the compiler supports dso visibility #
+dnl ################################################################################
+AC_DEFUN([AC_ZMQ_CHECK_LANG_VISIBILITY], [{
+
+ ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag=""
+
+ if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler" = "xyes"; then
+ AC_ZMQ_CHECK_LANG_FLAG([-fvisibility=hidden],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-fvisibility=hidden"])
+ elif test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
+ AC_ZMQ_CHECK_LANG_FLAG([-xldscope=hidden],
+ [ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-xldscope=hidden"])
+ fi
+
+ AC_MSG_CHECKING(whether _AC_LANG compiler supports dso visibility)
+
+ AS_IF([test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag" != "x"],
+ [AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2])
+}])
diff --git a/aclocal.m4 b/aclocal.m4
index f999758..a9cf856 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,170 +13,12 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-#
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# This program 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 of the License, or
-# (at your option) any later version.
-#
-# This program 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 program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=m4_default([$1], [0.9.0])
- AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- PKG_CONFIG=""
- fi
-
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists. Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
- AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
- m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
- $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
- if test -n "$$1"; then
- pkg_cv_[]$1="$$1"
- else
- PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
- [pkg_failed=yes])
- fi
-else
- pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
- _PKG_SHORT_ERRORS_SUPPORTED
- if test $_pkg_short_errors_supported = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
- else
- $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
- ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
- [AC_MSG_RESULT([no])
- $4])
-elif test $pkg_failed = untried; then
- ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
- [$4])
-else
- $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
- $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
- AC_MSG_RESULT([yes])
- ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -1028,6 +870,33 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -1176,3 +1045,4 @@ m4_include([config/ltoptions.m4])
m4_include([config/ltsugar.m4])
m4_include([config/ltversion.m4])
m4_include([config/lt~obsolete.m4])
+m4_include([acinclude.m4])
diff --git a/autogen.sh b/autogen.sh
index cab10da..2cc40b9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,5 +1,7 @@
#!/bin/sh
-# Copyright (c) 2007-2010 iMatix Corporation
+
+# Copyright (c) 2007-2011 iMatix Corporation
+# Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
#
# This file is part of 0MQ.
#
@@ -7,23 +9,17 @@
# it under the terms of the GNU 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 General Public License for more details.
-
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Script to generate all required files from fresh git checkout.
-command -v pkg-config >/dev/null 2>&1
-if [ $? -ne 0 ]; then
- echo "autogen.sh: error: could not find pkg-config. pkg-config is required to run autogen.sh." 1>&2
- exit 1
-fi
-
command -v libtool >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2
diff --git a/builds/msvc/Makefile.am b/builds/msvc/Makefile.am
index 6f20cee..9ce00aa 100644
--- a/builds/msvc/Makefile.am
+++ b/builds/msvc/Makefile.am
@@ -1,12 +1,8 @@
LIBZMQ_DIST = libzmq/libzmq.vcproj platform.hpp msvc.sln
-DEVICES_DIST = zmq_queue/zmq_queue.vcproj \
- zmq_streamer/zmq_streamer.vcproj \
- zmq_forwarder/zmq_forwarder.vcproj
-
PERF_DIST = c_local_thr/c_local_thr.vcproj \
c_remote_thr/c_remote_thr.vcproj \
c_local_lat/c_local_lat.vcproj \
c_remote_lat/c_remote_lat.vcproj
-EXTRA_DIST = $(LIBZMQ_DIST) $(DEVICES_DIST) $(PERF_DIST)
+EXTRA_DIST = $(LIBZMQ_DIST) $(PERF_DIST)
diff --git a/builds/msvc/Makefile.in b/builds/msvc/Makefile.in
index bc7333f..c3ba84f 100644
--- a/builds/msvc/Makefile.in
+++ b/builds/msvc/Makefile.in
@@ -40,20 +40,29 @@ am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
$(top_srcdir)/config/ltoptions.m4 \
$(top_srcdir)/config/ltsugar.m4 \
$(top_srcdir)/config/ltversion.m4 \
- $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.in
+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/platform.hpp
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
+ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -79,8 +88,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -92,6 +99,7 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@
LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
LIPO = @LIPO@
@@ -114,13 +122,13 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
+XMLTO = @XMLTO@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -128,6 +136,8 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@
+ac_zmq_have_xmlto = @ac_zmq_have_xmlto@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -145,12 +155,6 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
-have_asciidoc = @have_asciidoc@
-have_gzip = @have_gzip@
-have_perl = @have_perl@
-have_pkg_config = @have_pkg_config@
-have_python = @have_python@
-have_xmlto = @have_xmlto@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -160,7 +164,6 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-inttypes = @inttypes@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
@@ -171,29 +174,26 @@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pgm_basename = @pgm_basename@
+pgm_srcdir = @pgm_srcdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
-stdint = @stdint@
+subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
LIBZMQ_DIST = libzmq/libzmq.vcproj platform.hpp msvc.sln
-DEVICES_DIST = zmq_queue/zmq_queue.vcproj \
- zmq_streamer/zmq_streamer.vcproj \
- zmq_forwarder/zmq_forwarder.vcproj
-
PERF_DIST = c_local_thr/c_local_thr.vcproj \
c_remote_thr/c_remote_thr.vcproj \
c_local_lat/c_local_lat.vcproj \
c_remote_lat/c_remote_lat.vcproj
-EXTRA_DIST = $(LIBZMQ_DIST) $(DEVICES_DIST) $(PERF_DIST)
+EXTRA_DIST = $(LIBZMQ_DIST) $(PERF_DIST)
all: all-am
.SUFFIXES:
diff --git a/builds/msvc/libzmq/libzmq.vcproj b/builds/msvc/libzmq/libzmq.vcproj
index 95db1df..c774ac2 100644
--- a/builds/msvc/libzmq/libzmq.vcproj
+++ b/builds/msvc/libzmq/libzmq.vcproj
@@ -40,7 +40,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalOptions="-DDLL_EXPORT"
+ AdditionalOptions="-DDLL_EXPORT -DFD_SETSIZE=1024"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -112,7 +112,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalOptions="-DDLL_EXPORT"
+ AdditionalOptions="-DDLL_EXPORT -DFD_SETSIZE=1024"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="2"
@@ -160,6 +160,83 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="WithOpenPGM|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="copy ..\platform.hpp ..\..\..\src"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="-DDLL_EXPORT -DFD_SETSIZE=1024"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="../../../../OpenPGM/include"
+ PreprocessorDefinitions="ZMQ_HAVE_OPENPGM"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib Rpcrt4.lib libpgm.lib"
+ OutputFile="../../../lib/libzmq.dll"
+ AdditionalLibraryDirectories="../../../../OpenPGM/lib"
+ GenerateDebugInformation="true"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
@@ -170,7 +247,7 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
- RelativePath="..\..\..\src\app_thread.cpp"
+ RelativePath="..\..\..\src\clock.cpp"
>
</File>
<File
@@ -178,27 +255,39 @@
>
</File>
<File
+ RelativePath="..\..\..\src\connect_session.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\ctx.cpp"
>
</File>
<File
+ RelativePath="..\..\..\src\decoder.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\device.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\devpoll.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\push.cpp"
+ RelativePath="..\..\..\src\dist.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\epoll.cpp"
+ RelativePath="..\..\..\src\encoder.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\err.cpp"
+ RelativePath="..\..\..\src\epoll.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\forwarder.cpp"
+ RelativePath="..\..\..\src\err.cpp"
>
</File>
<File
@@ -226,7 +315,11 @@
>
</File>
<File
- RelativePath="..\..\..\src\msg_store.cpp"
+ RelativePath="..\..\..\src\mailbox.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\named_session.cpp"
>
</File>
<File
@@ -238,7 +331,7 @@
>
</File>
<File
- RelativePath="..\..\..\src\owned.cpp"
+ RelativePath="..\..\..\src\own.cpp"
>
</File>
<File
@@ -266,7 +359,7 @@
>
</File>
<File
- RelativePath="..\..\..\src\prefix_tree.cpp"
+ RelativePath="..\..\..\src\poller_base.cpp"
>
</File>
<File
@@ -274,7 +367,15 @@
>
</File>
<File
- RelativePath="..\..\..\src\queue.cpp"
+ RelativePath="..\..\..\src\pull.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\push.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\reaper.cpp"
>
</File>
<File
@@ -294,19 +395,15 @@
>
</File>
<File
- RelativePath="..\..\..\src\signaler.cpp"
- >
- </File>
- <File
RelativePath="..\..\..\src\socket_base.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\streamer.cpp"
+ RelativePath="..\..\..\src\sub.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\sub.cpp"
+ RelativePath="..\..\..\src\swap.cpp"
>
</File>
<File
@@ -326,7 +423,11 @@
>
</File>
<File
- RelativePath="..\..\..\src\pull.cpp"
+ RelativePath="..\..\..\src\transient_session.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\trie.cpp"
>
</File>
<File
@@ -334,27 +435,27 @@
>
</File>
<File
- RelativePath="..\..\..\src\xrep.cpp"
+ RelativePath="..\..\..\src\xpub.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\xreq.cpp"
+ RelativePath="..\..\..\src\xrep.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\zmq.cpp"
+ RelativePath="..\..\..\src\xreq.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\zmq_connecter.cpp"
+ RelativePath="..\..\..\src\xsub.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\zmq_decoder.cpp"
+ RelativePath="..\..\..\src\zmq.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\zmq_encoder.cpp"
+ RelativePath="..\..\..\src\zmq_connecter.cpp"
>
</File>
<File
@@ -376,7 +477,7 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
- RelativePath="..\..\..\src\app_thread.hpp"
+ RelativePath="..\..\..\src\array.hpp"
>
</File>
<File
@@ -388,6 +489,14 @@
>
</File>
<File
+ RelativePath="..\..\..\src\blob.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\clock.hpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\command.hpp"
>
</File>
@@ -396,6 +505,10 @@
>
</File>
<File
+ RelativePath="..\..\..\src\connect_session.hpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\ctx.hpp"
>
</File>
@@ -404,11 +517,15 @@
>
</File>
<File
+ RelativePath="..\..\..\src\device.hpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\devpoll.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\push.hpp"
+ RelativePath="..\..\..\src\dist.hpp"
>
</File>
<File
@@ -428,18 +545,10 @@
>
</File>
<File
- RelativePath="..\..\..\src\forwarder.hpp"
- >
- </File>
- <File
RelativePath="..\..\..\src\fq.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\i_endpoint.hpp"
- >
- </File>
- <File
RelativePath="..\..\..\src\i_engine.hpp"
>
</File>
@@ -472,11 +581,15 @@
>
</File>
<File
- RelativePath="..\..\..\src\msg_content.hpp"
+ RelativePath="..\..\..\src\likely.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\msg_store.hpp"
+ RelativePath="..\..\..\src\mailbox.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\msg_content.hpp"
>
</File>
<File
@@ -484,6 +597,10 @@
>
</File>
<File
+ RelativePath="..\..\..\src\named_session.hpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\object.hpp"
>
</File>
@@ -492,7 +609,7 @@
>
</File>
<File
- RelativePath="..\..\..\src\owned.hpp"
+ RelativePath="..\..\..\src\own.hpp"
>
</File>
<File
@@ -516,7 +633,7 @@
>
</File>
<File
- RelativePath="..\platform.hpp"
+ RelativePath="..\..\..\src\platform.hpp"
>
</File>
<File
@@ -524,7 +641,11 @@
>
</File>
<File
- RelativePath="..\..\..\src\prefix_tree.hpp"
+ RelativePath="..\..\..\src\poller.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\poller_base.hpp"
>
</File>
<File
@@ -532,7 +653,15 @@
>
</File>
<File
- RelativePath="..\..\..\src\queue.hpp"
+ RelativePath="..\..\..\src\pull.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\push.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\reaper.hpp"
>
</File>
<File
@@ -548,11 +677,11 @@
>
</File>
<File
- RelativePath="..\..\..\src\session.hpp"
+ RelativePath="..\..\..\src\semaphore.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\signaler.hpp"
+ RelativePath="..\..\..\src\session.hpp"
>
</File>
<File
@@ -564,11 +693,11 @@
>
</File>
<File
- RelativePath="..\..\..\src\streamer.hpp"
+ RelativePath="..\..\..\src\sub.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\sub.hpp"
+ RelativePath="..\..\..\src\swap.hpp"
>
</File>
<File
@@ -588,7 +717,11 @@
>
</File>
<File
- RelativePath="..\..\..\src\pull.hpp"
+ RelativePath="..\..\..\src\transient_session.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\trie.hpp"
>
</File>
<File
@@ -604,31 +737,31 @@
>
</File>
<File
- RelativePath="..\..\..\src\xrep.hpp"
+ RelativePath="..\..\..\src\xpub.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\xreq.hpp"
+ RelativePath="..\..\..\src\xrep.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\ypipe.hpp"
+ RelativePath="..\..\..\src\xreq.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\yqueue.hpp"
+ RelativePath="..\..\..\src\xsub.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\zmq_connecter.hpp"
+ RelativePath="..\..\..\src\ypipe.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\zmq_decoder.hpp"
+ RelativePath="..\..\..\src\yqueue.hpp"
>
</File>
<File
- RelativePath="..\..\..\src\zmq_encoder.hpp"
+ RelativePath="..\..\..\src\zmq_connecter.hpp"
>
</File>
<File
diff --git a/builds/msvc/msvc.sln b/builds/msvc/msvc.sln
index 42a5e36..c47f3ac 100644
--- a/builds/msvc/msvc.sln
+++ b/builds/msvc/msvc.sln
@@ -23,59 +23,61 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote_thr", "c_remote_thr\
{641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zmq_forwarder", "zmq_forwarder\zmq_forwarder.vcproj", "{EFE471DE-6747-4B2E-B084-F7E45A16CD03}"
- ProjectSection(ProjectDependencies) = postProject
- {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zmq_streamer", "zmq_streamer\zmq_streamer.vcproj", "{DF2CED64-4156-48EA-8AA3-38CF86060D59}"
- ProjectSection(ProjectDependencies) = postProject
- {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zmq_queue", "zmq_queue\zmq_queue.vcproj", "{076F7B8B-5175-4CA9-BC2B-438E37F7F43E}"
- ProjectSection(ProjectDependencies) = postProject
- {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6}
- EndProjectSection
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
+ WithOpenPGM|Win32 = WithOpenPGM|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|Win32.ActiveCfg = Debug|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|Win32.Build.0 = Debug|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.Release|Win32.ActiveCfg = Release|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.Release|Win32.Build.0 = Release|Win32
+ {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.ActiveCfg = WithOpenPGM|Win32
+ {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.Build.0 = WithOpenPGM|Win32
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|Win32.ActiveCfg = Debug|Win32
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|Win32.Build.0 = Debug|Win32
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.ActiveCfg = Release|Win32
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.Build.0 = Release|Win32
+ {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
+ {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.Build.0 = Release|Win32
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|Win32.ActiveCfg = Debug|Win32
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|Win32.Build.0 = Debug|Win32
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.ActiveCfg = Release|Win32
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.Build.0 = Release|Win32
+ {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
+ {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.Build.0 = Release|Win32
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|Win32.ActiveCfg = Debug|Win32
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|Win32.Build.0 = Debug|Win32
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.ActiveCfg = Release|Win32
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.Build.0 = Release|Win32
+ {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
+ {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.Build.0 = Release|Win32
{B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|Win32.ActiveCfg = Debug|Win32
{B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|Win32.Build.0 = Debug|Win32
{B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.ActiveCfg = Release|Win32
{B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.Build.0 = Release|Win32
+ {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
+ {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.Build.0 = Release|Win32
{EFE471DE-6747-4B2E-B084-F7E45A16CD03}.Debug|Win32.ActiveCfg = Debug|Win32
{EFE471DE-6747-4B2E-B084-F7E45A16CD03}.Debug|Win32.Build.0 = Debug|Win32
{EFE471DE-6747-4B2E-B084-F7E45A16CD03}.Release|Win32.ActiveCfg = Release|Win32
{EFE471DE-6747-4B2E-B084-F7E45A16CD03}.Release|Win32.Build.0 = Release|Win32
+ {EFE471DE-6747-4B2E-B084-F7E45A16CD03}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
+ {EFE471DE-6747-4B2E-B084-F7E45A16CD03}.WithOpenPGM|Win32.Build.0 = Release|Win32
{DF2CED64-4156-48EA-8AA3-38CF86060D59}.Debug|Win32.ActiveCfg = Debug|Win32
{DF2CED64-4156-48EA-8AA3-38CF86060D59}.Debug|Win32.Build.0 = Debug|Win32
{DF2CED64-4156-48EA-8AA3-38CF86060D59}.Release|Win32.ActiveCfg = Release|Win32
{DF2CED64-4156-48EA-8AA3-38CF86060D59}.Release|Win32.Build.0 = Release|Win32
+ {DF2CED64-4156-48EA-8AA3-38CF86060D59}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
+ {DF2CED64-4156-48EA-8AA3-38CF86060D59}.WithOpenPGM|Win32.Build.0 = Release|Win32
{076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Debug|Win32.ActiveCfg = Debug|Win32
{076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Debug|Win32.Build.0 = Debug|Win32
{076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Release|Win32.ActiveCfg = Release|Win32
{076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Release|Win32.Build.0 = Release|Win32
+ {076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
+ {076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.WithOpenPGM|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/builds/msvc/platform.hpp b/builds/msvc/platform.hpp
index 9c0c8ae..4af872c 100644
--- a/builds/msvc/platform.hpp
+++ b/builds/msvc/platform.hpp
@@ -1,26 +1,27 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_PLATFORM_HPP_INCLUDED__
#define __ZMQ_PLATFORM_HPP_INCLUDED__
-// This is the platform definition for the Windows platform.
+// This is the platform definition for the MSVC platform.
// As a first step of the build process it is copied to
// zmq directory to take place of platform.hpp generated from
// platform.hpp.in on platforms supported by GNU autotools.
diff --git a/builds/msvc/zmq_forwarder/zmq_forwarder.vcproj b/builds/msvc/zmq_forwarder/zmq_forwarder.vcproj
deleted file mode 100644
index c8f587d..0000000
--- a/builds/msvc/zmq_forwarder/zmq_forwarder.vcproj
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="windows-1250"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="zmq_forwarder"
- ProjectGUID="{EFE471DE-6747-4B2E-B084-F7E45A16CD03}"
- RootNamespace="zmq_forwarder"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../bindings/c;../../../bindings/cpp"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/zmq_forwarder.exe"
- GenerateDebugInformation="true"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../bindings/c;../../../bindings/cpp"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/zmq_forwarder.exe"
- GenerateDebugInformation="true"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\devices\zmq_forwarder\zmq_forwarder.cpp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/builds/msvc/zmq_queue/zmq_queue.vcproj b/builds/msvc/zmq_queue/zmq_queue.vcproj
deleted file mode 100644
index 499ed36..0000000
--- a/builds/msvc/zmq_queue/zmq_queue.vcproj
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="zmq_queue"
- ProjectGUID="{076F7B8B-5175-4CA9-BC2B-438E37F7F43E}"
- RootNamespace="zmq_queue"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../bindings/c;../../../bindings/cpp"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/zmq_queue.exe"
- GenerateDebugInformation="true"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../bindings/c;../../../bindings/cpp"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/zmq_queue.exe"
- GenerateDebugInformation="true"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\devices\zmq_queue\zmq_queue.cpp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/builds/msvc/zmq_streamer/zmq_streamer.vcproj b/builds/msvc/zmq_streamer/zmq_streamer.vcproj
deleted file mode 100644
index e2f5fa6..0000000
--- a/builds/msvc/zmq_streamer/zmq_streamer.vcproj
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="zmq_streamer"
- ProjectGUID="{DF2CED64-4156-48EA-8AA3-38CF86060D59}"
- RootNamespace="zmq_streamer"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../bindings/c;../../../bindings/cpp"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/zmq_streamer.exe"
- GenerateDebugInformation="true"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../bindings/c;../../../bindings/cpp"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/zmq_streamer.exe"
- GenerateDebugInformation="true"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\devices\zmq_streamer\zmq_streamer.cpp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/config/config.guess b/config/config.guess
index e3a2116..c2246a4 100755
--- a/config/config.guess
+++ b/config/config.guess
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
-timestamp='2009-06-10'
+timestamp='2009-12-30'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-06-10'
# the same distribution terms that you use for the rest of that program.
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,8 +56,9 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -333,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
@@ -807,12 +811,12 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- *:Interix*:[3456]*)
+ *:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- EM64T | authenticamd | genuineintel)
+ authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
@@ -854,6 +858,20 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -876,6 +894,17 @@ EOF
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
@@ -901,39 +930,18 @@ EOF
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -942,8 +950,11 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
@@ -966,58 +977,6 @@ EOF
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@@ -1247,6 +1206,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
diff --git a/config/config.sub b/config/config.sub
index eb0389a..c2d1257 100755
--- a/config/config.sub
+++ b/config/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
-timestamp='2009-06-11'
+timestamp='2010-01-22'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2009-06-11'
# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -149,7 +153,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
+ -apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
@@ -284,6 +288,7 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
+ | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
@@ -291,13 +296,14 @@ case $basic_machine in
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
+ | ubicom32 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12)
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
@@ -340,7 +346,7 @@ case $basic_machine in
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -368,15 +374,17 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
- | romp-* | rs6000-* \
+ | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile-* | tilegx-* \
| tron-* \
+ | ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -726,6 +734,9 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -1076,6 +1087,11 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
+ # This must be matched before tile*.
+ tilegx*)
+ basic_machine=tilegx-unknown
+ os=-linux-gnu
+ ;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
@@ -1247,6 +1263,9 @@ case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@@ -1268,8 +1287,8 @@ case $os in
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -kopensolaris* \
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1290,7 +1309,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1423,6 +1442,8 @@ case $os in
-dicos*)
os=-dicos
;;
+ -nacl*)
+ ;;
-none)
;;
*)
diff --git a/configure b/configure
index d08e060..8a02da6 100755
--- a/configure
+++ b/configure
@@ -1,13 +1,13 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for zeromq 2.0.10.
+# Generated by GNU Autoconf 2.67 for zeromq 2.1.3.
#
# Report bugs to <zeromq-dev@lists.zeromq.org>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -319,7 +319,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -359,19 +359,19 @@ else
fi # as_fn_arith
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -682,7 +682,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -701,8 +701,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='zeromq'
PACKAGE_TARNAME='zeromq'
-PACKAGE_VERSION='2.0.10'
-PACKAGE_STRING='zeromq 2.0.10'
+PACKAGE_VERSION='2.1.3'
+PACKAGE_STRING='zeromq 2.1.3'
PACKAGE_BUGREPORT='zeromq-dev@lists.zeromq.org'
PACKAGE_URL=''
@@ -742,34 +742,27 @@ ac_includes_default="\
# include <unistd.h>
#endif"
+enable_option_checking=no
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
LIBZMQ_EXTRA_LDFLAGS
LIBZMQ_EXTRA_CXXFLAGS
-inttypes
-stdint
-BUILD_DOC_FALSE
-BUILD_DOC_TRUE
-INSTALL_MAN_FALSE
-INSTALL_MAN_TRUE
+LIBZMQ_EXTRA_CFLAGS
ON_MINGW_FALSE
ON_MINGW_TRUE
-BUILD_NO_PGM_FALSE
-BUILD_NO_PGM_TRUE
BUILD_PGM_FALSE
BUILD_PGM_TRUE
-have_python
-have_perl
-have_gzip
-GLIB_LIBS
-GLIB_CFLAGS
-PKG_CONFIG
+subdirs
+pgm_srcdir
pgm_basename
-have_pkg_config
-have_xmlto
-have_asciidoc
+INSTALL_MAN_FALSE
+INSTALL_MAN_TRUE
+BUILD_DOC_FALSE
+BUILD_DOC_TRUE
+ac_zmq_have_xmlto
+ac_zmq_have_asciidoc
CXXCPP
CPP
OTOOL64
@@ -788,7 +781,6 @@ LD
FGREP
EGREP
GREP
-SED
LIBTOOL
OBJDUMP
DLLTOOL
@@ -801,6 +793,9 @@ build_os
build_vendor
build_cpu
build
+ASCIIDOC
+XMLTO
+SED
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
@@ -824,6 +819,8 @@ LDFLAGS
CFLAGS
CC
LTVER
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
am__untar
am__tar
AMTAR
@@ -888,14 +885,16 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_silent_rules
enable_dependency_tracking
-enable_shared
enable_static
+enable_shared
with_pic
enable_fast_install
with_gnu_ld
enable_libtool_lock
-with_pkg_config
+enable_debug
+with_documentation
with_pgm
'
ac_precious_vars='build_alias
@@ -909,12 +908,11 @@ CPPFLAGS
CXX
CXXFLAGS
CCC
+XMLTO
+ASCIIDOC
CPP
-CXXCPP
-PKG_CONFIG
-GLIB_CFLAGS
-GLIB_LIBS'
-
+CXXCPP'
+ac_subdirs_all='foreign/openpgm/build-staging/openpgm/pgm/'
# Initialize some variables set by options.
ac_init_help=
@@ -976,8 +974,9 @@ do
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1022,7 +1021,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1048,7 +1047,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1252,7 +1251,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1268,7 +1267,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1298,8 +1297,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
@@ -1307,7 +1306,7 @@ Try \`$0 --help' for more information."
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1325,13 +1324,13 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
+ as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1354,7 +1353,7 @@ do
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1368,8 +1367,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1384,9 +1383,9 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1425,11 +1424,11 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1455,7 +1454,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.0.10 to adapt to many kinds of systems.
+\`configure' configures zeromq 2.1.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1469,7 +1468,7 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1525,7 +1524,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of zeromq 2.0.10:";;
+ short | recursive ) echo "Configuration of zeromq 2.1.3:";;
esac
cat <<\_ACEOF
@@ -1533,13 +1532,16 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
+ --enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-debug Enable debugging information [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1547,7 +1549,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --without-pkg-config do not use pkg-config [default=no]
+ --without-documentation disable documentation build even if asciidoc and
+ xmlto are present [default=no]
--with-pgm build libzmq with PGM extension [default=no]
Some influential environment variables:
@@ -1560,11 +1563,10 @@ Some influential environment variables:
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
+ XMLTO Path to xmlto command
+ ASCIIDOC Path to asciidoc command
CPP C preprocessor
CXXCPP C++ preprocessor
- PKG_CONFIG path to pkg-config utility
- GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
- GLIB_LIBS linker flags for GLIB, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1632,10 +1634,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-zeromq configure 2.0.10
-generated by GNU Autoconf 2.65
+zeromq configure 2.1.3
+generated by GNU Autoconf 2.67
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1777,7 +1779,7 @@ ac_fn_c_check_header_compile ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1820,7 +1822,7 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -1886,7 +1888,7 @@ ac_fn_c_check_func ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1966,7 +1968,7 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -2036,10 +2038,10 @@ fi
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval "test \"\${$3+set}\"" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -2075,7 +2077,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -2098,17 +2100,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( cat <<\_ASBOX
-## ------------------------------------------ ##
+( $as_echo "## ------------------------------------------ ##
## Report this to zeromq-dev@lists.zeromq.org ##
-## ------------------------------------------ ##
-_ASBOX
+## ------------------------------------------ ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -2130,7 +2130,7 @@ ac_fn_cxx_check_type ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -2184,7 +2184,7 @@ ac_fn_c_find_uintX_t ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
$as_echo_n "checking for uint$2_t... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -2214,8 +2214,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then :
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- eval as_val=\$$3
- if test "x$as_val" = x""no; then :
+ if eval test \"x\$"$3"\" = x"no"; then :
else
break
@@ -2237,7 +2236,7 @@ ac_fn_cxx_check_func ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2295,12 +2294,103 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_cxx_check_func
+
+# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_cxx_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval "test \"\${$3+set}\"" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ------------------------------------------ ##
+## Report this to zeromq-dev@lists.zeromq.org ##
+## ------------------------------------------ ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_header_mongrel
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.0.10, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+It was created by zeromq $as_me 2.1.3, which was
+generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2410,11 +2500,9 @@ trap 'exit_status=$?
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -2448,11 +2536,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -2465,11 +2551,9 @@ _ASBOX
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -2483,11 +2567,9 @@ _ASBOX
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -2542,7 +2624,12 @@ _ACEOF
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -2557,7 +2644,11 @@ do
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
done
@@ -2633,7 +2724,7 @@ if $ac_cache_corrupted; then
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2649,16 +2740,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
for ac_dir in config "$srcdir"/config; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2779,11 +2876,11 @@ am_lf='
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
esac
# Do `set' in a subshell so we don't clobber the current shell's
@@ -2805,7 +2902,7 @@ if (
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- as_fn_error "ls -t appears to fail. Make sure there is not a broken
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
@@ -2815,7 +2912,7 @@ then
# Ok.
:
else
- as_fn_error "newly created file is older than distributed files!
+ as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -3053,7 +3150,7 @@ done
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -3061,7 +3158,7 @@ SHELL = /bin/sh
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -3095,7 +3192,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
fi
fi
@@ -3111,7 +3208,7 @@ fi
# Define the identity of the package.
PACKAGE='zeromq'
- VERSION='2.0.10'
+ VERSION='2.1.3'
cat >>confdefs.h <<_ACEOF
@@ -3232,20 +3329,42 @@ $as_echo "$am_cv_prog_tar_ustar" >&6; }
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
# This lets us use PACKAGE_VERSION in Makefiles
# Libtool -version-info (ABI version)
#
-# Currently 0.0.0 ("unstable"). Don't change this unless you
-# know exactly what you're doing and have read and understand
+# Don't change this unless you know exactly what you're doing and have read and
+# understand:
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
#
-# libzmq -version-info
-LTVER="0:0:0"
+# Changes:
+#
+# ZeroMQ versions prior to 2.1.0 use 0.0.0 ("unstable")
+# ZeroMQ version 2.1.0: 1:0:0
+#
+# libzmq -version-info current:revision:age
+LTVER="1:0:0"
+# Take a copy of original flags
+ZMQ_ORIG_CFLAGS="${CFLAGS:-none}"
+ZMQ_ORIG_CPPFLAGS="${CPPFLAGS:-none}"
+ZMQ_ORIG_CXXFLAGS="${CXXFLAGS:-none}"
+
# Checks for programs.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -3547,8 +3666,8 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3662,9 +3781,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -3706,8 +3824,8 @@ done
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3764,9 +3882,9 @@ $as_echo "$ac_try_echo"; } >&5
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
+as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
fi
fi
@@ -3817,8 +3935,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -4227,6 +4345,183 @@ else
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
+
+
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4620,7 +4915,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
fi
set dummy $CC; ac_cc=`$as_echo "$2" |
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4737,9 +5032,205 @@ if test "$am_t" != yes; then
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+
+
+# Extract the first word of "xmlto", so it can be a program name with args.
+set dummy xmlto; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XMLTO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $XMLTO in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+XMLTO=$ac_cv_path_XMLTO
+if test -n "$XMLTO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5
+$as_echo "$XMLTO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+# Extract the first word of "asciidoc", so it can be a program name with args.
+set dummy asciidoc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ASCIIDOC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ASCIIDOC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ASCIIDOC="$ASCIIDOC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ASCIIDOC="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ASCIIDOC=$ac_cv_path_ASCIIDOC
+if test -n "$ASCIIDOC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOC" >&5
+$as_echo "$ASCIIDOC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+# Libtool configuration for different targets. See acinclude.m4
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
@@ -4750,16 +5241,16 @@ else
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -4784,7 +5275,7 @@ else
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
@@ -4792,7 +5283,7 @@ fi
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -4808,6 +5299,78 @@ IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+{
+
+
+ # Libtool configuration for different targets
+ case "${host_os}" in
+ *mingw32*|*cygwin*)
+ # Disable static build by default
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=no
+fi
+
+
+
+
+
+
+
+
+
+ ;;
+ *)
+ # Everything else with static enabled
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+ ;;
+ esac
+}
enable_win32_dll=yes
case $host in
@@ -5193,7 +5756,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_SED"; then
- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
fi
else
ac_cv_path_SED=$SED
@@ -5269,7 +5832,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -5335,7 +5898,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -5402,7 +5965,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_FGREP"; then
- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_FGREP=$FGREP
@@ -5518,7 +6081,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${lt_cv_prog_gnu_ld+set}" = set; then :
@@ -5720,13 +6283,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5723: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:6286: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5726: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:6289: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5729: output\"" >&5)
+ (eval echo "\"\$as_me:6292: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6929,7 +7492,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6932 "configure"' > conftest.$ac_ext
+ echo '#line 7495 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7718,7 +8281,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -7734,11 +8297,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -7777,7 +8340,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -7793,18 +8356,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
ac_ext=c
@@ -7933,8 +8496,7 @@ do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -8384,7 +8946,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -8400,11 +8962,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -8443,7 +9005,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -8459,11 +9021,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
@@ -8525,36 +9087,6 @@ fi
- # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
- enableval=$enable_static; p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_static=yes
-fi
-
-
-
-
-
-
-
-
# Check whether --with-pic was given.
@@ -8984,11 +9516,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8987: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9519: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8991: \$? = $ac_status" >&5
+ echo "$as_me:9523: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9323,11 +9855,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9326: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9858: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9330: \$? = $ac_status" >&5
+ echo "$as_me:9862: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9428,11 +9960,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9431: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9963: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9435: \$? = $ac_status" >&5
+ echo "$as_me:9967: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9483,11 +10015,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9486: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10018: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9490: \$? = $ac_status" >&5
+ echo "$as_me:10022: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11867,7 +12399,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11870 "configure"
+#line 12402 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11963,7 +12495,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11966 "configure"
+#line 12498 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12378,7 +12910,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${lt_cv_prog_gnu_ld+set}" = set; then :
@@ -13919,11 +14451,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13922: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14454: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13926: \$? = $ac_status" >&5
+ echo "$as_me:14458: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14018,11 +14550,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14021: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14553: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14025: \$? = $ac_status" >&5
+ echo "$as_me:14557: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14070,11 +14602,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14073: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14605: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14077: \$? = $ac_status" >&5
+ echo "$as_me:14609: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15037,124 +15569,405 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Only expand once:
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+
+# Check whether to build a with debug symbols
+{
+ # For that the compiler works and try to come up with the type
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ {
+ # Test that compiler for the current language actually works
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+if test "${ac_zmq_cv_c_compiler_works+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_zmq_cv_c_compiler_works="yes" ;
+else
+ ac_zmq_cv_c_compiler_works="no" ;
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_compiler_works" >&5
+$as_echo "$ac_zmq_cv_c_compiler_works" >&6; }
+
+ if test "x$ac_zmq_cv_c_compiler_works" != "xyes"; then
+ as_fn_error $? "Unable to find a working C compiler" "$LINENO" 5
fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
+}
- $ac_path_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C compiler" >&5
+$as_echo_n "checking whether we are using Intel C compiler... " >&6; }
+if test "${ac_zmq_cv_c_intel_compiler+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_path_SED=$SED
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __INTEL_COMPILER
+ error if not ICC
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_zmq_cv_c_intel_compiler="yes" ;
+else
+ ac_zmq_cv_c_intel_compiler="no" ;
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_intel_compiler" >&5
+$as_echo "$ac_zmq_cv_c_intel_compiler" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Sun Studio C compiler" >&5
+$as_echo_n "checking whether we are using Sun Studio C compiler... " >&6; }
+if test "${ac_zmq_cv_c_sun_studio_compiler+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+int
+main ()
+{
+#if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C)
+ error if not sun studio
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_zmq_cv_c_sun_studio_compiler="yes" ;
+else
+ ac_zmq_cv_c_sun_studio_compiler="no" ;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_sun_studio_compiler" >&5
+$as_echo "$ac_zmq_cv_c_sun_studio_compiler" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using clang C compiler" >&5
+$as_echo_n "checking whether we are using clang C compiler... " >&6; }
+if test "${ac_zmq_cv_c_clang_compiler+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __clang__
+ error if not clang
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_zmq_cv_c_clang_compiler="yes" ;
else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+ ac_zmq_cv_c_clang_compiler="no" ;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_clang_compiler" >&5
+$as_echo "$ac_zmq_cv_c_clang_compiler" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gcc >= 4 C compiler" >&5
+$as_echo_n "checking whether we are using gcc >= 4 C compiler... " >&6; }
+if test "${ac_zmq_cv_c_gcc4_compiler+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#if (!defined __GNUC__ || __GNUC__ < 4)
+ error if not gcc4 or higher
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_zmq_cv_c_gcc4_compiler="yes" ;
+else
+ ac_zmq_cv_c_gcc4_compiler="no" ;
fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_c_gcc4_compiler" >&5
+$as_echo "$ac_zmq_cv_c_gcc4_compiler" >&6; }
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ {
+ # Test that compiler for the current language actually works
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
+$as_echo_n "checking whether the C++ compiler works... " >&6; }
+if test "${ac_zmq_cv_cxx_compiler_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_zmq_cv_cxx_compiler_works="yes" ;
+else
+ ac_zmq_cv_cxx_compiler_works="no" ;
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_compiler_works" >&5
+$as_echo "$ac_zmq_cv_cxx_compiler_works" >&6; }
- test -n "$AWK" && break
-done
+ if test "x$ac_zmq_cv_cxx_compiler_works" != "xyes"; then
+ as_fn_error $? "Unable to find a working C++ compiler" "$LINENO" 5
+ fi
+}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C++ compiler" >&5
+$as_echo_n "checking whether we are using Intel C++ compiler... " >&6; }
+if test "${ac_zmq_cv_cxx_intel_compiler+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-# Set a helper variable to indicate GNU C and C++ are in use
-if test "x$GCC" = "xyes" -a "x$GXX" = "xyes"; then
- gnu_compilers="yes"
+int
+main ()
+{
+#ifndef __INTEL_COMPILER
+ error if not ICC
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_zmq_cv_cxx_intel_compiler="yes" ;
+else
+ ac_zmq_cv_cxx_intel_compiler="no" ;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_intel_compiler" >&5
+$as_echo "$ac_zmq_cv_cxx_intel_compiler" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Sun Studio C++ compiler" >&5
+$as_echo_n "checking whether we are using Sun Studio C++ compiler... " >&6; }
+if test "${ac_zmq_cv_cxx_sun_studio_compiler+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C)
+ error if not sun studio
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_zmq_cv_cxx_sun_studio_compiler="yes" ;
+else
+ ac_zmq_cv_cxx_sun_studio_compiler="no" ;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_sun_studio_compiler" >&5
+$as_echo "$ac_zmq_cv_cxx_sun_studio_compiler" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using clang C++ compiler" >&5
+$as_echo_n "checking whether we are using clang C++ compiler... " >&6; }
+if test "${ac_zmq_cv_cxx_clang_compiler+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __clang__
+ error if not clang
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_zmq_cv_cxx_clang_compiler="yes" ;
else
- gnu_compilers="no"
+ ac_zmq_cv_cxx_clang_compiler="no" ;
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_clang_compiler" >&5
+$as_echo "$ac_zmq_cv_cxx_clang_compiler" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gcc >= 4 C++ compiler" >&5
+$as_echo_n "checking whether we are using gcc >= 4 C++ compiler... " >&6; }
+if test "${ac_zmq_cv_cxx_gcc4_compiler+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#if (!defined __GNUC__ || __GNUC__ < 4)
+ error if not gcc4 or higher
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_zmq_cv_cxx_gcc4_compiler="yes" ;
+else
+ ac_zmq_cv_cxx_gcc4_compiler="no" ;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_gcc4_compiler" >&5
+$as_echo "$ac_zmq_cv_cxx_gcc4_compiler" >&6; }
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ # Set GCC and GXX variables correctly
+ if test "x$GCC" = "xyes"; then
+ if test "xyes" = "x$ac_zmq_cv_c_intel_compiler"; then
+ GCC="no"
+ fi
+ fi
+
+ if test "x$GXX" = "xyes"; then
+ if test "xyes" = "x$ac_zmq_cv_cxx_intel_compiler"; then
+ GXX="no"
+ fi
+ fi
+}
+{
+
+ # Require compiler specifics
+
+
+ # This flag is checked also in
+ # Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+ enableval=$enable_debug;
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging information" >&5
+$as_echo_n "checking whether to enable debugging information... " >&6; }
+
+ if test "x$enable_debug" = "xyes"; then
+
+ # GCC, clang and ICC
+ if test "x$GCC" = "xyes" -o \
+ "x$ac_zmq_cv_c_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_c_clang_compiler" = "xyes"; then
+ CFLAGS="-g -O0 "
+ elif test "x$ac_zmq_cv_c_sun_studio_compiler" = "xyes"; then
+ CFLAGS="-g0 "
+ fi
+
+ # GCC, clang and ICC
+ if test "x$GXX" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then
+ CPPFLAGS="-g -O0 "
+ CXXFLAGS="-g -O0 "
+ # Sun studio
+ elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then
+ CPPFLAGS="-g0 "
+ CXXFLAGS="-g0 "
+ fi
+
+ if test "x$ZMQ_ORIG_CFLAGS" != "xnone"; then
+ CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}"
+ fi
+ if test "x$ZMQ_ORIG_CPPFLAGS" != "xnone"; then
+ CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}"
+ fi
+ if test "x$ZMQ_ORIG_CXXFLAGS" != "xnone"; then
+ CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}"
+ fi
+ { $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
+}
# Checks for libraries.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
@@ -15203,136 +16016,82 @@ _ACEOF
fi
-# Extra CXXFLAGS are appended at the end of CXXFLAGS for libzmq.
-LIBZMQ_EXTRA_CXXFLAGS=""
+# Set pedantic
+ac_zmq_pedantic="yes"
-# Extra LDFLAGS are appended at the end of LDFLAGS for libzmq.
-LIBZMQ_EXTRA_LDFLAGS=""
+# By default compiling with -Werror except OSX.
+ac_zmq_werror="yes"
-# By default compiling with -pedantic except QNX and OSX.
-pedantic="yes"
+# By default use DSO visibility
+ac_zmq_dso_visibility="yes"
-#By default compiling with -Werror except OSX.
-werror="yes"
+# Whether we are on mingw or not.
+ac_zmq_on_mingw32="no"
-#Whether we are on mingw or not.
-on_mingw32="no"
+# Set some default features required by 0MQ code.
+CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
-# Host speciffic checks
+# For host type checks
-# Determine whether or not documentation should be built and installed.
-build_doc="yes"
-install_man="yes"
-# Check for asciidoc and xmlto and don't build the docs if these are not installed.
-# Extract the first word of "asciidoc", so it can be a program name with args.
-set dummy asciidoc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_have_asciidoc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$have_asciidoc"; then
- ac_cv_prog_have_asciidoc="$have_asciidoc" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_have_asciidoc="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_have_asciidoc" && ac_cv_prog_have_asciidoc="no"
-fi
-fi
-have_asciidoc=$ac_cv_prog_have_asciidoc
-if test -n "$have_asciidoc"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_asciidoc" >&5
-$as_echo "$have_asciidoc" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+# OS-specific tests
+case "${host_os}" in
+ *linux*)
+ # Define on Linux to enable all library features. Define if using a gnu compiler
+ if test "x$GXX" = "xyes"; then
+ CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
+ fi
+$as_echo "#define ZMQ_HAVE_LINUX 1" >>confdefs.h
-# Extract the first word of "xmlto", so it can be a program name with args.
-set dummy xmlto; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_have_xmlto+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lrt" >&5
+$as_echo_n "checking for sem_init in -lrt... " >&6; }
+if test "${ac_cv_lib_rt_sem_init+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$have_xmlto"; then
- ac_cv_prog_have_xmlto="$have_xmlto" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_have_xmlto="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- test -z "$ac_cv_prog_have_xmlto" && ac_cv_prog_have_xmlto="no"
-fi
-fi
-have_xmlto=$ac_cv_prog_have_xmlto
-if test -n "$have_xmlto"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_xmlto" >&5
-$as_echo "$have_xmlto" >&6; }
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_init ();
+int
+main ()
+{
+return sem_init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_rt_sem_init=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ ac_cv_lib_rt_sem_init=no
fi
-
-
-if test "x$have_asciidoc" = "xno" -o "x$have_xmlto" = "xno"; then
- build_doc="no"
- # Tarballs built with 'make dist' ship with prebuilt documentation.
- if ! test -f doc/zmq.7; then
- install_man="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed. Documentation will not be built and manual pages will not be installed." >&5
-$as_echo "$as_me: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed. Documentation will not be built and manual pages will not be installed." >&2;}
- fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
-$as_echo_n "checking whether to build documentation... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_doc" >&5
-$as_echo "$build_doc" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install manpages" >&5
-$as_echo_n "checking whether to install manpages... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $install_man" >&5
-$as_echo "$install_man" >&6; }
-
-# Set some default features required by 0MQ code.
-CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_init" >&5
+$as_echo "$ac_cv_lib_rt_sem_init" >&6; }
+if test "x$ac_cv_lib_rt_sem_init" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
-# OS-specific tests
-case "${host_os}" in
- *linux*)
- # Define on Linux to enable all library features
- CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
+ LIBS="-lrt $LIBS"
-$as_echo "#define ZMQ_HAVE_LINUX 1" >>confdefs.h
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -luuid" >&5
-$as_echo_n "checking for main in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_main+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
+$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
+if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15340,27 +16099,33 @@ LIBS="-luuid $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate ();
int
main ()
{
-return main ();
+return uuid_generate ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_uuid_main=yes
+ ac_cv_lib_uuid_uuid_generate=yes
else
- ac_cv_lib_uuid_main=no
+ ac_cv_lib_uuid_uuid_generate=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_main" >&5
-$as_echo "$ac_cv_lib_uuid_main" >&6; }
-if test "x$ac_cv_lib_uuid_main" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
+$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBUUID 1
_ACEOF
@@ -15368,7 +16133,7 @@ _ACEOF
LIBS="-luuid $LIBS"
else
- as_fn_error "cannot link with -luuid, install uuid-dev." "$LINENO" 5
+ as_fn_error $? "cannot link with -luuid, install uuid-dev." "$LINENO" 5
fi
;;
@@ -15378,9 +16143,9 @@ fi
$as_echo "#define ZMQ_HAVE_SOLARIS 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
-$as_echo_n "checking for main in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_main+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+$as_echo_n "checking for socket in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_socket+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15388,27 +16153,33 @@ LIBS="-lsocket $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socket ();
int
main ()
{
-return main ();
+return socket ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_main=yes
+ ac_cv_lib_socket_socket=yes
else
- ac_cv_lib_socket_main=no
+ ac_cv_lib_socket_socket=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
-$as_echo "$ac_cv_lib_socket_main" >&6; }
-if test "x$ac_cv_lib_socket_main" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
+$as_echo "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSOCKET 1
_ACEOF
@@ -15417,9 +16188,9 @@ _ACEOF
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
-$as_echo_n "checking for main in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_main+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15427,27 +16198,33 @@ LIBS="-lnsl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
int
main ()
{
-return main ();
+return gethostbyname ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nsl_main=yes
+ ac_cv_lib_nsl_gethostbyname=yes
else
- ac_cv_lib_nsl_main=no
+ ac_cv_lib_nsl_gethostbyname=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
-$as_echo "$ac_cv_lib_nsl_main" >&6; }
-if test "x$ac_cv_lib_nsl_main" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSL 1
_ACEOF
@@ -15456,9 +16233,9 @@ _ACEOF
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrt" >&5
-$as_echo_n "checking for main in -lrt... " >&6; }
-if test "${ac_cv_lib_rt_main+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lrt" >&5
+$as_echo_n "checking for sem_init in -lrt... " >&6; }
+if test "${ac_cv_lib_rt_sem_init+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15466,27 +16243,33 @@ LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_init ();
int
main ()
{
-return main ();
+return sem_init ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_rt_main=yes
+ ac_cv_lib_rt_sem_init=yes
else
- ac_cv_lib_rt_main=no
+ ac_cv_lib_rt_sem_init=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_main" >&5
-$as_echo "$ac_cv_lib_rt_main" >&6; }
-if test "x$ac_cv_lib_rt_main" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_init" >&5
+$as_echo "$ac_cv_lib_rt_sem_init" >&6; }
+if test "x$ac_cv_lib_rt_sem_init" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBRT 1
_ACEOF
@@ -15495,9 +16278,9 @@ _ACEOF
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -luuid" >&5
-$as_echo_n "checking for main in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_main+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
+$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
+if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15505,27 +16288,33 @@ LIBS="-luuid $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate ();
int
main ()
{
-return main ();
+return uuid_generate ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_uuid_main=yes
+ ac_cv_lib_uuid_uuid_generate=yes
else
- ac_cv_lib_uuid_main=no
+ ac_cv_lib_uuid_uuid_generate=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_main" >&5
-$as_echo "$ac_cv_lib_uuid_main" >&6; }
-if test "x$ac_cv_lib_uuid_main" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
+$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBUUID 1
_ACEOF
@@ -15533,7 +16322,7 @@ _ACEOF
LIBS="-luuid $LIBS"
else
- as_fn_error "cannot link with -luuid, install uuid-dev." "$LINENO" 5
+ as_fn_error $? "cannot link with -luuid, install uuid-dev." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether atomic operations can be used" >&5
@@ -15576,12 +16365,112 @@ $as_echo "#define ZMQ_HAVE_FREEBSD 1" >>confdefs.h
*darwin*)
# Define on Darwin to enable all library features
CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS"
- pedantic="no"
- werror="no"
+ ac_zmq_pedantic="no"
+ ac_zmq_werror="no"
$as_echo "#define ZMQ_HAVE_OSX 1" >>confdefs.h
- LIBZMQ_EXTRA_CXXFLAGS+="-Wno-uninitialized"
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ {
+ {
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -Wno-uninitialized" >&5
+$as_echo_n "checking whether C++ compiler supports -Wno-uninitialized... " >&6; }
+
+ ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag
+ ac_cxx_werror_flag="yes"
+
+ case "xcxx" in
+ xc)
+ ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wno-uninitialized"
+ ;;
+ xcxx)
+ ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Wno-uninitialized"
+ ;;
+ *)
+ { $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_cxx_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 ac_zmq_cv_cxx_supports_flag__Wno_uninitialized="no"
+ else
+ eval ac_zmq_cv_cxx_supports_flag__Wno_uninitialized="yes"
+ fi
+else
+ eval ac_zmq_cv_cxx_supports_flag__Wno_uninitialized="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ case "xcxx" in
+ xc)
+ CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS"
+ ;;
+ xcxx)
+ CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS"
+ ;;
+ *)
+ # nothing to restore
+ ;;
+ esac
+
+ # Restore the werror flag
+ ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save
+
+ # Call the action as the flags are restored
+ if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_uninitialized = "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 "xcxx" in
+ xc)
+ if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then :
+ CFLAGS="-Wno-uninitialized $CFLAGS";
+fi
+ ;;
+ xcxx)
+ if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then :
+ CPPFLAGS="-Wno-uninitialized $CPPFLAGS";
+fi
+ ;;
+ esac
+}
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
;;
*netbsd*)
# Define on NetBSD to enable all library features
@@ -15592,7 +16481,7 @@ $as_echo "#define ZMQ_HAVE_NETBSD 1" >>confdefs.h
# NetBSD 5.0 and newer provides atomic operations but we can
# only use these on systems where PR #42842 has been fixed so
# we must try and link a test program using C++.
- netbsd_has_atomic=no
+ ac_zmq_netbsd_has_atomic=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether atomic operations can be used" >&5
$as_echo_n "checking whether atomic operations can be used... " >&6; }
ac_ext=cpp
@@ -15615,9 +16504,9 @@ uint32_t value;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
- netbsd_has_atomic=yes
+ ac_zmq_netbsd_has_atomic=yes
else
- netbsd_has_atomic=no
+ ac_zmq_netbsd_has_atomic=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -15627,9 +16516,9 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $netbsd_has_atomic" >&5
-$as_echo "$netbsd_has_atomic" >&6; }
- if test "x$netbsd_has_atomic" = "xno"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_netbsd_has_atomic" >&5
+$as_echo "$ac_zmq_netbsd_has_atomic" >&6; }
+ if test "x$ac_zmq_netbsd_has_atomic" = "xno"; then
$as_echo "#define ZMQ_FORCE_MUTEXES 1" >>confdefs.h
@@ -15643,13 +16532,13 @@ $as_echo "#define ZMQ_HAVE_OPENBSD 1" >>confdefs.h
;;
*nto-qnx*)
- pedantic="no"
+ ac_zmq_pedantic="no"
$as_echo "#define ZMQ_HAVE_QNXNTO 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
-$as_echo_n "checking for main in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_main+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+$as_echo_n "checking for socket in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_socket+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15657,27 +16546,33 @@ LIBS="-lsocket $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socket ();
int
main ()
{
-return main ();
+return socket ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_main=yes
+ ac_cv_lib_socket_socket=yes
else
- ac_cv_lib_socket_main=no
+ ac_cv_lib_socket_socket=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
-$as_echo "$ac_cv_lib_socket_main" >&6; }
-if test "x$ac_cv_lib_socket_main" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
+$as_echo "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSOCKET 1
_ACEOF
@@ -15736,16 +16631,61 @@ fi
$as_echo "#define ZMQ_HAVE_AIX 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_bytes in -lcrypto" >&5
+$as_echo_n "checking for RAND_bytes in -lcrypto... " >&6; }
+if test "${ac_cv_lib_crypto_RAND_bytes+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char RAND_bytes ();
+int
+main ()
+{
+return RAND_bytes ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_crypto_RAND_bytes=yes
+else
+ ac_cv_lib_crypto_RAND_bytes=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_bytes" >&5
+$as_echo "$ac_cv_lib_crypto_RAND_bytes" >&6; }
+if test "x$ac_cv_lib_crypto_RAND_bytes" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRYPTO 1
+_ACEOF
+
+ LIBS="-lcrypto $LIBS"
+
+fi
+
;;
*hpux*)
# Define on HP-UX to enable all library features
- CPPFLAGS="-D_POSIX_C_SOURCE=200112L"
+ CPPFLAGS="-D_POSIX_C_SOURCE=200112L $CPPFLAGS"
$as_echo "#define ZMQ_HAVE_HPUX 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrt" >&5
-$as_echo_n "checking for main in -lrt... " >&6; }
-if test "${ac_cv_lib_rt_main+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lrt" >&5
+$as_echo_n "checking for sem_init in -lrt... " >&6; }
+if test "${ac_cv_lib_rt_sem_init+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -15753,27 +16693,33 @@ LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_init ();
int
main ()
{
-return main ();
+return sem_init ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_rt_main=yes
+ ac_cv_lib_rt_sem_init=yes
else
- ac_cv_lib_rt_main=no
+ ac_cv_lib_rt_sem_init=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_main" >&5
-$as_echo "$ac_cv_lib_rt_main" >&6; }
-if test "x$ac_cv_lib_rt_main" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_init" >&5
+$as_echo "$ac_cv_lib_rt_sem_init" >&6; }
+if test "x$ac_cv_lib_rt_sem_init" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBRT 1
_ACEOF
@@ -15782,6 +16728,51 @@ _ACEOF
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_bytes in -lcrypto" >&5
+$as_echo_n "checking for RAND_bytes in -lcrypto... " >&6; }
+if test "${ac_cv_lib_crypto_RAND_bytes+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char RAND_bytes ();
+int
+main ()
+{
+return RAND_bytes ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_crypto_RAND_bytes=yes
+else
+ ac_cv_lib_crypto_RAND_bytes=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_bytes" >&5
+$as_echo "$ac_cv_lib_crypto_RAND_bytes" >&6; }
+if test "x$ac_cv_lib_crypto_RAND_bytes" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRYPTO 1
+_ACEOF
+
+ LIBS="-lcrypto $LIBS"
+
+fi
+
;;
*mingw32*)
@@ -15840,7 +16831,7 @@ _ACEOF
LIBS="-lws2_32 $LIBS"
else
- as_fn_error "cannot link with ws2_32.dll." "$LINENO" 5
+ as_fn_error $? "cannot link with ws2_32.dll." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpcrt4" >&5
@@ -15881,7 +16872,7 @@ _ACEOF
LIBS="-lrpcrt4 $LIBS"
else
- as_fn_error "cannot link with rpcrt4.dll." "$LINENO" 5
+ as_fn_error $? "cannot link with rpcrt4.dll." "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -liphlpapi" >&5
@@ -15922,12 +16913,117 @@ _ACEOF
LIBS="-liphlpapi $LIBS"
else
- as_fn_error "cannot link with iphlpapi.dll." "$LINENO" 5
+ as_fn_error $? "cannot link with iphlpapi.dll." "$LINENO" 5
fi
- CFLAGS="${CFLAGS} -std=c99"
- on_mingw32="yes"
- install_man="no"
+ # mingw32 defines __int64_t as long long
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ {
+ {
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -Wno-long-long" >&5
+$as_echo_n "checking whether C++ compiler supports -Wno-long-long... " >&6; }
+
+ ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag
+ ac_cxx_werror_flag="yes"
+
+ case "xcxx" in
+ xc)
+ ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wno-long-long"
+ ;;
+ xcxx)
+ ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Wno-long-long"
+ ;;
+ *)
+ { $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_cxx_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 ac_zmq_cv_cxx_supports_flag__Wno_long_long="no"
+ else
+ eval ac_zmq_cv_cxx_supports_flag__Wno_long_long="yes"
+ fi
+else
+ eval ac_zmq_cv_cxx_supports_flag__Wno_long_long="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ case "xcxx" in
+ xc)
+ CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS"
+ ;;
+ xcxx)
+ CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS"
+ ;;
+ *)
+ # nothing to restore
+ ;;
+ esac
+
+ # Restore the werror flag
+ ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save
+
+ # Call the action as the flags are restored
+ if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_long_long = "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 "xcxx" in
+ xc)
+ if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then :
+ CFLAGS="-Wno-long-long $CFLAGS";
+fi
+ ;;
+ xcxx)
+ if eval test x$ac_zmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then :
+ CPPFLAGS="-Wno-long-long $CPPFLAGS";
+fi
+ ;;
+ esac
+}
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_zmq_on_mingw32="yes"
+ ac_zmq_dso_visibility="no"
+
+ if test "x$enable_static" = "xyes"; then
+ as_fn_error $? "Building static libraries is not supported under MinGW32" "$LINENO" 5
+ fi
;;
*cygwin*)
# Define on Cygwin to enable all library features
@@ -15937,7 +17033,7 @@ $as_echo "#define ZMQ_HAVE_CYGWIN 1" >>confdefs.h
# Cygwin provides libuuid as part of the e2fsprogs package, and somewhat
# uselessly installs the library in /usr/lib/e2fsprogs
- LDFLAGS="${LDFLAGS} -L/usr/lib/e2fsprogs"
+ LDFLAGS="-L/usr/lib/e2fsprogs ${LDFLAGS}"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then :
@@ -15982,26 +17078,641 @@ _ACEOF
LIBS="-luuid $LIBS"
else
- as_fn_error "cannot link with -luuid, install the e2fsprogs package." "$LINENO" 5
+ as_fn_error $? "cannot link with -luuid, install the e2fsprogs package." "$LINENO" 5
fi
+
+ if test "x$enable_static" = "xyes"; then
+ as_fn_error $? "Building static libraries is not supported under Cygwin" "$LINENO" 5
+ fi
;;
*)
- as_fn_error "unsupported system: ${host_os}." "$LINENO" 5
+ as_fn_error $? "unsupported system: ${host_os}." "$LINENO" 5
;;
esac
+#
+# Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec
+#
+if test "x$ac_zmq_dso_visibility" = "xyes"; then
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ {
+
+ ac_zmq_cv_c_visibility_flag=""
+
+ if test "x$ac_zmq_cv_c_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_c_clang_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_c_gcc4_compiler" = "xyes"; then
+ {
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -fvisibility=hidden" >&5
+$as_echo_n "checking whether C compiler supports -fvisibility=hidden... " >&6; }
+
+ ac_zmq_cv_c_werror_flag_save=$ac_c_werror_flag
+ ac_c_werror_flag="yes"
+
+ case "xc" in
+ xc)
+ ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ ;;
+ xcxx)
+ ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -fvisibility=hidden"
+ ;;
+ *)
+ { $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 `$as_echo "ac_zmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no"
+ else
+ eval `$as_echo "ac_zmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes"
+ fi
+else
+ eval `$as_echo "ac_zmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ case "xc" in
+ xc)
+ CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS"
+ ;;
+ xcxx)
+ CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS"
+ ;;
+ *)
+ # nothing to restore
+ ;;
+ esac
+
+ # Restore the werror flag
+ ac_c_werror_flag=$ac_zmq_cv_c_werror_flag_save
+
+ # Call the action as the flags are restored
+ if eval test x$`$as_echo "ac_zmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; } ; ac_zmq_cv_c_visibility_flag="-fvisibility=hidden"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; } ;
+fi
+
+}
+ elif test "x$ac_zmq_cv_c_sun_studio_compiler" = "xyes"; then
+ {
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -xldscope=hidden" >&5
+$as_echo_n "checking whether C compiler supports -xldscope=hidden... " >&6; }
+
+ ac_zmq_cv_c_werror_flag_save=$ac_c_werror_flag
+ ac_c_werror_flag="yes"
+
+ case "xc" in
+ xc)
+ ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -xldscope=hidden"
+ ;;
+ xcxx)
+ ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -xldscope=hidden"
+ ;;
+ *)
+ { $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 `$as_echo "ac_zmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no"
+ else
+ eval `$as_echo "ac_zmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes"
+ fi
+else
+ eval `$as_echo "ac_zmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ case "xc" in
+ xc)
+ CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS"
+ ;;
+ xcxx)
+ CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS"
+ ;;
+ *)
+ # nothing to restore
+ ;;
+ esac
+
+ # Restore the werror flag
+ ac_c_werror_flag=$ac_zmq_cv_c_werror_flag_save
+
+ # Call the action as the flags are restored
+ if eval test x$`$as_echo "ac_zmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; } ; ac_zmq_cv_c_visibility_flag="-xldscope=hidden"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; } ;
+fi
+
+}
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports dso visibility" >&5
+$as_echo_n "checking whether C compiler supports dso visibility... " >&6; }
+
+ if test "x$ac_zmq_cv_c_visibility_flag" != "x"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; } ; LIBZMQ_EXTRA_CFLAGS="$ac_zmq_cv_c_visibility_flag ${LIBZMQ_EXTRA_CFLAGS}"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; } ;
+fi
+}
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ {
+
+ ac_zmq_cv_cxx_visibility_flag=""
+
+ if test "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_clang_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_gcc4_compiler" = "xyes"; then
+ {
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -fvisibility=hidden" >&5
+$as_echo_n "checking whether C++ compiler supports -fvisibility=hidden... " >&6; }
+
+ ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag
+ ac_cxx_werror_flag="yes"
+
+ case "xcxx" in
+ xc)
+ ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ ;;
+ xcxx)
+ ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -fvisibility=hidden"
+ ;;
+ *)
+ { $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_cxx_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 `$as_echo "ac_zmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no"
+ else
+ eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes"
+ fi
+else
+ eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ case "xcxx" in
+ xc)
+ CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS"
+ ;;
+ xcxx)
+ CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS"
+ ;;
+ *)
+ # nothing to restore
+ ;;
+ esac
+
+ # Restore the werror flag
+ ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save
+
+ # Call the action as the flags are restored
+ if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; } ; ac_zmq_cv_cxx_visibility_flag="-fvisibility=hidden"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; } ;
+fi
+
+}
+ elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then
+ {
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -xldscope=hidden" >&5
+$as_echo_n "checking whether C++ compiler supports -xldscope=hidden... " >&6; }
+
+ ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag
+ ac_cxx_werror_flag="yes"
+
+ case "xcxx" in
+ xc)
+ ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -xldscope=hidden"
+ ;;
+ xcxx)
+ ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -xldscope=hidden"
+ ;;
+ *)
+ { $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_cxx_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 `$as_echo "ac_zmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no"
+ else
+ eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes"
+ fi
+else
+ eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ case "xcxx" in
+ xc)
+ CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS"
+ ;;
+ xcxx)
+ CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS"
+ ;;
+ *)
+ # nothing to restore
+ ;;
+ esac
+
+ # Restore the werror flag
+ ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save
+
+ # Call the action as the flags are restored
+ if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; } ; ac_zmq_cv_cxx_visibility_flag="-xldscope=hidden"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; } ;
+fi
+
+}
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports dso visibility" >&5
+$as_echo_n "checking whether C++ compiler supports dso visibility... " >&6; }
+
+ if test "x$ac_zmq_cv_cxx_visibility_flag" != "x"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; } ; LIBZMQ_EXTRA_CXXFLAGS="$ac_zmq_cv_cxx_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; } ;
+fi
+}
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
# CPU-specific optimizations
case "${host_cpu}" in
*sparc*)
- if test "x$gnu_compilers" = "xyes"; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ {
+ {
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -mcpu=v9" >&5
+$as_echo_n "checking whether C++ compiler supports -mcpu=v9... " >&6; }
+
+ ac_zmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag
+ ac_cxx_werror_flag="yes"
+
+ case "xcxx" in
+ xc)
+ ac_zmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -mcpu=v9"
+ ;;
+ xcxx)
+ ac_zmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -mcpu=v9"
- fi
+ ;;
+ *)
+ { $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_cxx_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 `$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no"
+ else
+ eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="yes"
+ fi
+else
+ eval `$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ case "xcxx" in
+ xc)
+ CFLAGS="$ac_zmq_cv_check_lang_flag_save_CFLAGS"
+ ;;
+ xcxx)
+ CPPFLAGS="$ac_zmq_cv_check_lang_flag_save_CPPFLAGS"
+ ;;
+ *)
+ # nothing to restore
+ ;;
+ esac
+
+ # Restore the werror flag
+ ac_cxx_werror_flag=$ac_zmq_cv_cxx_werror_flag_save
+
+ # Call the action as the flags are restored
+ if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "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 "xcxx" in
+ xc)
+ if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then :
+ CFLAGS="-mcpu=v9 $CFLAGS";
+fi
+ ;;
+ xcxx)
+ if eval test x$`$as_echo "ac_zmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then :
+ CPPFLAGS="-mcpu=v9 $CPPFLAGS";
+fi
+ ;;
+ esac
+}
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
;;
*)
;;
esac
+# Check whether to build docs / install man pages
+{
+ # Allow user to disable doc build
+
+# Check whether --with-documentation was given.
+if test "${with_documentation+set}" = set; then :
+ withval=$with_documentation;
+fi
+
+
+ if test "x$with_documentation" = "xno"; then
+ ac_zmq_build_doc="no"
+ ac_zmq_install_man="no"
+ else
+ # Determine whether or not documentation should be built and installed.
+ ac_zmq_build_doc="yes"
+ ac_zmq_install_man="yes"
+ # Check for asciidoc and xmlto and don't build the docs if these are not installed.
+ # Extract the first word of "asciidoc", so it can be a program name with args.
+set dummy asciidoc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_zmq_have_asciidoc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_zmq_have_asciidoc"; then
+ ac_cv_prog_ac_zmq_have_asciidoc="$ac_zmq_have_asciidoc" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_zmq_have_asciidoc="yes"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_ac_zmq_have_asciidoc" && ac_cv_prog_ac_zmq_have_asciidoc="no"
+fi
+fi
+ac_zmq_have_asciidoc=$ac_cv_prog_ac_zmq_have_asciidoc
+if test -n "$ac_zmq_have_asciidoc"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_have_asciidoc" >&5
+$as_echo "$ac_zmq_have_asciidoc" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ # Extract the first word of "xmlto", so it can be a program name with args.
+set dummy xmlto; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_zmq_have_xmlto+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_zmq_have_xmlto"; then
+ ac_cv_prog_ac_zmq_have_xmlto="$ac_zmq_have_xmlto" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_zmq_have_xmlto="yes"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_ac_zmq_have_xmlto" && ac_cv_prog_ac_zmq_have_xmlto="no"
+fi
+fi
+ac_zmq_have_xmlto=$ac_cv_prog_ac_zmq_have_xmlto
+if test -n "$ac_zmq_have_xmlto"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_have_xmlto" >&5
+$as_echo "$ac_zmq_have_xmlto" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$ac_zmq_have_asciidoc" = "xno" -o "x$ac_zmq_have_xmlto" = "xno"; then
+ ac_zmq_build_doc="no"
+ # Tarballs built with 'make dist' ship with prebuilt documentation.
+ if ! test -f doc/zmq.7; then
+ ac_zmq_install_man="no"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed." >&5
+$as_echo "$as_me: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed." >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Documentation will not be built and manual pages will not be installed." >&5
+$as_echo "$as_me: WARNING: Documentation will not be built and manual pages will not be installed." >&2;}
+ fi
+ fi
+
+ # Do not install man pages if on mingw
+ if test "x$ac_zmq_on_mingw32" = "xyes"; then
+ ac_zmq_install_man="no"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
+$as_echo_n "checking whether to build documentation... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_build_doc" >&5
+$as_echo "$ac_zmq_build_doc" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install manpages" >&5
+$as_echo_n "checking whether to install manpages... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_install_man" >&5
+$as_echo "$ac_zmq_install_man" >&6; }
+
+ if test "x$ac_zmq_build_doc" = "xyes"; then
+ BUILD_DOC_TRUE=
+ BUILD_DOC_FALSE='#'
+else
+ BUILD_DOC_TRUE='#'
+ BUILD_DOC_FALSE=
+fi
+
+ if test "x$ac_zmq_install_man" = "xyes"; then
+ INSTALL_MAN_TRUE=
+ INSTALL_MAN_FALSE='#'
+else
+ INSTALL_MAN_TRUE='#'
+ INSTALL_MAN_FALSE=
+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; }
@@ -16120,8 +17831,7 @@ stdlib.h string.h sys/socket.h sys/time.h unistd.h limits.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -16155,58 +17865,6 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-# pkg-config is used if found, and is required for builds with OpenPGM.
-# However, we need to provide a way to disable it entirely when the user
-# knows what she's doing and it's use is undesirable, such as when
-# cross-compiling.
-
-# Check whether --with-pkg-config was given.
-if test "${with_pkg_config+set}" = set; then :
- withval=$with_pkg_config;
-fi
-
-if test "x$with_pkg_config" != "xno"; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_have_pkg_config+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$have_pkg_config"; then
- ac_cv_prog_have_pkg_config="$have_pkg_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_have_pkg_config="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_have_pkg_config" && ac_cv_prog_have_pkg_config="no"
-fi
-fi
-have_pkg_config=$ac_cv_prog_have_pkg_config
-if test -n "$have_pkg_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pkg_config" >&5
-$as_echo "$have_pkg_config" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-
-# Checks for typedefs, structures, and compiler characteristics.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
if test "${ac_cv_header_stdbool_h+set}" = set; then :
@@ -16439,7 +18097,56 @@ _ACEOF
;;
esac
-ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+# Checks for typedefs, structures, and compiler characteristics.
+if test "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then
+ {
+ ac_zmq_check_with_flag_save_CFLAGS="$CFLAGS"
+ ac_zmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS"
+
+ CFLAGS="$CFLAGS -wd279"
+ CPPFLAGS="$CPPFLAGS -wd279"
+
+ # Execute the macro
+ ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+ CFLAGS="$ac_zmq_check_with_flag_save_CFLAGS"
+ CPPFLAGS="$ac_zmq_check_with_flag_save_CPPFLAGS"
+}
+ {
+ ac_zmq_check_with_flag_save_CFLAGS="$CFLAGS"
+ ac_zmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS"
+
+ CFLAGS="$CFLAGS -wd279"
+ CPPFLAGS="$CPPFLAGS -wd279"
+
+ # Execute the macro
+ ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
+if test "x$ac_cv_type_ssize_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
+
+fi
+
+
+ CFLAGS="$ac_zmq_check_with_flag_save_CFLAGS"
+ CPPFLAGS="$ac_zmq_check_with_flag_save_CPPFLAGS"
+}
+else
+ ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = x""yes; then :
else
@@ -16450,7 +18157,7 @@ _ACEOF
fi
-ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
+ ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
if test "x$ac_cv_type_ssize_t" = x""yes; then :
else
@@ -16461,6 +18168,7 @@ _ACEOF
fi
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
if test "${ac_cv_header_time+set}" = set; then :
@@ -16545,28 +18253,17 @@ $as_echo "#define volatile /**/" >>confdefs.h
fi
-# Substs
-stdint="0"
-if test "x$HAVE_STDINT_H" = "xyes"; then
- stdint="1"
-fi
-
-inttypes="0"
-if test "x$HAVE_INTTYPES_H" = "xyes"; then
- inttypes="1"
-fi
-
# PGM extension
-pgm_ext="no"
+ac_zmq_pgm_ext="no"
-pgm_basename="libpgm-2-1-28~dfsg"
+pgm_basename="libpgm-5.1.114~dfsg"
# Check whether --with-pgm was given.
if test "${with_pgm+set}" = set; then :
- withval=$with_pgm; with_pgm_ext=yes
+ withval=$with_pgm; with_pgm_ext=$withval
else
with_pgm_ext=no
fi
@@ -16574,401 +18271,203 @@ fi
if test "x$with_pgm_ext" != "xno"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the PGM extension is supported on this platform" >&5
-$as_echo_n "checking if the PGM extension is supported on this platform... " >&6; }
- # OpenPGM is only supported by the vendor on x86 and AMD64 platforms...
- case "${host_cpu}" in
- i*86|x86_64)
- # Supported
- ;;
- *)
- as_fn_error "the PGM extension is not supported on the ${host_cpu} platform." "$LINENO" 5
- ;;
- esac
-
- # ... and on Linux/Windows/Solaris systems.
- case "${host_os}" in
- *linux*|*mingw32*|*solaris*)
- LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} -Wno-variadic-macros -Wno-long-long "
- ;;
- *)
- as_fn_error "the PGM extension is not supported on system ${host_os}." "$LINENO" 5
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
- # Test if we have pkg-config
- if test "x$with_pkg_config" != "xno"; then
- if test "x$have_pkg_config" != "xyes"; then
- as_fn_error "the --with-pgm option requires that pkg-config be installed." "$LINENO" 5;
- fi
-
- # Check for OpenPGM dependencies
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
- ac_pt_PKG_CONFIG=$PKG_CONFIG
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_pt_PKG_CONFIG" = x; then
- PKG_CONFIG=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- PKG_CONFIG=$ac_pt_PKG_CONFIG
- fi
-else
- PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
+ # This allows placing the tar.gz to foreign/openpgm
+ # and using ./configure --with-pgm=libpgm-x.y.z
+ if test "x$with_pgm_ext" != "xyes"; then
+ pgm_basename="$with_pgm_ext"
+ fi
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=0.9.0
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; }
- PKG_CONFIG=""
- fi
+ # Unpack libpgm
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Unpacking ${pgm_basename}.tar.gz" >&5
+$as_echo "$as_me: Unpacking ${pgm_basename}.tar.gz" >&6;}
+ ac_zmq_pwd=`pwd`
+ cd foreign/openpgm
-fi
+ if ! (gzip -dc "${pgm_basename}.tar.gz" || echo "failed") | ${am__untar}; then
+ as_fn_error $? "cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file" "$LINENO" 5
+ fi
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
-$as_echo_n "checking for GLIB... " >&6; }
+ cd "${ac_zmq_pwd}"
-if test -n "$PKG_CONFIG"; then
- if test -n "$GLIB_CFLAGS"; then
- pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
- else
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 gthread-2.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 gthread-2.0") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 gthread-2.0" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
- if test -n "$GLIB_LIBS"; then
- pkg_cv_GLIB_LIBS="$GLIB_LIBS"
- else
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 gthread-2.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 gthread-2.0") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 gthread-2.0" 2>/dev/null`
-else
- pkg_failed=yes
-fi
+ if test -d foreign/openpgm/build-staging; then
+ rm -rf foreign/openpgm/build-staging
fi
-else
- pkg_failed=untried
-fi
+ mv foreign/openpgm/${pgm_basename} foreign/openpgm/build-staging
+ pgm_srcdir=foreign/openpgm/build-staging/openpgm/pgm
+ if ! test -d foreign/openpgm/build-staging/openpgm/pgm/config; then
+ mkdir foreign/openpgm/build-staging/openpgm/pgm/config
+ fi
-if test $pkg_failed = yes; then
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 gthread-2.0"`
- else
- GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 gthread-2.0"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$GLIB_PKG_ERRORS" >&5
- as_fn_error "Package requirements (glib-2.0 gthread-2.0) were not met:
-$GLIB_PKG_ERRORS
+subdirs="$subdirs foreign/openpgm/build-staging/openpgm/pgm/"
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-Alternatively, you may set the environment variables GLIB_CFLAGS
-and GLIB_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+ # Success!
-Alternatively, you may set the environment variables GLIB_CFLAGS
-and GLIB_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+$as_echo "#define ZMQ_HAVE_OPENPGM 1" >>confdefs.h
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
-else
- GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
- GLIB_LIBS=$pkg_cv_GLIB_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- :
+ ac_zmq_pgm_ext="yes"
fi
- LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} ${GLIB_CFLAGS} "
- LIBZMQ_EXTRA_LDFLAGS="${LIBZMQ_EXTRA_LDFLAGS} ${GLIB_LIBS} "
- fi
-
- # Gzip, Perl and Python are required duing PGM build
- # Extract the first word of "gzip", so it can be a program name with args.
-set dummy gzip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_have_gzip+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$have_gzip"; then
- ac_cv_prog_have_gzip="$have_gzip" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_have_gzip="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
- test -z "$ac_cv_prog_have_gzip" && ac_cv_prog_have_gzip="no"
-fi
-fi
-have_gzip=$ac_cv_prog_have_gzip
-if test -n "$have_gzip"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gzip" >&5
-$as_echo "$have_gzip" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+# Set -Wall, -Werror and -pedantic
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- if test "x$have_gzip" != "xyes"; then
- as_fn_error "gzip is required for building the PGM extension." "$LINENO" 5
- fi
- # Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_have_perl+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$have_perl"; then
- ac_cv_prog_have_perl="$have_perl" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_have_perl="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+# Check how to enable -Wall
+{
- test -z "$ac_cv_prog_have_perl" && ac_cv_prog_have_perl="no"
-fi
-fi
-have_perl=$ac_cv_prog_have_perl
-if test -n "$have_perl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_perl" >&5
-$as_echo "$have_perl" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable additional warnings for C++ compiler" >&5
+$as_echo_n "checking how to enable additional warnings for C++ compiler... " >&6; }
+
+ ac_zmq_cv_cxx_wall_flag=""
+
+ # C compilers
+ case "xcxx" in
+ xc)
+ # GCC, clang and ICC
+ if test "x$GCC" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_wall_flag="-Wall"
+ # Sun studio
+ elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_wall_flag="-v"
+ fi
+ ;;
+ xcxx)
+ # GCC, clang and ICC
+ if test "x$GXX" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_intel_compiler" = "xyes" -o \
+ "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_wall_flag="-Wall"
+ # Sun studio
+ elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_wall_flag="+w"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ # Call the action
+ if test "x$ac_zmq_cv_cxx_wall_flag" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_wall_flag" >&5
+$as_echo "$ac_zmq_cv_cxx_wall_flag" >&6; }
+ CPPFLAGS="$ac_zmq_cv_cxx_wall_flag $CPPFLAGS"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
- if test "x$have_perl" != "xyes"; then
- as_fn_error "perl is required for building the PGM extension." "$LINENO" 5
fi
- # Extract the first word of "python", so it can be a program name with args.
-set dummy python; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_have_python+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$have_python"; then
- ac_cv_prog_have_python="$have_python" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_have_python="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+}
- test -z "$ac_cv_prog_have_python" && ac_cv_prog_have_python="no"
-fi
-fi
-have_python=$ac_cv_prog_have_python
-if test -n "$have_python"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_python" >&5
-$as_echo "$have_python" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+if test "x$ac_zmq_werror" = "xyes" -a "x$ac_zmq_cv_cxx_sun_studio_compiler" != "xyes"; then
+ {
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to turn warnings to errors in C++ compiler" >&5
+$as_echo_n "checking how to turn warnings to errors in C++ compiler... " >&6; }
+
+ ac_zmq_cv_cxx_werror_flag=""
+
+ # C compilers
+ case "xcxx" in
+ xc)
+ # GCC, clang and ICC
+ if test "x$GCC" = "xyes" -o "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_werror_flag="-Werror"
+ # Sun studio
+ elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_werror_flag="-errwarn=%all"
+ fi
+ ;;
+ xcxx)
+ # GCC, clang and ICC
+ if test "x$GXX" = "xyes" -o "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_werror_flag="-Werror"
+ # Sun studio
+ elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_werror_flag="-errwarn=%all"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ # Call the action
+ if test "x$ac_zmq_cv_cxx_werror_flag" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_werror_flag" >&5
+$as_echo "$ac_zmq_cv_cxx_werror_flag" >&6; }
+ CPPFLAGS="$ac_zmq_cv_cxx_werror_flag $CPPFLAGS"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
- if test "x$have_python" != "xyes"; then
- as_fn_error "python is required for building the PGM extension." "$LINENO" 5
fi
-
- # Unpack libpgm
- { $as_echo "$as_me:${as_lineno-$LINENO}: Unpacking ${pgm_basename}.tar.gz" >&5
-$as_echo "$as_me: Unpacking ${pgm_basename}.tar.gz" >&6;}
- if ! gzip -dc foreign/openpgm/${pgm_basename}.tar.gz | tar -xf - -C foreign/openpgm/; then
- as_fn_error "cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file." "$LINENO" 5
- fi
-
- # Success!
-
-$as_echo "#define ZMQ_HAVE_OPENPGM 1" >>confdefs.h
-
- pgm_ext="yes"
+}
fi
-# -Wall, -Werror and -pedantic are GNU compiler specific.
-# Also, these break OpenPGM so don't specify them if we are building with it.
-if test "x$gnu_compilers" = "xyes" -a "x$pgm_ext" = "xno"; then
- CPPFLAGS="-Wall $CPPFLAGS"
+if test "x$ac_zmq_pedantic" = "xyes"; then
+ {
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable strict standards compliance in C++ compiler" >&5
+$as_echo_n "checking how to enable strict standards compliance in C++ compiler... " >&6; }
+
+ ac_zmq_cv_cxx_strict_flag=""
+
+ # C compilers
+ case "xcxx" in
+ xc)
+ # GCC, clang and ICC
+ if test "x$GCC" = "xyes" -o "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_strict_flag="-pedantic"
+ elif test "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_strict_flag="-strict-ansi"
+ # Sun studio
+ elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_strict_flag="-Xc"
+ fi
+ ;;
+ xcxx)
+ # GCC, clang and ICC
+ if test "x$GXX" = "xyes" -o "x$ac_zmq_cv_cxx_clang_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_strict_flag="-pedantic"
+ elif test "x$ac_zmq_cv_cxx_intel_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_strict_flag="-strict-ansi"
+ # Sun studio
+ elif test "x$ac_zmq_cv_cxx_sun_studio_compiler" = "xyes"; then
+ ac_zmq_cv_cxx_strict_flag="-compat=5"
+ fi
+ ;;
+ *)
+ ;;
+ esac
- if test "x$pedantic" = "xyes"; then
- CPPFLAGS="-pedantic $CPPFLAGS"
- fi
+ # Call the action
+ if test "x$ac_zmq_cv_cxx_strict_flag" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_zmq_cv_cxx_strict_flag" >&5
+$as_echo "$ac_zmq_cv_cxx_strict_flag" >&6; }
+ CPPFLAGS="$ac_zmq_cv_cxx_strict_flag $CPPFLAGS"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
- if test "x$werror" = "xyes"; then
- CPPFLAGS="-Werror $CPPFLAGS"
fi
+}
fi
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
- if test "x$pgm_ext" = "xyes"; then
+ if test "x$ac_zmq_pgm_ext" = "xyes"; then
BUILD_PGM_TRUE=
BUILD_PGM_FALSE='#'
else
@@ -16976,15 +18475,7 @@ else
BUILD_PGM_FALSE=
fi
- if test "x$pgm_ext" = "xno"; then
- BUILD_NO_PGM_TRUE=
- BUILD_NO_PGM_FALSE='#'
-else
- BUILD_NO_PGM_TRUE='#'
- BUILD_NO_PGM_FALSE=
-fi
-
- if test "x$on_mingw32" = "xyes"; then
+ if test "x$ac_zmq_on_mingw32" = "xyes"; then
ON_MINGW_TRUE=
ON_MINGW_FALSE='#'
else
@@ -16992,30 +18483,6 @@ else
ON_MINGW_FALSE=
fi
- if test "x$install_man" = "xyes"; then
- INSTALL_MAN_TRUE=
- INSTALL_MAN_FALSE='#'
-else
- INSTALL_MAN_TRUE='#'
- INSTALL_MAN_FALSE=
-fi
-
- if test "x$build_doc" = "xyes"; then
- BUILD_DOC_TRUE=
- BUILD_DOC_FALSE='#'
-else
- BUILD_DOC_TRUE='#'
- BUILD_DOC_FALSE=
-fi
-
-
-
-
-
-# Subst LIBZMQ_EXTRA_CXXFLAGS & LDFLAGS
-
-
-
# Checks for library functions.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
@@ -17055,8 +18522,36 @@ for ac_func in perror gettimeofday memset socket getifaddrs freeifaddrs
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_header in alloca.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default"
+if test "x$ac_cv_header_alloca_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "x$with_pgm_ext" != "xno"; then
+
+ # Check additional functions for PGM build
+ for ac_func in poll epoll_create pselect getopt vasprintf getprotobyname_r2 getprotobyname_r
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -17065,7 +18560,53 @@ fi
done
-ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile perf/Makefile src/libzmq.pc devices/Makefile devices/zmq_forwarder/Makefile devices/zmq_streamer/Makefile devices/zmq_queue/Makefile builds/msvc/Makefile"
+ if test "x$ac_cv_func_gettimeofday" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETTIMEOFDAY $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_getprotobyname_r2" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETPROTOBYNAME_R2 $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_poll" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_POLL $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_epoll_create" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_EPOLL $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_getifaddrs" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETIFADDRS $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_getopt" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETOPT $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_pselect" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_PSELECT $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_header_alloca_h" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_ALLOCA_H $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_c_compiler_gnu" = "xno"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_ISO_VARARGS $LIBZMQ_EXTRA_CFLAGS"
+ else
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GNU_VARARGS $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_vasprintf" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_VASPRINTF $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ case "${host_cpu}" in
+ i*86|x86_64|amd64|*sparc*)
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_TSC -DCONFIG_HAVE_RTC -DCONFIG_HAVE_HPET $LIBZMQ_EXTRA_CFLAGS"
+ ;;
+ *sparc*|s390*)
+ ;;
+ esac
+fi
+
+# Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS
+
+
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile perf/Makefile src/libzmq.pc builds/msvc/Makefile tests/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -17150,6 +18691,7 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -17173,39 +18715,35 @@ else
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error "conditional \"AMDEP\" was never defined.
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCC\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PGM_TRUE}" && test -z "${BUILD_PGM_FALSE}"; then
- as_fn_error "conditional \"BUILD_PGM\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${BUILD_NO_PGM_TRUE}" && test -z "${BUILD_NO_PGM_FALSE}"; then
- as_fn_error "conditional \"BUILD_NO_PGM\" was never defined.
+if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_DOC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${ON_MINGW_TRUE}" && test -z "${ON_MINGW_FALSE}"; then
- as_fn_error "conditional \"ON_MINGW\" was never defined.
+if test -z "${INSTALL_MAN_TRUE}" && test -z "${INSTALL_MAN_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_MAN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${INSTALL_MAN_TRUE}" && test -z "${INSTALL_MAN_FALSE}"; then
- as_fn_error "conditional \"INSTALL_MAN\" was never defined.
+if test -z "${BUILD_PGM_TRUE}" && test -z "${BUILD_PGM_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_PGM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then
- as_fn_error "conditional \"BUILD_DOC\" was never defined.
+if test -z "${ON_MINGW_TRUE}" && test -z "${ON_MINGW_FALSE}"; then
+ as_fn_error $? "conditional \"ON_MINGW\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@@ -17355,19 +18893,19 @@ export LANGUAGE
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -17563,7 +19101,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -17616,8 +19154,8 @@ 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.0.10, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+This file was extended by zeromq $as_me 2.1.3, which was
+generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -17682,11 +19220,11 @@ _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.0.10
-configured by $0, generated by GNU Autoconf 2.65,
+zeromq config.status 2.1.3
+configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -17704,11 +19242,16 @@ ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -17730,6 +19273,7 @@ do
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -17742,7 +19286,7 @@ do
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
+ as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -17751,7 +19295,7 @@ Try \`$0 --help' for more information.";;
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -17805,13 +19349,13 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
sed_quote_subst='$sed_quote_subst'
double_quote_subst='$double_quote_subst'
delay_variable_subst='$delay_variable_subst'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
@@ -18165,13 +19709,10 @@ do
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"perf/Makefile") CONFIG_FILES="$CONFIG_FILES perf/Makefile" ;;
"src/libzmq.pc") CONFIG_FILES="$CONFIG_FILES src/libzmq.pc" ;;
- "devices/Makefile") CONFIG_FILES="$CONFIG_FILES devices/Makefile" ;;
- "devices/zmq_forwarder/Makefile") CONFIG_FILES="$CONFIG_FILES devices/zmq_forwarder/Makefile" ;;
- "devices/zmq_streamer/Makefile") CONFIG_FILES="$CONFIG_FILES devices/zmq_streamer/Makefile" ;;
- "devices/zmq_queue/Makefile") CONFIG_FILES="$CONFIG_FILES devices/zmq_queue/Makefile" ;;
"builds/msvc/Makefile") CONFIG_FILES="$CONFIG_FILES builds/msvc/Makefile" ;;
+ "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
esac
done
@@ -18209,7 +19750,7 @@ $debug ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -18226,7 +19767,7 @@ if test "x$ac_cr" = x; then
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
@@ -18240,18 +19781,18 @@ _ACEOF
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -18340,20 +19881,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -18381,7 +19930,7 @@ for ac_last_try in false false :; do
if test -z "$ac_t"; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -18466,7 +20015,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -18479,7 +20028,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -18507,7 +20056,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -18534,7 +20083,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -18671,22 +20220,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$tmp/stdin"
case $ac_file in
-) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -18697,19 +20246,19 @@ which seems to be undefined. Please make sure it is defined." >&2;}
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
+ || as_fn_error $? "could not create -" "$LINENO" 5
fi
# Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file"
@@ -18902,6 +20451,9 @@ available_tags="CXX "
# ### BEGIN LIBTOOL CONFIG
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
# Assembler program.
AS=$AS
@@ -18918,9 +20470,6 @@ macro_revision=$macro_revision
# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
# What type of objects to build.
pic_mode=$pic_mode
@@ -19667,7 +21216,7 @@ _ACEOF
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -19688,7 +21237,152 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
+ $ac_cs_success || as_fn_exit 1
+fi
+
+#
+# CONFIG_SUBDIRS section.
+#
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+ # so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ eval "set x $ac_configure_args"
+ shift
+ for ac_arg
+ do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case $ac_arg in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+ | --c=*)
+ ;;
+ --config-cache | -C)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ ;;
+ --disable-option-checking)
+ ;;
+ *)
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+ esac
+ done
+
+ # Always prepend --prefix to ensure using the same prefix
+ # in subdir configurations.
+ ac_arg="--prefix=$prefix"
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+ # Pass --silent
+ if test "$silent" = yes; then
+ ac_sub_configure_args="--silent $ac_sub_configure_args"
+ fi
+
+ # Always prepend --disable-option-checking to silence warnings, since
+ # different subdirs can have different --enable and --with options.
+ ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+
+ ac_popdir=`pwd`
+ for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ test -d "$srcdir/$ac_dir" || continue
+
+ ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+ $as_echo "$ac_msg" >&6
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ cd "$ac_dir"
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ ac_sub_configure=$ac_srcdir/configure.gnu
+ elif test -f "$ac_srcdir/configure"; then
+ ac_sub_configure=$ac_srcdir/configure
+ elif test -f "$ac_srcdir/configure.in"; then
+ # This should be Cygnus configure.
+ ac_sub_configure=$ac_aux_dir/configure
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+ # Make the cache file name correct relative to the subdirectory.
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+ *) # Relative name.
+ ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ # The eval makes quoting arguments work.
+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+ fi
+
+ cd "$ac_popdir"
+ done
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
diff --git a/configure.in b/configure.in
index 46c9ce0..1d85fa9 100644
--- a/configure.in
+++ b/configure.in
@@ -6,104 +6,99 @@ AC_PREREQ(2.61)
# the version.sh script. Hence, it should be updated there.
# The version in git should reflect the *next* version planned.
#
-AC_INIT([zeromq],
- m4_esyscmd([./version.sh | tr -d '\n']),
- [zeromq-dev@lists.zeromq.org])
+AC_INIT([zeromq],[m4_esyscmd([./version.sh])],[zeromq-dev@lists.zeromq.org])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AM_CONFIG_HEADER(src/platform.hpp)
AM_INIT_AUTOMAKE(tar-ustar dist-zip foreign)
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# This lets us use PACKAGE_VERSION in Makefiles
AC_SUBST(PACKAGE_VERSION)
# Libtool -version-info (ABI version)
#
-# Currently 0.0.0 ("unstable"). Don't change this unless you
-# know exactly what you're doing and have read and understand
+# Don't change this unless you know exactly what you're doing and have read and
+# understand:
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
#
-# libzmq -version-info
-LTVER="0:0:0"
+# Changes:
+#
+# ZeroMQ versions prior to 2.1.0 use 0.0.0 ("unstable")
+# ZeroMQ version 2.1.0: 1:0:0
+#
+# libzmq -version-info current:revision:age
+LTVER="1:0:0"
AC_SUBST(LTVER)
+# Take a copy of original flags
+ZMQ_ORIG_CFLAGS="${CFLAGS:-none}"
+ZMQ_ORIG_CPPFLAGS="${CPPFLAGS:-none}"
+ZMQ_ORIG_CXXFLAGS="${CXXFLAGS:-none}"
+
# Checks for programs.
AC_PROG_CC
+AC_PROG_CC_C99
AC_PROG_CXX
AM_PROG_CC_C_O
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
AC_PROG_SED
AC_PROG_AWK
-# Set a helper variable to indicate GNU C and C++ are in use
-if test "x$GCC" = "xyes" -a "x$GXX" = "xyes"; then
- gnu_compilers="yes"
-else
- gnu_compilers="no"
-fi
-
-# Checks for libraries.
-AC_CHECK_LIB([pthread], [pthread_create])
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_PATH_PROG([XMLTO], [xmlto])
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_PATH_PROG([ASCIIDOC], [asciidoc])
-# Extra CXXFLAGS are appended at the end of CXXFLAGS for libzmq.
-LIBZMQ_EXTRA_CXXFLAGS=""
+# Libtool configuration for different targets. See acinclude.m4
+AC_ZMQ_CONFIG_LIBTOOL
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
-# Extra LDFLAGS are appended at the end of LDFLAGS for libzmq.
-LIBZMQ_EXTRA_LDFLAGS=""
+# Check whether to build a with debug symbols
+AC_ZMQ_CHECK_ENABLE_DEBUG
-# By default compiling with -pedantic except QNX and OSX.
-pedantic="yes"
+# Checks for libraries.
+AC_CHECK_LIB([pthread], [pthread_create])
-#By default compiling with -Werror except OSX.
-werror="yes"
+# Set pedantic
+ac_zmq_pedantic="yes"
-#Whether we are on mingw or not.
-on_mingw32="no"
+# By default compiling with -Werror except OSX.
+ac_zmq_werror="yes"
-# Host speciffic checks
-AC_CANONICAL_HOST
+# By default use DSO visibility
+ac_zmq_dso_visibility="yes"
-# Determine whether or not documentation should be built and installed.
-build_doc="yes"
-install_man="yes"
-# Check for asciidoc and xmlto and don't build the docs if these are not installed.
-AC_CHECK_PROG(have_asciidoc, asciidoc, yes, no)
-AC_CHECK_PROG(have_xmlto, xmlto, yes, no)
-if test "x$have_asciidoc" = "xno" -o "x$have_xmlto" = "xno"; then
- build_doc="no"
- # Tarballs built with 'make dist' ship with prebuilt documentation.
- if ! test -f doc/zmq.7; then
- install_man="no"
- AC_MSG_WARN([You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed. Documentation will not be built and manual pages will not be installed.])
- fi
-fi
-AC_MSG_CHECKING([whether to build documentation])
-AC_MSG_RESULT([$build_doc])
-AC_MSG_CHECKING([whether to install manpages])
-AC_MSG_RESULT([$install_man])
+# Whether we are on mingw or not.
+ac_zmq_on_mingw32="no"
# Set some default features required by 0MQ code.
CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
+# For host type checks
+AC_CANONICAL_HOST
+
# OS-specific tests
case "${host_os}" in
*linux*)
- # Define on Linux to enable all library features
- CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
+ # Define on Linux to enable all library features. Define if using a gnu compiler
+ if test "x$GXX" = "xyes"; then
+ CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
+ fi
AC_DEFINE(ZMQ_HAVE_LINUX, 1, [Have Linux OS])
- AC_CHECK_LIB(uuid, main, ,
+ AC_CHECK_LIB(rt, sem_init)
+ AC_CHECK_LIB(uuid, uuid_generate, ,
[AC_MSG_ERROR([cannot link with -luuid, install uuid-dev.])])
;;
*solaris*)
# Define on Solaris to enable all library features
CPPFLAGS="-D_PTHREADS $CPPFLAGS"
AC_DEFINE(ZMQ_HAVE_SOLARIS, 1, [Have Solaris OS])
- AC_CHECK_LIB(socket, main)
- AC_CHECK_LIB(nsl, main)
- AC_CHECK_LIB(rt, main)
- AC_CHECK_LIB(uuid, main, ,
+ AC_CHECK_LIB(socket, socket)
+ AC_CHECK_LIB(nsl, gethostbyname)
+ AC_CHECK_LIB(rt, sem_init)
+ AC_CHECK_LIB(uuid, uuid_generate, ,
[AC_MSG_ERROR([cannot link with -luuid, install uuid-dev.])])
AC_MSG_CHECKING([whether atomic operations can be used])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
@@ -127,10 +122,12 @@ case "${host_os}" in
*darwin*)
# Define on Darwin to enable all library features
CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS"
- pedantic="no"
- werror="no"
+ ac_zmq_pedantic="no"
+ ac_zmq_werror="no"
AC_DEFINE(ZMQ_HAVE_OSX, 1, [Have DarwinOSX OS])
- LIBZMQ_EXTRA_CXXFLAGS+="-Wno-uninitialized"
+ AC_LANG_PUSH([C++])
+ AC_ZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-uninitialized])
+ AC_LANG_POP([C++])
;;
*netbsd*)
# Define on NetBSD to enable all library features
@@ -139,7 +136,7 @@ case "${host_os}" in
# NetBSD 5.0 and newer provides atomic operations but we can
# only use these on systems where PR #42842 has been fixed so
# we must try and link a test program using C++.
- netbsd_has_atomic=no
+ ac_zmq_netbsd_has_atomic=no
AC_MSG_CHECKING([whether atomic operations can be used])
AC_LANG_PUSH([C++])
AC_LINK_IFELSE([AC_LANG_PROGRAM(
@@ -147,11 +144,11 @@ case "${host_os}" in
[[uint32_t value;
atomic_cas_32 (&value, 0, 0);
return 0;]])],
- [netbsd_has_atomic=yes],
- [netbsd_has_atomic=no])
+ [ac_zmq_netbsd_has_atomic=yes],
+ [ac_zmq_netbsd_has_atomic=no])
AC_LANG_POP([C++])
- AC_MSG_RESULT([$netbsd_has_atomic])
- if test "x$netbsd_has_atomic" = "xno"; then
+ AC_MSG_RESULT([$ac_zmq_netbsd_has_atomic])
+ if test "x$ac_zmq_netbsd_has_atomic" = "xno"; then
AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes])
fi
;;
@@ -161,19 +158,21 @@ case "${host_os}" in
AC_DEFINE(ZMQ_HAVE_OPENBSD, 1, [Have OpenBSD OS])
;;
*nto-qnx*)
- pedantic="no"
+ ac_zmq_pedantic="no"
AC_DEFINE(ZMQ_HAVE_QNXNTO, 1, [Have QNX Neutrino OS])
- AC_CHECK_LIB(socket,main)
- AC_CHECK_LIB(crypto,RAND_bytes)
+ AC_CHECK_LIB(socket, socket)
+ AC_CHECK_LIB(crypto, RAND_bytes)
;;
*aix*)
AC_DEFINE(ZMQ_HAVE_AIX, 1, [Have AIX OS])
+ AC_CHECK_LIB(crypto,RAND_bytes)
;;
*hpux*)
# Define on HP-UX to enable all library features
- CPPFLAGS="-D_POSIX_C_SOURCE=200112L"
+ CPPFLAGS="-D_POSIX_C_SOURCE=200112L $CPPFLAGS"
AC_DEFINE(ZMQ_HAVE_HPUX, 1, [Have HPUX OS])
- AC_CHECK_LIB(rt, main)
+ AC_CHECK_LIB(rt, sem_init)
+ AC_CHECK_LIB(crypto, RAND_bytes)
;;
*mingw32*)
AC_DEFINE(ZMQ_HAVE_WINDOWS, 1, [Have Windows OS])
@@ -185,9 +184,16 @@ case "${host_os}" in
[AC_MSG_ERROR([cannot link with rpcrt4.dll.])])
AC_CHECK_LIB(iphlpapi, main, ,
[AC_MSG_ERROR([cannot link with iphlpapi.dll.])])
- CFLAGS="${CFLAGS} -std=c99"
- on_mingw32="yes"
- install_man="no"
+ # mingw32 defines __int64_t as long long
+ AC_LANG_PUSH([C++])
+ AC_ZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-long-long])
+ AC_LANG_POP([C++])
+ ac_zmq_on_mingw32="yes"
+ ac_zmq_dso_visibility="no"
+
+ if test "x$enable_static" = "xyes"; then
+ AC_MSG_ERROR([Building static libraries is not supported under MinGW32])
+ fi
;;
*cygwin*)
# Define on Cygwin to enable all library features
@@ -195,26 +201,46 @@ case "${host_os}" in
AC_DEFINE(ZMQ_HAVE_CYGWIN, 1, [Have Cygwin])
# Cygwin provides libuuid as part of the e2fsprogs package, and somewhat
# uselessly installs the library in /usr/lib/e2fsprogs
- LDFLAGS="${LDFLAGS} -L/usr/lib/e2fsprogs"
+ LDFLAGS="-L/usr/lib/e2fsprogs ${LDFLAGS}"
AC_CHECK_LIB(uuid, uuid_generate, ,
[AC_MSG_ERROR([cannot link with -luuid, install the e2fsprogs package.])])
+
+ if test "x$enable_static" = "xyes"; then
+ AC_MSG_ERROR([Building static libraries is not supported under Cygwin])
+ fi
;;
*)
AC_MSG_ERROR([unsupported system: ${host_os}.])
;;
esac
+#
+# Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec
+#
+if test "x$ac_zmq_dso_visibility" = "xyes"; then
+ AC_LANG_PUSH([C])
+ AC_ZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CFLAGS}"])
+ AC_LANG_POP([C])
+
+ AC_LANG_PUSH([C++])
+ AC_ZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CXXFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}"])
+ AC_LANG_POP([C++])
+fi
+
# CPU-specific optimizations
case "${host_cpu}" in
*sparc*)
- if test "x$gnu_compilers" = "xyes"; then
- CPPFLAGS="$CPPFLAGS -mcpu=v9"
- fi
+ AC_LANG_PUSH([C++])
+ AC_ZMQ_CHECK_LANG_FLAG_PREPEND([-mcpu=v9])
+ AC_LANG_POP([C++])
;;
*)
;;
esac
+# Check whether to build docs / install man pages
+AC_ZMQ_CHECK_DOC_BUILD
+
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(errno.h arpa/inet.h netinet/tcp.h netinet/in.h stddef.h \
@@ -224,146 +250,150 @@ stdlib.h string.h sys/socket.h sys/time.h unistd.h limits.h)
AC_CHECK_HEADERS(ifaddrs.h, [AC_DEFINE(ZMQ_HAVE_IFADDRS, 1, [Have ifaddrs.h header.])])
# Use c++ in subsequent tests
-AC_LANG(C++)
-
-# pkg-config is used if found, and is required for builds with OpenPGM.
-# However, we need to provide a way to disable it entirely when the user
-# knows what she's doing and it's use is undesirable, such as when
-# cross-compiling.
-AC_ARG_WITH([pkg-config], [AS_HELP_STRING([--without-pkg-config],
- [do not use pkg-config [default=no]])])
-if test "x$with_pkg_config" != "xno"; then
- AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
-fi
+AC_LANG_PUSH(C++)
-# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_TYPE_SSIZE_T
+# Checks for typedefs, structures, and compiler characteristics.
+if test "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then
+ dnl 279: controlling expression is constant
+ dnl Fixes build with ICC 12.x
+ AC_ZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SIZE_T])
+ AC_ZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SSIZE_T])
+else
+ AC_TYPE_SIZE_T
+ AC_TYPE_SSIZE_T
+fi
AC_HEADER_TIME
AC_TYPE_UINT32_T
AC_C_VOLATILE
-# Substs
-stdint="0"
-if test "x$HAVE_STDINT_H" = "xyes"; then
- stdint="1"
-fi
-
-inttypes="0"
-if test "x$HAVE_INTTYPES_H" = "xyes"; then
- inttypes="1"
-fi
-
# PGM extension
-pgm_ext="no"
+ac_zmq_pgm_ext="no"
-pgm_basename="libpgm-2-1-28~dfsg"
+pgm_basename="libpgm-5.1.114~dfsg"
AC_SUBST(pgm_basename)
AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm],
[build libzmq with PGM extension [default=no]])],
- [with_pgm_ext=yes], [with_pgm_ext=no])
+ [with_pgm_ext=$withval], [with_pgm_ext=no])
if test "x$with_pgm_ext" != "xno"; then
- AC_MSG_CHECKING([if the PGM extension is supported on this platform])
- # OpenPGM is only supported by the vendor on x86 and AMD64 platforms...
- case "${host_cpu}" in
- i*86|x86_64)
- # Supported
- ;;
- *)
- AC_MSG_ERROR([the PGM extension is not supported on the ${host_cpu} platform.])
- ;;
- esac
-
- # ... and on Linux/Windows/Solaris systems.
- case "${host_os}" in
- *linux*|*mingw32*|*solaris*)
- LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} -Wno-variadic-macros -Wno-long-long "
- ;;
- *)
- AC_MSG_ERROR([the PGM extension is not supported on system ${host_os}.])
- ;;
- esac
- AC_MSG_RESULT([yes])
+ # This allows placing the tar.gz to foreign/openpgm
+ # and using ./configure --with-pgm=libpgm-x.y.z
+ if test "x$with_pgm_ext" != "xyes"; then
+ pgm_basename="$with_pgm_ext"
+ fi
- # Test if we have pkg-config
- if test "x$with_pkg_config" != "xno"; then
- if test "x$have_pkg_config" != "xyes"; then
- AC_MSG_ERROR([the --with-pgm option requires that pkg-config be installed.]);
- fi
+ # Unpack libpgm
+ AC_MSG_NOTICE([Unpacking ${pgm_basename}.tar.gz])
+ ac_zmq_pwd=`pwd`
+ cd foreign/openpgm
- # Check for OpenPGM dependencies
- PKG_CHECK_MODULES([GLIB], [glib-2.0 gthread-2.0])
- LIBZMQ_EXTRA_CXXFLAGS="${LIBZMQ_EXTRA_CXXFLAGS} ${GLIB_CFLAGS} "
- LIBZMQ_EXTRA_LDFLAGS="${LIBZMQ_EXTRA_LDFLAGS} ${GLIB_LIBS} "
+ if ! (gzip -dc "${pgm_basename}.tar.gz" || echo "failed") | ${am__untar}; then
+ AC_MSG_ERROR([cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file])
fi
-
- # Gzip, Perl and Python are required duing PGM build
- AC_CHECK_PROG(have_gzip, gzip, yes, no)
- if test "x$have_gzip" != "xyes"; then
- AC_MSG_ERROR([gzip is required for building the PGM extension.])
- fi
- AC_CHECK_PROG(have_perl, perl, yes, no)
- if test "x$have_perl" != "xyes"; then
- AC_MSG_ERROR([perl is required for building the PGM extension.])
- fi
- AC_CHECK_PROG(have_python, python, yes, no)
- if test "x$have_python" != "xyes"; then
- AC_MSG_ERROR([python is required for building the PGM extension.])
+
+ cd "${ac_zmq_pwd}"
+
+ if test -d foreign/openpgm/build-staging; then
+ rm -rf foreign/openpgm/build-staging
fi
- # Unpack libpgm
- AC_MSG_NOTICE([Unpacking ${pgm_basename}.tar.gz])
- if ! gzip -dc foreign/openpgm/${pgm_basename}.tar.gz | tar -xf - -C foreign/openpgm/; then
- AC_MSG_ERROR([cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file.])
+ mv foreign/openpgm/${pgm_basename} foreign/openpgm/build-staging
+ pgm_srcdir=foreign/openpgm/build-staging/openpgm/pgm
+
+ if ! test -d foreign/openpgm/build-staging/openpgm/pgm/config; then
+ mkdir foreign/openpgm/build-staging/openpgm/pgm/config
fi
+ AC_SUBST(pgm_srcdir)
+ AC_CONFIG_SUBDIRS([foreign/openpgm/build-staging/openpgm/pgm/])
+
# Success!
AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension])
- pgm_ext="yes"
+ ac_zmq_pgm_ext="yes"
fi
-# -Wall, -Werror and -pedantic are GNU compiler specific.
-# Also, these break OpenPGM so don't specify them if we are building with it.
-if test "x$gnu_compilers" = "xyes" -a "x$pgm_ext" = "xno"; then
- CPPFLAGS="-Wall $CPPFLAGS"
+# Set -Wall, -Werror and -pedantic
+AC_LANG_PUSH([C++])
- if test "x$pedantic" = "xyes"; then
- CPPFLAGS="-pedantic $CPPFLAGS"
- fi
+# Check how to enable -Wall
+AC_ZMQ_LANG_WALL([CPPFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_wall_flag $CPPFLAGS"])
- if test "x$werror" = "xyes"; then
- CPPFLAGS="-Werror $CPPFLAGS"
- fi
+if test "x$ac_zmq_werror" = "xyes" -a "x$ac_zmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" != "xyes"; then
+ AC_ZMQ_LANG_WERROR([CPPFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_werror_flag $CPPFLAGS"])
fi
-AM_CONDITIONAL(BUILD_PGM, test "x$pgm_ext" = "xyes")
-AM_CONDITIONAL(BUILD_NO_PGM, test "x$pgm_ext" = "xno")
-AM_CONDITIONAL(ON_MINGW, test "x$on_mingw32" = "xyes")
-AM_CONDITIONAL(INSTALL_MAN, test "x$install_man" = "xyes")
-AM_CONDITIONAL(BUILD_DOC, test "x$build_doc" = "xyes")
-
-AC_SUBST(stdint)
-AC_SUBST(inttypes)
-
-# Subst LIBZMQ_EXTRA_CXXFLAGS & LDFLAGS
-AC_SUBST(LIBZMQ_EXTRA_CXXFLAGS)
-AC_SUBST(LIBZMQ_EXTRA_LDFLAGS)
+if test "x$ac_zmq_pedantic" = "xyes"; then
+ AC_ZMQ_LANG_STRICT([CPPFLAGS="$ac_zmq_cv_[]_AC_LANG_ABBREV[]_strict_flag $CPPFLAGS"])
+fi
+AC_LANG_POP([C++])
+AM_CONDITIONAL(BUILD_PGM, test "x$ac_zmq_pgm_ext" = "xyes")
+AM_CONDITIONAL(ON_MINGW, test "x$ac_zmq_on_mingw32" = "xyes")
# Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(perror gettimeofday memset socket getifaddrs freeifaddrs)
+AC_CHECK_HEADERS([alloca.h])
+
+if test "x$with_pgm_ext" != "xno"; then
+
+ # Check additional functions for PGM build
+ AC_CHECK_FUNCS(poll epoll_create pselect getopt vasprintf getprotobyname_r2 getprotobyname_r)
+
+ if test "x$ac_cv_func_gettimeofday" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETTIMEOFDAY $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_getprotobyname_r2" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETPROTOBYNAME_R2 $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_poll" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_POLL $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_epoll_create" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_EPOLL $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_getifaddrs" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETIFADDRS $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_getopt" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GETOPT $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_pselect" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_PSELECT $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_header_alloca_h" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_ALLOCA_H $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_c_compiler_gnu" = "xno"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_ISO_VARARGS $LIBZMQ_EXTRA_CFLAGS"
+ else
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_GNU_VARARGS $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ if test "x$ac_cv_func_vasprintf" = "xyes"; then
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_VASPRINTF $LIBZMQ_EXTRA_CFLAGS"
+ fi
+ case "${host_cpu}" in
+ i*86|x86_64|amd64|*sparc*)
+ LIBZMQ_EXTRA_CFLAGS="-DCONFIG_HAVE_TSC -DCONFIG_HAVE_RTC -DCONFIG_HAVE_HPET $LIBZMQ_EXTRA_CFLAGS"
+ ;;
+ *sparc*|s390*)
+ ;;
+ esac
+fi
+
+# Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS
+AC_SUBST(LIBZMQ_EXTRA_CFLAGS)
+AC_SUBST(LIBZMQ_EXTRA_CXXFLAGS)
+AC_SUBST(LIBZMQ_EXTRA_LDFLAGS)
-AC_OUTPUT(Makefile src/Makefile doc/Makefile
+AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile
perf/Makefile src/libzmq.pc \
- devices/Makefile devices/zmq_forwarder/Makefile \
- devices/zmq_streamer/Makefile devices/zmq_queue/Makefile \
- builds/msvc/Makefile)
+ builds/msvc/Makefile tests/Makefile])
+AC_OUTPUT
diff --git a/devices/Makefile.am b/devices/Makefile.am
deleted file mode 100644
index 85fe596..0000000
--- a/devices/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-
-SUBDIRS = zmq_forwarder zmq_streamer zmq_queue
-DIST_SUBDIRS = zmq_forwarder zmq_streamer zmq_queue
diff --git a/devices/Makefile.in b/devices/Makefile.in
deleted file mode 100644
index fd991b8..0000000
--- a/devices/Makefile.in
+++ /dev/null
@@ -1,576 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = devices
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
- $(top_srcdir)/config/ltoptions.m4 \
- $(top_srcdir)/config/ltsugar.m4 \
- $(top_srcdir)/config/ltversion.m4 \
- $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/platform.hpp
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
- dir0=`pwd`; \
- sed_first='s,^\([^/]*\)/.*$$,\1,'; \
- sed_rest='s,^[^/]*/*,,'; \
- sed_last='s,^.*/\([^/]*\)$$,\1,'; \
- sed_butlast='s,/*[^/]*$$,,'; \
- while test -n "$$dir1"; do \
- first=`echo "$$dir1" | sed -e "$$sed_first"`; \
- if test "$$first" != "."; then \
- if test "$$first" = ".."; then \
- dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
- dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
- else \
- first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
- if test "$$first2" = "$$first"; then \
- dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
- else \
- dir2="../$$dir2"; \
- fi; \
- dir0="$$dir0"/"$$first"; \
- fi; \
- fi; \
- dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
- done; \
- reldir="$$dir2"
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
-LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LTVER = @LTVER@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-have_asciidoc = @have_asciidoc@
-have_gzip = @have_gzip@
-have_perl = @have_perl@
-have_pkg_config = @have_pkg_config@
-have_python = @have_python@
-have_xmlto = @have_xmlto@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-inttypes = @inttypes@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pgm_basename = @pgm_basename@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-stdint = @stdint@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = zmq_forwarder zmq_streamer zmq_queue
-DIST_SUBDIRS = zmq_forwarder zmq_streamer zmq_queue
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign devices/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign devices/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
- $(am__relativize); \
- new_distdir=$$reldir; \
- dir1=$$subdir; dir2="$(top_distdir)"; \
- $(am__relativize); \
- new_top_distdir=$$reldir; \
- echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
- echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
- ($(am__cd) $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$new_top_distdir" \
- distdir="$$new_distdir" \
- am__remove_distdir=: \
- am__skip_length_check=: \
- am__skip_mode_fix=: \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic clean-libtool \
- ctags ctags-recursive distclean distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/devices/zmq_forwarder/Makefile.am b/devices/zmq_forwarder/Makefile.am
deleted file mode 100644
index 936a305..0000000
--- a/devices/zmq_forwarder/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-INCLUDES = -I$(top_srcdir)/include
-
-bin_PROGRAMS = zmq_forwarder
-
-zmq_forwarder_LDADD = $(top_builddir)/src/libzmq.la
-zmq_forwarder_SOURCES = zmq_forwarder.cpp
-
-
diff --git a/devices/zmq_forwarder/Makefile.in b/devices/zmq_forwarder/Makefile.in
deleted file mode 100644
index 85b929b..0000000
--- a/devices/zmq_forwarder/Makefile.in
+++ /dev/null
@@ -1,530 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = zmq_forwarder$(EXEEXT)
-subdir = devices/zmq_forwarder
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
- $(top_srcdir)/config/ltoptions.m4 \
- $(top_srcdir)/config/ltsugar.m4 \
- $(top_srcdir)/config/ltversion.m4 \
- $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/platform.hpp
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am_zmq_forwarder_OBJECTS = zmq_forwarder.$(OBJEXT)
-zmq_forwarder_OBJECTS = $(am_zmq_forwarder_OBJECTS)
-zmq_forwarder_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
-am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = $(zmq_forwarder_SOURCES)
-DIST_SOURCES = $(zmq_forwarder_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
-LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LTVER = @LTVER@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-have_asciidoc = @have_asciidoc@
-have_gzip = @have_gzip@
-have_perl = @have_perl@
-have_pkg_config = @have_pkg_config@
-have_python = @have_python@
-have_xmlto = @have_xmlto@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-inttypes = @inttypes@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pgm_basename = @pgm_basename@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-stdint = @stdint@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-INCLUDES = -I$(top_srcdir)/include
-zmq_forwarder_LDADD = $(top_builddir)/src/libzmq.la
-zmq_forwarder_SOURCES = zmq_forwarder.cpp
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .cpp .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign devices/zmq_forwarder/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign devices/zmq_forwarder/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-zmq_forwarder$(EXEEXT): $(zmq_forwarder_OBJECTS) $(zmq_forwarder_DEPENDENCIES)
- @rm -f zmq_forwarder$(EXEEXT)
- $(CXXLINK) $(zmq_forwarder_OBJECTS) $(zmq_forwarder_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmq_forwarder.Po@am__quote@
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
-
-.cpp.obj:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cpp.lo:
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/devices/zmq_forwarder/zmq_forwarder.cpp b/devices/zmq_forwarder/zmq_forwarder.cpp
deleted file mode 100644
index 96c9ae5..0000000
--- a/devices/zmq_forwarder/zmq_forwarder.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "../../include/zmq.hpp"
-#include "../../foreign/xmlParser/xmlParser.cpp"
-
-int main (int argc, char *argv [])
-{
- if (argc != 2) {
- fprintf (stderr, "usage: zmq_forwarder <config-file>\n");
- return 1;
- }
-
- XMLNode root = XMLNode::parseFile (argv [1]);
- if (root.isEmpty ()) {
- fprintf (stderr, "configuration file not found or not an XML file\n");
- return 1;
- }
-
- if (strcmp (root.getName (), "forwarder") != 0) {
- fprintf (stderr, "root element in the configuration file should be "
- "named 'forwarder'\n");
- return 1;
- }
-
- XMLNode in_node = root.getChildNode ("in");
- if (in_node.isEmpty ()) {
- fprintf (stderr, "'in' node is missing in the configuration file\n");
- return 1;
- }
-
- XMLNode out_node = root.getChildNode ("out");
- if (out_node.isEmpty ()) {
- fprintf (stderr, "'out' node is missing in the configuration file\n");
- return 1;
- }
-
- // TODO: make the number of I/O threads configurable.
- zmq::context_t ctx (1);
- zmq::socket_t in_socket (ctx, ZMQ_SUB);
- in_socket.setsockopt (ZMQ_SUBSCRIBE, "", 0);
- zmq::socket_t out_socket (ctx, ZMQ_PUB);
-
- int n = 0;
- while (true) {
- XMLNode bind = in_node.getChildNode ("bind", n);
- if (bind.isEmpty ())
- break;
- const char *addr = bind.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'bind' node is missing 'addr' attribute\n");
- return 1;
- }
- in_socket.bind (addr);
- n++;
- }
-
- n = 0;
- while (true) {
- XMLNode connect = in_node.getChildNode ("connect", n);
- if (connect.isEmpty ())
- break;
- const char *addr = connect.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'connect' node is missing 'addr' attribute\n");
- return 1;
- }
- in_socket.connect (addr);
- n++;
- }
-
- n = 0;
- while (true) {
- XMLNode bind = out_node.getChildNode ("bind", n);
- if (bind.isEmpty ())
- break;
- const char *addr = bind.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'bind' node is missing 'addr' attribute\n");
- return 1;
- }
- out_socket.bind (addr);
- n++;
- }
-
- n = 0;
- while (true) {
- XMLNode connect = out_node.getChildNode ("connect", n);
- if (connect.isEmpty ())
- break;
- const char *addr = connect.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'connect' node is missing 'addr' attribute\n");
- return 1;
- }
- out_socket.connect (addr);
- n++;
- }
-
- zmq::device (ZMQ_FORWARDER, in_socket, out_socket);
-
- return 0;
-}
diff --git a/devices/zmq_queue/Makefile.am b/devices/zmq_queue/Makefile.am
deleted file mode 100644
index 39c0c10..0000000
--- a/devices/zmq_queue/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-INCLUDES = -I$(top_srcdir)/include
-
-bin_PROGRAMS = zmq_queue
-
-zmq_queue_LDADD = $(top_builddir)/src/libzmq.la
-zmq_queue_SOURCES = zmq_queue.cpp
-
-
diff --git a/devices/zmq_queue/Makefile.in b/devices/zmq_queue/Makefile.in
deleted file mode 100644
index fad7c81..0000000
--- a/devices/zmq_queue/Makefile.in
+++ /dev/null
@@ -1,530 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = zmq_queue$(EXEEXT)
-subdir = devices/zmq_queue
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
- $(top_srcdir)/config/ltoptions.m4 \
- $(top_srcdir)/config/ltsugar.m4 \
- $(top_srcdir)/config/ltversion.m4 \
- $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/platform.hpp
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am_zmq_queue_OBJECTS = zmq_queue.$(OBJEXT)
-zmq_queue_OBJECTS = $(am_zmq_queue_OBJECTS)
-zmq_queue_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
-am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = $(zmq_queue_SOURCES)
-DIST_SOURCES = $(zmq_queue_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
-LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LTVER = @LTVER@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-have_asciidoc = @have_asciidoc@
-have_gzip = @have_gzip@
-have_perl = @have_perl@
-have_pkg_config = @have_pkg_config@
-have_python = @have_python@
-have_xmlto = @have_xmlto@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-inttypes = @inttypes@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pgm_basename = @pgm_basename@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-stdint = @stdint@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-INCLUDES = -I$(top_srcdir)/include
-zmq_queue_LDADD = $(top_builddir)/src/libzmq.la
-zmq_queue_SOURCES = zmq_queue.cpp
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .cpp .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign devices/zmq_queue/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign devices/zmq_queue/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-zmq_queue$(EXEEXT): $(zmq_queue_OBJECTS) $(zmq_queue_DEPENDENCIES)
- @rm -f zmq_queue$(EXEEXT)
- $(CXXLINK) $(zmq_queue_OBJECTS) $(zmq_queue_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmq_queue.Po@am__quote@
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
-
-.cpp.obj:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cpp.lo:
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/devices/zmq_queue/zmq_queue.cpp b/devices/zmq_queue/zmq_queue.cpp
deleted file mode 100644
index 3a20620..0000000
--- a/devices/zmq_queue/zmq_queue.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "../../include/zmq.hpp"
-#include "../../foreign/xmlParser/xmlParser.cpp"
-
-int main (int argc, char *argv [])
-{
- if (argc != 2) {
- fprintf (stderr, "usage: zmq_queue <config-file>\n");
- return 1;
- }
-
- XMLNode root = XMLNode::parseFile (argv [1]);
- if (root.isEmpty ()) {
- fprintf (stderr, "configuration file not found or not an XML file\n");
- return 1;
- }
-
- if (strcmp (root.getName (), "queue") != 0) {
- fprintf (stderr, "root element in the configuration file should be "
- "named 'queue'\n");
- return 1;
- }
-
- XMLNode in_node = root.getChildNode ("in");
- if (in_node.isEmpty ()) {
- fprintf (stderr, "'in' node is missing in the configuration file\n");
- return 1;
- }
-
- XMLNode out_node = root.getChildNode ("out");
- if (out_node.isEmpty ()) {
- fprintf (stderr, "'out' node is missing in the configuration file\n");
- return 1;
- }
-
- // TODO: make the number of I/O threads configurable.
- zmq::context_t ctx (1);
- zmq::socket_t in_socket (ctx, ZMQ_XREP);
- zmq::socket_t out_socket (ctx, ZMQ_XREQ);
-
- int n = 0;
- while (true) {
- XMLNode bind = in_node.getChildNode ("bind", n);
- if (bind.isEmpty ())
- break;
- const char *addr = bind.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'bind' node is missing 'addr' attribute\n");
- return 1;
- }
- in_socket.bind (addr);
- n++;
- }
-
- n = 0;
- while (true) {
- XMLNode connect = in_node.getChildNode ("connect", n);
- if (connect.isEmpty ())
- break;
- const char *addr = connect.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'connect' node is missing 'addr' attribute\n");
- return 1;
- }
- in_socket.connect (addr);
- n++;
- }
-
- n = 0;
- while (true) {
- XMLNode bind = out_node.getChildNode ("bind", n);
- if (bind.isEmpty ())
- break;
- const char *addr = bind.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'bind' node is missing 'addr' attribute\n");
- return 1;
- }
- out_socket.bind (addr);
- n++;
- }
-
- n = 0;
- while (true) {
- XMLNode connect = out_node.getChildNode ("connect", n);
- if (connect.isEmpty ())
- break;
- const char *addr = connect.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'connect' node is missing 'addr' attribute\n");
- return 1;
- }
- out_socket.connect (addr);
- n++;
- }
-
- zmq::device (ZMQ_QUEUE, in_socket, out_socket);
-
- return 0;
-}
diff --git a/devices/zmq_streamer/Makefile.am b/devices/zmq_streamer/Makefile.am
deleted file mode 100644
index e195a3c..0000000
--- a/devices/zmq_streamer/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-INCLUDES = -I$(top_srcdir)/include
-
-bin_PROGRAMS = zmq_streamer
-
-zmq_streamer_LDADD = $(top_builddir)/src/libzmq.la
-zmq_streamer_SOURCES = zmq_streamer.cpp
-
-
diff --git a/devices/zmq_streamer/Makefile.in b/devices/zmq_streamer/Makefile.in
deleted file mode 100644
index b53f3d0..0000000
--- a/devices/zmq_streamer/Makefile.in
+++ /dev/null
@@ -1,530 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = zmq_streamer$(EXEEXT)
-subdir = devices/zmq_streamer
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
- $(top_srcdir)/config/ltoptions.m4 \
- $(top_srcdir)/config/ltsugar.m4 \
- $(top_srcdir)/config/ltversion.m4 \
- $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/platform.hpp
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am_zmq_streamer_OBJECTS = zmq_streamer.$(OBJEXT)
-zmq_streamer_OBJECTS = $(am_zmq_streamer_OBJECTS)
-zmq_streamer_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
-am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = $(zmq_streamer_SOURCES)
-DIST_SOURCES = $(zmq_streamer_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
-LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-LTVER = @LTVER@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-have_asciidoc = @have_asciidoc@
-have_gzip = @have_gzip@
-have_perl = @have_perl@
-have_pkg_config = @have_pkg_config@
-have_python = @have_python@
-have_xmlto = @have_xmlto@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-inttypes = @inttypes@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pgm_basename = @pgm_basename@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-stdint = @stdint@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-INCLUDES = -I$(top_srcdir)/include
-zmq_streamer_LDADD = $(top_builddir)/src/libzmq.la
-zmq_streamer_SOURCES = zmq_streamer.cpp
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .cpp .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign devices/zmq_streamer/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign devices/zmq_streamer/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-zmq_streamer$(EXEEXT): $(zmq_streamer_OBJECTS) $(zmq_streamer_DEPENDENCIES)
- @rm -f zmq_streamer$(EXEEXT)
- $(CXXLINK) $(zmq_streamer_OBJECTS) $(zmq_streamer_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmq_streamer.Po@am__quote@
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
-
-.cpp.obj:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cpp.lo:
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/devices/zmq_streamer/zmq_streamer.cpp b/devices/zmq_streamer/zmq_streamer.cpp
deleted file mode 100644
index f9dcd00..0000000
--- a/devices/zmq_streamer/zmq_streamer.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "../../include/zmq.hpp"
-#include "../../foreign/xmlParser/xmlParser.cpp"
-
-int main (int argc, char *argv [])
-{
- if (argc != 2) {
- fprintf (stderr, "usage: zmq_streamer <config-file>\n");
- return 1;
- }
-
- XMLNode root = XMLNode::parseFile (argv [1]);
- if (root.isEmpty ()) {
- fprintf (stderr, "configuration file not found or not an XML file\n");
- return 1;
- }
-
- if (strcmp (root.getName (), "streamer") != 0) {
- fprintf (stderr, "root element in the configuration file should be "
- "named 'streamer'\n");
- return 1;
- }
-
- XMLNode in_node = root.getChildNode ("in");
- if (in_node.isEmpty ()) {
- fprintf (stderr, "'in' node is missing in the configuration file\n");
- return 1;
- }
-
- XMLNode out_node = root.getChildNode ("out");
- if (out_node.isEmpty ()) {
- fprintf (stderr, "'out' node is missing in the configuration file\n");
- return 1;
- }
-
- // TODO: make the number of I/O threads configurable.
- zmq::context_t ctx (1);
- zmq::socket_t in_socket (ctx, ZMQ_UPSTREAM);
- zmq::socket_t out_socket (ctx, ZMQ_DOWNSTREAM);
-
- int n = 0;
- while (true) {
- XMLNode bind = in_node.getChildNode ("bind", n);
- if (bind.isEmpty ())
- break;
- const char *addr = bind.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'bind' node is missing 'addr' attribute\n");
- return 1;
- }
- in_socket.bind (addr);
- n++;
- }
-
- n = 0;
- while (true) {
- XMLNode connect = in_node.getChildNode ("connect", n);
- if (connect.isEmpty ())
- break;
- const char *addr = connect.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'connect' node is missing 'addr' attribute\n");
- return 1;
- }
- in_socket.connect (addr);
- n++;
- }
-
- n = 0;
- while (true) {
- XMLNode bind = out_node.getChildNode ("bind", n);
- if (bind.isEmpty ())
- break;
- const char *addr = bind.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'bind' node is missing 'addr' attribute\n");
- return 1;
- }
- out_socket.bind (addr);
- n++;
- }
-
- n = 0;
- while (true) {
- XMLNode connect = out_node.getChildNode ("connect", n);
- if (connect.isEmpty ())
- break;
- const char *addr = connect.getAttribute ("addr");
- if (!addr) {
- fprintf (stderr, "'connect' node is missing 'addr' attribute\n");
- return 1;
- }
- out_socket.connect (addr);
- n++;
- }
-
- zmq::device (ZMQ_FORWARDER, in_socket, out_socket);
-
- return 0;
-}
diff --git a/doc/Makefile.am b/doc/Makefile.am
index ba2b64a..d00014d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
-MAN1 = zmq_forwarder.1 zmq_streamer.1 zmq_queue.1
-MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_init.3 \
+MAN1 =
+MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_device.3 zmq_init.3 \
zmq_msg_close.3 zmq_msg_copy.3 zmq_msg_data.3 zmq_msg_init.3 \
zmq_msg_init_data.3 zmq_msg_init_size.3 zmq_msg_move.3 zmq_msg_size.3 \
zmq_poll.3 zmq_recv.3 zmq_send.3 zmq_setsockopt.3 zmq_socket.3 \
@@ -11,7 +11,6 @@ MAN_DOC = $(MAN1) $(MAN3) $(MAN7)
MAN_TXT = $(MAN1:%.1=%.txt)
MAN_TXT += $(MAN3:%.3=%.txt)
MAN_TXT += $(MAN7:%.7=%.txt)
-MAN_HTML = $(MAN_TXT:%.txt=%.html)
if INSTALL_MAN
dist_man_MANS = $(MAN_DOC)
@@ -27,20 +26,17 @@ MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML)
dist-hook : $(MAN_DOC) $(MAN_HTML)
if BUILD_DOC
-SUFFIXES=.html .txt .xml .1 .3 .7
+SUFFIXES=.txt .xml .1 .3 .7
-.txt.html:
- asciidoc -d manpage -b xhtml11 -f asciidoc.conf \
- -azmq_version=@PACKAGE_VERSION@ $<
.txt.xml:
- asciidoc -d manpage -b docbook -f asciidoc.conf \
+ $(AM_V_GEN)$(ASCIIDOC) -d manpage -b docbook -f asciidoc.conf \
-azmq_version=@PACKAGE_VERSION@ $<
.xml.1:
- xmlto man $<
+ $(AM_V_GEN)$(XMLTO) man $<
.xml.3:
- xmlto man $<
+ $(AM_V_GEN)$(XMLTO) man $<
.xml.7:
- xmlto man $<
+ $(AM_V_GEN)$(XMLTO) man $<
zmq_epgm.7: zmq_pgm.7
- cp zmq_pgm.7 $@
+ $(AM_V_GEN)cp zmq_pgm.7 $@
endif
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 4a1c0c2..0d71c0e 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -42,13 +42,20 @@ am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
$(top_srcdir)/config/ltoptions.m4 \
$(top_srcdir)/config/ltsugar.m4 \
$(top_srcdir)/config/ltversion.m4 \
- $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.in
+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/platform.hpp
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -72,18 +79,18 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-man1dir = $(mandir)/man1
-am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \
- "$(DESTDIR)$(man7dir)"
man3dir = $(mandir)/man3
+am__installdirs = "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man7dir)"
man7dir = $(mandir)/man7
NROFF = nroff
MANS = $(dist_man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
+ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -109,8 +116,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -122,6 +127,7 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@
LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
LIPO = @LIPO@
@@ -144,13 +150,13 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
+XMLTO = @XMLTO@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -158,6 +164,8 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@
+ac_zmq_have_xmlto = @ac_zmq_have_xmlto@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -175,12 +183,6 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
-have_asciidoc = @have_asciidoc@
-have_gzip = @have_gzip@
-have_perl = @have_perl@
-have_pkg_config = @have_pkg_config@
-have_python = @have_python@
-have_xmlto = @have_xmlto@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -190,7 +192,6 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-inttypes = @inttypes@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
@@ -201,20 +202,21 @@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pgm_basename = @pgm_basename@
+pgm_srcdir = @pgm_srcdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
-stdint = @stdint@
+subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-MAN1 = zmq_forwarder.1 zmq_streamer.1 zmq_queue.1
-MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_init.3 \
+MAN1 =
+MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_device.3 zmq_init.3 \
zmq_msg_close.3 zmq_msg_copy.3 zmq_msg_data.3 zmq_msg_init.3 \
zmq_msg_init_data.3 zmq_msg_init_size.3 zmq_msg_move.3 zmq_msg_size.3 \
zmq_poll.3 zmq_recv.3 zmq_send.3 zmq_setsockopt.3 zmq_socket.3 \
@@ -225,15 +227,14 @@ MAN7 = zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7 \
MAN_DOC = $(MAN1) $(MAN3) $(MAN7)
MAN_TXT = $(MAN1:%.1=%.txt) $(MAN3:%.3=%.txt) $(MAN7:%.7=%.txt)
-MAN_HTML = $(MAN_TXT:%.txt=%.html)
@INSTALL_MAN_TRUE@dist_man_MANS = $(MAN_DOC)
EXTRA_DIST = asciidoc.conf $(MAN_TXT) $(am__append_1)
MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML)
-@BUILD_DOC_TRUE@SUFFIXES = .html .txt .xml .1 .3 .7
+@BUILD_DOC_TRUE@SUFFIXES = .txt .xml .1 .3 .7
all: all-am
.SUFFIXES:
-.SUFFIXES: .html .txt .xml .1 .3 .7
+.SUFFIXES: .txt .xml .1 .3 .7
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -270,44 +271,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-install-man1: $(dist_man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.1[a-z]*$$/p'; \
- } | while read p; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; echo "$$p"; \
- done | \
- sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
- -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
- sed 'N;N;s,\n, ,g' | { \
- list=; while read file base inst; do \
- if test "$$base" = "$$inst"; then list="$$list $$file"; else \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
- fi; \
- done; \
- for i in $$list; do echo "$$i"; done | $(am__base_list) | \
- while read files; do \
- test -z "$$files" || { \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
- done; }
-
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list=''; test -n "$(man1dir)" || exit 0; \
- files=`{ for i in $$list; do echo "$$i"; done; \
- l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.1[a-z]*$$/p'; \
- } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
- -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
install-man3: $(dist_man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
@@ -441,7 +404,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(MANS)
installdirs:
- for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man7dir)"; do \
+ for dir in "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man7dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -506,7 +469,7 @@ install-info: install-info-am
install-info-am:
-install-man: install-man1 install-man3 install-man7
+install-man: install-man3 install-man7
install-pdf: install-pdf-am
@@ -536,7 +499,7 @@ ps-am:
uninstall-am: uninstall-man
-uninstall-man: uninstall-man1 uninstall-man3 uninstall-man7
+uninstall-man: uninstall-man3 uninstall-man7
.MAKE: install-am install-strip
@@ -546,30 +509,27 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man7
install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
- install-man1 install-man3 install-man7 install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
+ install-man3 install-man7 install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-man uninstall-man1 uninstall-man3 uninstall-man7
+ uninstall-man uninstall-man3 uninstall-man7
dist-hook : $(MAN_DOC) $(MAN_HTML)
-@BUILD_DOC_TRUE@.txt.html:
-@BUILD_DOC_TRUE@ asciidoc -d manpage -b xhtml11 -f asciidoc.conf \
-@BUILD_DOC_TRUE@ -azmq_version=@PACKAGE_VERSION@ $<
@BUILD_DOC_TRUE@.txt.xml:
-@BUILD_DOC_TRUE@ asciidoc -d manpage -b docbook -f asciidoc.conf \
+@BUILD_DOC_TRUE@ $(AM_V_GEN)$(ASCIIDOC) -d manpage -b docbook -f asciidoc.conf \
@BUILD_DOC_TRUE@ -azmq_version=@PACKAGE_VERSION@ $<
@BUILD_DOC_TRUE@.xml.1:
-@BUILD_DOC_TRUE@ xmlto man $<
+@BUILD_DOC_TRUE@ $(AM_V_GEN)$(XMLTO) man $<
@BUILD_DOC_TRUE@.xml.3:
-@BUILD_DOC_TRUE@ xmlto man $<
+@BUILD_DOC_TRUE@ $(AM_V_GEN)$(XMLTO) man $<
@BUILD_DOC_TRUE@.xml.7:
-@BUILD_DOC_TRUE@ xmlto man $<
+@BUILD_DOC_TRUE@ $(AM_V_GEN)$(XMLTO) man $<
@BUILD_DOC_TRUE@zmq_epgm.7: zmq_pgm.7
-@BUILD_DOC_TRUE@ cp zmq_pgm.7 $@
+@BUILD_DOC_TRUE@ $(AM_V_GEN)cp zmq_pgm.7 $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/doc/zmq.7 b/doc/zmq.7
index 9b1e430..61345fb 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ" "7" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ" "7" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -63,7 +63,9 @@ Terminate 0MQ context
\fBThread safety\fR
.RS 4
.sp
-A 0MQ \fIcontext\fR is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller\&. Each 0MQ socket belonging to a particular \fIcontext\fR may only be used by \fBthe thread that created it\fR using \fIzmq_socket()\fR\&.
+A 0MQ \fIcontext\fR is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller\&.
+.sp
+Individual 0MQ \fIsockets\fR are \fInot\fR thread safe except in the case where full memory barriers are issued when migrating a socket from one thread to another\&. In practice this means applications can create a socket in one thread with \fIzmq_socket()\fR and then pass it to a \fInewly created\fR thread as part of thread initialization, for example via a structure passed as an argument to \fIpthread_create()\fR\&.
.RE
.sp
.it 1 an-trap
@@ -183,27 +185,9 @@ Local in\-process (inter\-thread) communication transport
.RE
.SS "Devices"
.sp
-Apart from the 0MQ library the 0MQ distribution includes \fIdevices\fR which are building blocks intended to serve as intermediate nodes in complex messaging topologies\&.
+0MQ provides \fIdevices\fR, 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\&.
.sp
-The following devices are provided:
-.PP
-Forwarder device for request\-response messaging
-.RS 4
-
-\fBzmq_queue\fR(1)
-.RE
-.PP
-Forwarder device for publish\-subscribe messaging
-.RS 4
-
-\fBzmq_forwarder\fR(1)
-.RE
-.PP
-Streamer device for parallelized pipeline messaging
-.RS 4
-
-\fBzmq_streamer\fR(1)
-.RE
+You can start a device in an application thread, see \fBzmq_device\fR(3)\&.
.SH "ERROR HANDLING"
.sp
The 0MQ library functions handle errors using the standard conventions found on POSIX systems\&. Generally, this means that upon failure a 0MQ library function shall return either a NULL value (if returning a pointer) or a negative value (if returning an integer), and the actual error code shall be stored in the \fIerrno\fR variable\&.
@@ -231,7 +215,7 @@ 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
-The 0MQ documentation 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 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 "RESOURCES"
.sp
Main web site: \m[blue]\fBhttp://www\&.zeromq\&.org/\fR\m[]
diff --git a/doc/zmq.html b/doc/zmq.html
deleted file mode 100644
index bbb90ec..0000000
--- a/doc/zmq.html
+++ /dev/null
@@ -1,866 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq(7)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq(7) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq -
- 0MQ lightweight messaging kernel
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>#include &lt;zmq.h&gt;</strong></p></div>
-<div class="paragraph"><p><strong>cc</strong> [<em>flags</em>] <em>files</em> <strong>-lzmq</strong> [<em>libraries</em>]</p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ lightweight messaging kernel is a library which extends the standard
-socket interfaces with features traditionally provided by specialised
-<em>messaging middleware</em> products. ØMQ sockets provide an abstraction of
-asynchronous <em>message queues</em>, multiple <em>messaging patterns</em>, message
-filtering (<em>subscriptions</em>), seamless access to multiple <em>transport protocols</em>
-and more.</p></div>
-<div class="paragraph"><p>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.</p></div>
-<h3 id="_context">Context</h3><div style="clear:left"></div>
-<div class="paragraph"><p>Before using any ØMQ library functions the caller must initialise a ØMQ
-<em>context</em> using <em>zmq_init()</em>. The following functions are provided to handle
-initialisation and termination of a <em>context</em>:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Initialise ØMQ context
-</dt>
-<dd>
-<p>
- <a href="zmq_init.html">zmq_init(3)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Terminate ØMQ context
-</dt>
-<dd>
-<p>
- <a href="zmq_term.html">zmq_term(3)</a>
-</p>
-</dd>
-</dl></div>
-<h4 id="_thread_safety">Thread safety</h4>
-<div class="paragraph"><p>A ØMQ <em>context</em> is thread safe and may be shared among as many application
-threads as necessary, without any additional locking required on the part of the
-caller. Each ØMQ socket belonging to a particular <em>context</em> may only be used
-by <strong>the thread that created it</strong> using <em>zmq_socket()</em>.</p></div>
-<h4 id="_multiple_contexts">Multiple contexts</h4>
-<div class="paragraph"><p>Multiple <em>contexts</em> 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.</p></div>
-<h3 id="_messages">Messages</h3><div style="clear:left"></div>
-<div class="paragraph"><p>A ØMQ message is a discrete unit of data passed between applications or
-components of the same application. ØMQ messages have no internal structure and
-from the point of view of ØMQ itself they are considered to be opaque binary
-data.</p></div>
-<div class="paragraph"><p>The following functions are provided to work with messages:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Initialise a message
-</dt>
-<dd>
-<p>
- <a href="zmq_msg_init.html">zmq_msg_init(3)</a>
- <a href="zmq_msg_init_size.html">zmq_msg_init_size(3)</a>
- <a href="zmq_msg_init_data.html">zmq_msg_init_data(3)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Release a message
-</dt>
-<dd>
-<p>
- <a href="zmq_msg_close.html">zmq_msg_close(3)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Access message content
-</dt>
-<dd>
-<p>
- <a href="zmq_msg_data.html">zmq_msg_data(3)</a>
- <a href="zmq_msg_size.html">zmq_msg_size(3)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Message manipulation
-</dt>
-<dd>
-<p>
- <a href="zmq_msg_copy.html">zmq_msg_copy(3)</a>
- <a href="zmq_msg_move.html">zmq_msg_move(3)</a>
-</p>
-</dd>
-</dl></div>
-<h3 id="_sockets">Sockets</h3><div style="clear:left"></div>
-<div class="paragraph"><p>ØMQ sockets present an abstraction of a asynchronous <em>message queue</em>, with the
-exact queueing semantics depending on the socket type in use. See
-<a href="zmq_socket.html">zmq_socket(3)</a> for the socket types provided.</p></div>
-<div class="paragraph"><p>The following functions are provided to work with sockets:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Creating a socket
-</dt>
-<dd>
-<p>
- <a href="zmq_socket.html">zmq_socket(3)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Closing a socket
-</dt>
-<dd>
-<p>
- <a href="zmq_close.html">zmq_close(3)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Manipulating socket options
-</dt>
-<dd>
-<p>
- <a href="zmq_getsockopt.html">zmq_getsockopt(3)</a>
- <a href="zmq_setsockopt.html">zmq_setsockopt(3)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Establishing a message flow
-</dt>
-<dd>
-<p>
- <a href="zmq_bind.html">zmq_bind(3)</a>
- <a href="zmq_connect.html">zmq_connect(3)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Sending and receiving messages
-</dt>
-<dd>
-<p>
- <a href="zmq_send.html">zmq_send(3)</a>
- <a href="zmq_recv.html">zmq_recv(3)</a>
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><div class="title">Input/output multiplexing</div><p>ØMQ provides a mechanism for applications to multiplex input/output events over
-a set containing both ØMQ sockets and standard sockets. This mechanism mirrors
-the standard <em>poll()</em> system call, and is described in detail in
-<a href="zmq_poll.html">zmq_poll(3)</a>.</p></div>
-<h3 id="_transports">Transports</h3><div style="clear:left"></div>
-<div class="paragraph"><p>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.</p></div>
-<div class="paragraph"><p>The following transport mechanisms are provided:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Unicast transport using TCP
-</dt>
-<dd>
-<p>
- <a href="zmq_tcp.html">zmq_tcp(7)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Reliable multicast transport using PGM
-</dt>
-<dd>
-<p>
- <a href="zmq_pgm.html">zmq_pgm(7)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Local inter-process communication transport
-</dt>
-<dd>
-<p>
- <a href="zmq_ipc.html">zmq_ipc(7)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Local in-process (inter-thread) communication transport
-</dt>
-<dd>
-<p>
- <a href="zmq_inproc.html">zmq_inproc(7)</a>
-</p>
-</dd>
-</dl></div>
-<h3 id="_devices">Devices</h3><div style="clear:left"></div>
-<div class="paragraph"><p>Apart from the ØMQ library the ØMQ distribution includes <em>devices</em> which are
-building blocks intended to serve as intermediate nodes in complex messaging
-topologies.</p></div>
-<div class="paragraph"><p>The following devices are provided:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Forwarder device for request-response messaging
-</dt>
-<dd>
-<p>
- <a href="zmq_queue.html">zmq_queue(1)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Forwarder device for publish-subscribe messaging
-</dt>
-<dd>
-<p>
- <a href="zmq_forwarder.html">zmq_forwarder(1)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-Streamer device for parallelized pipeline messaging
-</dt>
-<dd>
-<p>
- <a href="zmq_streamer.html">zmq_streamer(1)</a>
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_error_handling">ERROR HANDLING</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ library functions handle errors using the standard conventions found on
-POSIX systems. Generally, this means that upon failure a ØMQ library function
-shall return either a NULL value (if returning a pointer) or a negative value
-(if returning an integer), and the actual error code shall be stored in the
-<em>errno</em> variable.</p></div>
-<div class="paragraph"><p>On non-POSIX systems some users may experience issues with retrieving the
-correct value of the <em>errno</em> variable. The <em>zmq_errno()</em> function is provided
-to assist in these cases; for details refer to <a href="zmq_errno.html">zmq_errno(3)</a>.</p></div>
-<div class="paragraph"><p>The <em>zmq_strerror()</em> function is provided to translate ØMQ-specific error codes
-into error message strings; for details refer to <a href="zmq_strerror.html">zmq_strerror(3)</a>.</p></div>
-</div>
-<h2 id="_miscellaneous">MISCELLANEOUS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following miscellaneous functions are provided:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Report ØMQ library version
-</dt>
-<dd>
-<p>
- <a href="zmq_version.html">zmq_version(3)</a>
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_language_bindings">LANGUAGE BINDINGS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ library provides interfaces suitable for calling from programs in any
-language; this documentation documents those interfaces as they would be used
-by C programmers. The intent is that programmers using ØMQ from other languages
-shall refer to this documentation alongside any documentation provided by the
-vendor of their language binding.</p></div>
-<h3 id="_c_language_binding">C++ language binding</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The ØMQ distribution includes a C++ language binding, which is documented
-separately in <a href="zmq_cpp.html">zmq_cpp(7)</a>.</p></div>
-<h3 id="_other_language_bindings">Other language bindings</h3><div style="clear:left"></div>
-<div class="paragraph"><p>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.</p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-<h2 id="_resources">RESOURCES</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Main web site: <a href="http://www.zeromq.org/">http://www.zeromq.org/</a></p></div>
-<div class="paragraph"><p>Report bugs to the ØMQ development mailing list: &lt;<a href="mailto:zeromq-dev@lists.zeromq.org">zeromq-dev@lists.zeromq.org</a>&gt;</p></div>
-</div>
-<h2 id="_copying">COPYING</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Free use of this software is granted under the terms of the GNU Lesser General
-Public License (LGPL). For details see the files <tt>COPYING</tt> and <tt>COPYING.LESSER</tt>
-included with the ØMQ distribution.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq.txt b/doc/zmq.txt
index 06658c9..16a5d30 100644
--- a/doc/zmq.txt
+++ b/doc/zmq.txt
@@ -44,9 +44,15 @@ Terminate 0MQ context::
Thread safety
^^^^^^^^^^^^^
A 0MQ 'context' is thread safe and may be shared among as many application
-threads as necessary, without any additional locking required on the part of the
-caller. Each 0MQ socket belonging to a particular 'context' may only be used
-by *the thread that created it* using _zmq_socket()_.
+threads as necessary, without any additional locking required on the part of
+the caller.
+
+Individual 0MQ 'sockets' are _not_ thread safe except in the case where full
+memory barriers are issued when migrating a socket from one thread to another.
+In practice this means applications can create a socket in one thread with
+_zmq_socket()_ and then pass it to a _newly created_ thread as part of thread
+initialization, for example via a structure passed as an argument to
+_pthread_create()_.
Multiple contexts
@@ -139,20 +145,12 @@ Local in-process (inter-thread) communication transport::
Devices
~~~~~~~
-Apart from the 0MQ library the 0MQ distribution includes 'devices' which are
-building blocks intended to serve as intermediate nodes in complex messaging
-topologies.
-
-The following devices are provided:
-
-Forwarder device for request-response messaging::
- linkzmq:zmq_queue[1]
-
-Forwarder device for publish-subscribe messaging::
- linkzmq:zmq_forwarder[1]
+0MQ 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.
-Streamer device for parallelized pipeline messaging::
- linkzmq:zmq_streamer[1]
+You can start a device in an application thread, see linkzmq:zmq_device[3].
ERROR HANDLING
@@ -202,7 +200,7 @@ of the 0MQ community and pointers can be found on the 0MQ website.
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_bind.3 b/doc/zmq_bind.3
index c9e1e53..f4a637a 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_BIND" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_BIND" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -120,6 +120,11 @@ The provided
\fIsocket\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBEMTHREAD\fR
+.RS 4
+No I/O thread is available to accomplish the task\&.
+.RE
.SH "EXAMPLE"
.PP
\fBBinding a publisher socket to an in-process and a TCP transport\fR.
@@ -147,7 +152,7 @@ assert (rc == 0);
\fBzmq_connect\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_bind.html b/doc/zmq_bind.html
deleted file mode 100644
index 72d37dc..0000000
--- a/doc/zmq_bind.html
+++ /dev/null
@@ -1,738 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_bind(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_bind(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_bind -
- accept connections on a socket
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_bind (void <em>*socket</em>, const char <em>*endpoint</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_bind()</em> function shall create an endpoint for accepting connections
-and bind it to the socket referenced by the <em>socket</em> argument.</p></div>
-<div class="paragraph"><p>The <em>endpoint</em> argument is a string consisting of two parts as follows:
-<em>transport</em><tt>://</tt><em>address</em>. The <em>transport</em> part specifies the underlying
-transport protocol to use. The meaning of the <em>address</em> part is specific to
-the underlying transport protocol selected.</p></div>
-<div class="paragraph"><p>The following transports are defined:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<em>inproc</em>
-</dt>
-<dd>
-<p>
-local in-process (inter-thread) communication transport, see <a href="zmq_inproc.html">zmq_inproc(7)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-<em>ipc</em>
-</dt>
-<dd>
-<p>
-local inter-process communication transport, see <a href="zmq_ipc.html">zmq_ipc(7)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-<em>tcp</em>
-</dt>
-<dd>
-<p>
-unicast transport using TCP, see <a href="zmq_tcp.html">zmq_tcp(7)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-<em>pgm</em>, <em>epgm</em>
-</dt>
-<dd>
-<p>
-reliable multicast transport using PGM, see <a href="zmq_pgm.html">zmq_pgm(7)</a>
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>With the exception of <em>ZMQ_PAIR</em> sockets, a single socket may be connected to
-multiple endpoints using <em>zmq_connect()</em>, while simultaneously accepting
-incoming connections from multiple endpoints bound to the socket using
-<em>zmq_bind()</em>. Refer to <a href="zmq_socket.html">zmq_socket(3)</a> for a description of the exact
-semantics involved when connecting or binding a socket to multiple endpoints.</p></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_bind()</em> function shall return zero if successful. Otherwise it shall
-return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EPROTONOSUPPORT</strong>
-</dt>
-<dd>
-<p>
-The requested <em>transport</em> protocol is not supported.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ENOCOMPATPROTO</strong>
-</dt>
-<dd>
-<p>
-The requested <em>transport</em> protocol is not compatible with the socket type.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EADDRINUSE</strong>
-</dt>
-<dd>
-<p>
-The requested <em>address</em> is already in use.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EADDRNOTAVAIL</strong>
-</dt>
-<dd>
-<p>
-The requested <em>address</em> was not local.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ENODEV</strong>
-</dt>
-<dd>
-<p>
-The requested <em>address</em> specifies a nonexistent interface.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ETERM</strong>
-</dt>
-<dd>
-<p>
-The ØMQ <em>context</em> associated with the specified <em>socket</em> was terminated.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>socket</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Binding a publisher socket to an in-process and a TCP transport</div>
-<div class="content">
-<pre><tt>/* Create a ZMQ_PUB socket */
-void *socket = zmq_socket (context, ZMQ_PUB);
-assert (socket);
-/* Bind it to a in-process transport with the address 'my_publisher' */
-int rc = zmq_bind (socket, "inproc://my_publisher");
-assert (rc == 0);
-/* Bind it to a TCP transport on port 5555 of the 'eth0' interface */
-rc = zmq_bind (socket, "tcp://eth0:5555");
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_connect.html">zmq_connect(3)</a>
-<a href="zmq_socket.html">zmq_socket(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:40:36 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_bind.txt b/doc/zmq_bind.txt
index 7aa5a0b..6492d9e 100644
--- a/doc/zmq_bind.txt
+++ b/doc/zmq_bind.txt
@@ -58,6 +58,8 @@ The requested 'address' specifies a nonexistent interface.
The 0MQ 'context' associated with the specified 'socket' was terminated.
*EFAULT*::
The provided 'socket' was not valid (NULL).
+*EMTHREAD*::
+No I/O thread is available to accomplish the task.
EXAMPLE
@@ -85,5 +87,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_close.3 b/doc/zmq_close.3
index 2122caf..231ae96 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_CLOSE" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_CLOSE" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -34,7 +34,23 @@ zmq_close \- close 0MQ socket
\fBint zmq_close (void \fR\fB\fI*socket\fR\fR\fB);\fR
.SH "DESCRIPTION"
.sp
-The \fIzmq_close()\fR function shall destroy the socket referenced by the \fIsocket\fR argument\&. All active connections on the socket shall be terminated and resources associated with the socket shall be released\&. Any outstanding messages sent with \fIzmq_send()\fR but not yet physically sent to the network shall be dropped\&. Likewise, any outstanding messages physically received from the network but not yet received by the application with \fIzmq_recv()\fR shall also be dropped\&.
+The \fIzmq_close()\fR function shall destroy the socket referenced by the \fIsocket\fR argument\&. Any outstanding messages physically received from the network but not yet received by the application with \fIzmq_recv()\fR shall be discarded\&. The behaviour for discarding messages sent by the application with \fIzmq_send()\fR but not yet physically transferred to the network depends on the value of the \fIZMQ_LINGER\fR socket option for the specified \fIsocket\fR\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+The default setting of \fIZMQ_LINGER\fR does not discard unsent messages; this behaviour may cause the application to block when calling \fIzmq_term()\fR\&. For details refer to \fBzmq_setsockopt\fR(3) and \fBzmq_term\fR(3)\&.
+.sp .5v
+.RE
.SH "RETURN VALUE"
.sp
The \fIzmq_close()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&.
@@ -48,10 +64,10 @@ was not valid (NULL)\&.
.RE
.SH "SEE ALSO"
.sp
-\fBzmq_socket\fR(3) \fBzmq_term\fR(3) \fBzmq\fR(7)
+\fBzmq_socket\fR(3) \fBzmq_term\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_close.html b/doc/zmq_close.html
deleted file mode 100644
index bfb24af..0000000
--- a/doc/zmq_close.html
+++ /dev/null
@@ -1,635 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_close(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_close(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_close -
- close 0MQ socket
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_close (void <em>*socket</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_close()</em> function shall destroy the socket referenced by the <em>socket</em>
-argument. All active connections on the socket shall be terminated and
-resources associated with the socket shall be released. Any outstanding
-messages sent with <em>zmq_send()</em> but not yet physically sent to the network
-shall be dropped. Likewise, any outstanding messages physically received from
-the network but not yet received by the application with <em>zmq_recv()</em> shall
-also be dropped.</p></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_close()</em> function shall return zero if successful. Otherwise it shall
-return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>socket</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_socket.html">zmq_socket(3)</a>
-<a href="zmq_term.html">zmq_term(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_close.txt b/doc/zmq_close.txt
index e903437..89f9745 100644
--- a/doc/zmq_close.txt
+++ b/doc/zmq_close.txt
@@ -15,12 +15,15 @@ SYNOPSIS
DESCRIPTION
-----------
The _zmq_close()_ function shall destroy the socket referenced by the 'socket'
-argument. All active connections on the socket shall be terminated and
-resources associated with the socket shall be released. Any outstanding
-messages sent with _zmq_send()_ but not yet physically sent to the network
-shall be dropped. Likewise, any outstanding messages physically received from
-the network but not yet received by the application with _zmq_recv()_ shall
-also be dropped.
+argument. Any outstanding messages physically received from the network but not
+yet received by the application with _zmq_recv()_ shall be discarded. The
+behaviour for discarding messages sent by the application with _zmq_send()_ but
+not yet physically transferred to the network depends on the value of the
+_ZMQ_LINGER_ socket option for the specified 'socket'.
+
+NOTE: The default setting of _ZMQ_LINGER_ does not discard unsent messages;
+this behaviour may cause the application to block when calling _zmq_term()_.
+For details refer to linkzmq:zmq_setsockopt[3] and linkzmq:zmq_term[3].
RETURN VALUE
@@ -39,10 +42,11 @@ SEE ALSO
--------
linkzmq:zmq_socket[3]
linkzmq:zmq_term[3]
+linkzmq:zmq_setsockopt[3]
linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_connect.3 b/doc/zmq_connect.3
index 98be1e6..5305f76 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_CONNECT" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_CONNECT" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -115,6 +115,11 @@ The provided
\fIsocket\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBEMTHREAD\fR
+.RS 4
+No I/O thread is available to accomplish the task\&.
+.RE
.SH "EXAMPLE"
.PP
\fBConnecting a subscriber socket to an in-process and a TCP transport\fR.
@@ -142,7 +147,7 @@ assert (rc == 0);
\fBzmq_bind\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_connect.html b/doc/zmq_connect.html
deleted file mode 100644
index ea0069a..0000000
--- a/doc/zmq_connect.html
+++ /dev/null
@@ -1,724 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_connect(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_connect(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_connect -
- connect a socket
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_connect (void <em>*socket</em>, const char <em>*endpoint</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_connect()</em> function shall connect the socket referenced by the
-<em>socket</em> argument to the endpoint specified by the <em>endpoint</em> argument.</p></div>
-<div class="paragraph"><p>The <em>endpoint</em> argument is a string consisting of two parts as follows:
-<em>transport</em><tt>://</tt><em>address</em>. The <em>transport</em> part specifies the underlying
-transport protocol to use. The meaning of the <em>address</em> part is specific to
-the underlying transport protocol selected.</p></div>
-<div class="paragraph"><p>The following transports are defined:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<em>inproc</em>
-</dt>
-<dd>
-<p>
-local in-process (inter-thread) communication transport, see <a href="zmq_inproc.html">zmq_inproc(7)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-<em>ipc</em>
-</dt>
-<dd>
-<p>
-local inter-process communication transport, see <a href="zmq_ipc.html">zmq_ipc(7)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-<em>tcp</em>
-</dt>
-<dd>
-<p>
-unicast transport using TCP, see <a href="zmq_tcp.html">zmq_tcp(7)</a>
-</p>
-</dd>
-<dt class="hdlist1">
-<em>pgm</em>, <em>epgm</em>
-</dt>
-<dd>
-<p>
-reliable multicast transport using PGM, see <a href="zmq_pgm.html">zmq_pgm(7)</a>
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>With the exception of <em>ZMQ_PAIR</em> sockets, a single socket may be connected to
-multiple endpoints using <em>zmq_connect()</em>, while simultaneously accepting
-incoming connections from multiple endpoints bound to the socket using
-<em>zmq_bind()</em>. Refer to <a href="zmq_socket.html">zmq_socket(3)</a> for a description of the exact
-semantics involved when connecting or binding a socket to multiple endpoints.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">The connection will not be performed immediately but as needed by ØMQ.
-Thus a successful invocation of <em>zmq_connect()</em> does not indicate that a
-physical connection was or can actually be established.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_connect()</em> function shall return zero if successful. Otherwise it
-shall return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EPROTONOSUPPORT</strong>
-</dt>
-<dd>
-<p>
-The requested <em>transport</em> protocol is not supported.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ENOCOMPATPROTO</strong>
-</dt>
-<dd>
-<p>
-The requested <em>transport</em> protocol is not compatible with the socket type.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ETERM</strong>
-</dt>
-<dd>
-<p>
-The ØMQ <em>context</em> associated with the specified <em>socket</em> was terminated.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>socket</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Connecting a subscriber socket to an in-process and a TCP transport</div>
-<div class="content">
-<pre><tt>/* Create a ZMQ_SUB socket */
-void *socket = zmq_socket (context, ZMQ_SUB);
-assert (socket);
-/* Connect it to an in-process transport with the address 'my_publisher' */
-int rc = zmq_connect (socket, "inproc://my_publisher");
-assert (rc == 0);
-/* Connect it to the host server001, port 5555 using a TCP transport */
-rc = zmq_connect (socket, "tcp://server001:5555");
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_bind.html">zmq_bind(3)</a>
-<a href="zmq_socket.html">zmq_socket(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:40:36 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_connect.txt b/doc/zmq_connect.txt
index ffcf3b4..acd0e9d 100644
--- a/doc/zmq_connect.txt
+++ b/doc/zmq_connect.txt
@@ -56,6 +56,8 @@ The requested 'transport' protocol is not compatible with the socket type.
The 0MQ 'context' associated with the specified 'socket' was terminated.
*EFAULT*::
The provided 'socket' was not valid (NULL).
+*EMTHREAD*::
+No I/O thread is available to accomplish the task.
EXAMPLE
@@ -83,5 +85,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_cpp.7 b/doc/zmq_cpp.7
index b657017..2b0494e 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_CPP" "7" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_CPP" "7" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -211,7 +211,7 @@ Maps to the \fIzmq_connect()\fR function, as described in \fBzmq_connect\fR(3)\&
.RE
.\}
.sp
-Maps to the \fIzmq_send()\fR function, as described in \fBzmq_send\fR(3)\&.
+Maps to the \fIzmq_send()\fR function, as described in \fBzmq_send\fR(3)\&. Returns true if message is successfully sent, false if it is not\&.
.sp
.if n \{\
.RS 4
@@ -223,7 +223,7 @@ Maps to the \fIzmq_send()\fR function, as described in \fBzmq_send\fR(3)\&.
.RE
.\}
.sp
-Maps to the \fIzmq_recv()\fR function, as described in \fBzmq_recv\fR(3)\&.
+Maps to the \fIzmq_recv()\fR function, as described in \fBzmq_recv\fR(3)\&. Returns true if message is successfully received, false if it is not\&.
.RE
.SS "Message"
.sp
@@ -396,7 +396,7 @@ s\&.send (msg);
\fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_cpp.html b/doc/zmq_cpp.html
deleted file mode 100644
index 59b206e..0000000
--- a/doc/zmq_cpp.html
+++ /dev/null
@@ -1,763 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_cpp(7)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_cpp(7) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_cpp -
- interface between 0MQ and C++ applications
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>#include &lt;zmq.hpp&gt;</strong></p></div>
-<div class="paragraph"><p><strong>c++</strong> [<em>flags</em>] <em>files</em> <strong>-lzmq</strong> [<em>libraries</em>]</p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This manual page describes how the ØMQ C++ language binding maps to the
-underlying ØMQ C library functions.</p></div>
-<div class="paragraph"><p>All ØMQ constants defined by <em>zmq.h</em> are also available to the C++ language
-binding.</p></div>
-<div class="paragraph"><p>The following classes are provided in the <em>zmq</em> namespace:</p></div>
-<h3 id="_context">Context</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>context_t</em> class encapsulates functionality dealing with the
-initialisation and termination of a ØMQ <em>context</em>.</p></div>
-<h4 id="_constructor">Constructor</h4>
-<div class="verseblock">
-<div class="verseblock-content"><strong>context_t::context_t(int <em>io_threads</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_init()</em> function, as described in <a href="zmq_init.html">zmq_init(3)</a>.</p></div>
-<h4 id="_destructor">Destructor</h4>
-<div class="verseblock">
-<div class="verseblock-content"><strong>context_t::~context_t(void)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_term()</em> function, as described in <a href="zmq_term.html">zmq_term(3)</a>.</p></div>
-<h4 id="_methods">Methods</h4>
-<div class="paragraph"><p>None.</p></div>
-<h3 id="_socket">Socket</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>socket_t</em> class encapsulates a ØMQ socket.</p></div>
-<h4 id="_constructor_2">Constructor</h4>
-<div class="verseblock">
-<div class="verseblock-content"><strong>socket_t::socket_t(context_t <em>&amp;context</em>, int <em>type</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_socket()</em> function, as described in <a href="zmq_socket.html">zmq_socket(3)</a>.</p></div>
-<h4 id="_destructor_2">Destructor</h4>
-<div class="verseblock">
-<div class="verseblock-content"><strong>socket_t::~socket_t(void)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Calls the <em>zmq_close()</em> function, as described in <a href="zmq_close.html">zmq_close(3)</a>.</p></div>
-<h4 id="_methods_2">Methods</h4>
-<div class="verseblock">
-<div class="verseblock-content"><strong>void socket_t::getsockopt(int <em>option_name</em>, void <em>*option_value</em>, size_t
-<em>*option_len</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_getsockopt()</em> function, as described in
-<a href="zmq_getsockopt.html">zmq_getsockopt(3)</a>.</p></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>void socket_t::setsockopt(int <em>option_name</em>, const void <em>*option_value</em>, size_t
-<em>option_len</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_setsockopt()</em> function, as described in
-<a href="zmq_setsockopt.html">zmq_setsockopt(3)</a>.</p></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>void socket_t::bind(const char <em>*endpoint</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_bind()</em> function, as described in <a href="zmq_bind.html">zmq_bind(3)</a>.</p></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>void socket_t::connect(const char <em>*endpoint</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_connect()</em> function, as described in <a href="zmq_connect.html">zmq_connect(3)</a>.</p></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>bool socket_t::send(message_t <em>&amp;msg</em>, int <em>flags</em> = 0)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_send()</em> function, as described in <a href="zmq_send.html">zmq_send(3)</a>.</p></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>bool socket_t::recv(message_t <em>*msg</em>, int <em>flags</em> = 0)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_recv()</em> function, as described in <a href="zmq_recv.html">zmq_recv(3)</a>.</p></div>
-<h3 id="_message">Message</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>zmq::message_t</em> class encapsulates the <em>zmq_msg_t</em> structure and
-functions to construct, destruct and manipulate ØMQ messages.</p></div>
-<h4 id="_constructor_3">Constructor</h4>
-<div class="verseblock">
-<div class="verseblock-content"><strong>message_t::message_t(void)</strong>
-<strong>message_t::message_t(size_t <em>size</em>)</strong>
-<strong>message_t::message_t(void <em>*data</em>, size_t <em>size</em>, free_fn <em>*ffn</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>These map to the <em>zmq_msg_init()</em>, <em>zmq_msg_init_size()</em> and
-<em>zmq_msg_init_data()</em> functions, described in <a href="zmq_msg_init.html">zmq_msg_init(3)</a>,
-<a href="zmq_msg_init_size.html">zmq_msg_init_size(3)</a> and <a href="zmq_msg_init_data.html">zmq_msg_init_data(3)</a> respectively.</p></div>
-<h4 id="_destructor_3">Destructor</h4>
-<div class="verseblock">
-<div class="verseblock-content"><strong>message_t::~message_t(void)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Calls the <em>zmq_msg_close()</em> function, as described in <a href="zmq_msg_close.html">zmq_msg_close(3)</a>.</p></div>
-<h4 id="_methods_3">Methods</h4>
-<div class="verseblock">
-<div class="verseblock-content"><strong>void *message_t::data (void)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_msg_data()</em> function, as described in <a href="zmq_msg_data.html">zmq_msg_data(3)</a>.</p></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>size_t message_t::size (void)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_msg_size()</em> function, as described in <a href="zmq_msg_size.html">zmq_msg_size(3)</a>.</p></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>void message_t::copy (message_t <em>*src</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_msg_copy()</em> function, as described in <a href="zmq_msg_copy.html">zmq_msg_copy(3)</a>.</p></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>void message_t::move (message_t <em>*src</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Maps to the <em>zmq_msg_move()</em> function, as described in <a href="zmq_msg_move.html">zmq_msg_move(3)</a>.</p></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>message_t::rebuild(void)</strong>
-<strong>message_t::rebuild(size_t <em>size</em>)</strong>
-<strong>message_t::rebuild(void <em>*data</em>, size_t <em>size</em>, free_fn <em>*ffn</em>)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>Equivalent to calling the <em>zmq_msg_close()</em> function followed by the
-corresponding <em>zmq_msg_init()</em> function.</p></div>
-<h3 id="_input_output_multiplexing">Input/output multiplexing</h3><div style="clear:left"></div>
-<div class="verseblock">
-<div class="verseblock-content"><strong>int poll (zmq_pollitem_t *items, int nitems, long timeout = -1)</strong></div>
-<div class="verseblock-attribution">
-</div></div>
-<div class="paragraph"><p>The <em>poll()</em> function is a namespaced equivalent of the <em>zmq_poll()</em> function,
-as described in <a href="zmq_poll.html">zmq_poll(3)</a>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">To obtain a ØMQ <em>socket</em> for use in a <em>zmq_pollitem_t</em> structure, you
-should cast an instance of the <em>socket_t</em> class to <tt>(void *)</tt>.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_error_handling">ERROR HANDLING</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All errors reported by the underlying ØMQ C library functions are automatically
-converted to exceptions by the C++ language binding. The <em>zmq::error_t</em> class
-is derived from the <em>std::exception</em> class and uses the <em>zmq_strerror()</em>
-function to convert the error code to human-readable string.</p></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content">
-<pre><tt>zmq::context_t ctx (1);
-zmq::socket_t s (ctx, ZMQ_PUB);
-s.connect ("tcp://192.168.0.115:5555");
-zmq::message_t msg (100);
-memset (msg.data (), 0, 100);
-s.send (msg);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:40:36 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_cpp.txt b/doc/zmq_cpp.txt
index d43ff62..cd5cdc9 100644
--- a/doc/zmq_cpp.txt
+++ b/doc/zmq_cpp.txt
@@ -102,11 +102,13 @@ Maps to the _zmq_connect()_ function, as described in linkzmq:zmq_connect[3].
*bool socket_t::send(message_t '&msg', int 'flags' = 0)*
Maps to the _zmq_send()_ function, as described in linkzmq:zmq_send[3].
+Returns true if message is successfully sent, false if it is not.
[verse]
*bool socket_t::recv(message_t '*msg', int 'flags' = 0)*
Maps to the _zmq_recv()_ function, as described in linkzmq:zmq_recv[3].
+Returns true if message is successfully received, false if it is not.
Message
@@ -206,5 +208,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_device.3 b/doc/zmq_device.3
new file mode 100644
index 0000000..e19c800
--- /dev/null
+++ b/doc/zmq_device.3
@@ -0,0 +1,140 @@
+'\" t
+.\" Title: zmq_device
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+.\" Date: 03/15/2011
+.\" Manual: 0MQ Manual
+.\" Source: 0MQ 2.1.3
+.\" Language: English
+.\"
+.TH "ZMQ_DEVICE" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+zmq_device \- start built\-in 0MQ device
+.SH "SYNOPSIS"
+.sp
+\fBint zmq_device (int \fR\fB\fIdevice\fR\fR\fB, const void \fR\fB\fI*frontend\fR\fR\fB, const void \fR\fB\fI*backend\fR\fR\fB);\fR
+.SH "DESCRIPTION"
+.sp
+The \fIzmq_device()\fR function starts a built\-in 0MQ device\&. The \fIdevice\fR argument is one of:
+.PP
+\fIZMQ_QUEUE\fR
+.RS 4
+starts a queue device
+.RE
+.PP
+\fIZMQ_FORWARDER\fR
+.RS 4
+starts a forwarder device
+.RE
+.PP
+\fIZMQ_STREAMER\fR
+.RS 4
+starts a streamer device
+.RE
+.sp
+The device connects a frontend socket to a backend socket\&. Conceptually, data flows from frontend to backend\&. Depending on the socket types, replies may flow in the opposite direction\&.
+.sp
+Before calling \fIzmq_device()\fR you must set any socket options, and connect or bind both frontend and backend sockets\&. The two conventional device models are:
+.PP
+\fBproxy\fR
+.RS 4
+bind frontend socket to an endpoint, and connect backend socket to downstream components\&. A proxy device model does not require changes to the downstream topology but that topology is static (any changes require reconfiguring the device)\&.
+.RE
+.PP
+\fBbroker\fR
+.RS 4
+bind frontend socket to one endpoint and bind backend socket to a second endpoint\&. Downstream components must now connect into the device\&. A broker device model allows a dynamic downstream topology (components can come and go at any time)\&.
+.RE
+.sp
+\fIzmq_device()\fR runs in the current thread and returns only if/when the current context is closed\&.
+.SH "QUEUE DEVICE"
+.sp
+\fIZMQ_QUEUE\fR creates a shared queue that collects requests from a set of clients, and distributes these fairly among a set of services\&. Requests are fair\-queued from frontend connections and load\-balanced between backend connections\&. Replies automatically return to the client that made the original request\&.
+.sp
+This device is part of the \fIrequest\-reply\fR pattern\&. The frontend speaks to clients and the backend speaks to services\&. You should use \fIZMQ_QUEUE\fR with a \fIZMQ_XREP\fR socket for the frontend and a \fIZMQ_XREQ\fR socket for the backend\&. Other combinations are not documented\&.
+.sp
+Refer to \fBzmq_socket\fR(3) for a description of these socket types\&.
+.SH "FORWARDER DEVICE"
+.sp
+\fIZMQ_FORWARDER\fR collects messages from a set of publishers and forwards these to a set of subscribers\&. You will generally use this to bridge networks, e\&.g\&. read on TCP unicast and forward on multicast\&.
+.sp
+This device is part of the \fIpublish\-subscribe\fR pattern\&. The frontend speaks to publishers and the backend speaks to subscribers\&. You should use \fIZMQ_FORWARDER\fR with a \fIZMQ_SUB\fR socket for the frontend and a \fIZMQ_PUB\fR socket for the backend\&. Other combinations are not documented\&.
+.sp
+Refer to \fBzmq_socket\fR(3) for a description of these socket types\&.
+.SH "STREAMER DEVICE"
+.sp
+\fIZMQ_STREAMER\fR collects tasks from a set of pushers and forwards these to a set of pullers\&. You will generally use this to bridge networks\&. Messages are fair\-queued from pushers and load\-balanced to pullers\&.
+.sp
+This device is part of the \fIpipeline\fR pattern\&. The frontend speaks to pushers and the backend speaks to pullers\&. You should use \fIZMQ_STREAMER\fR with a \fIZMQ_PULL\fR socket for the frontend and a \fIZMQ_PUSH\fR socket for the backend\&. Other combinations are not documented\&.
+.sp
+Refer to \fBzmq_socket\fR(3) for a description of these socket types\&.
+.SH "RETURN VALUE"
+.sp
+The \fIzmq_device()\fR function always returns \-1 and \fIerrno\fR set to \fBETERM\fR (the 0MQ \fIcontext\fR associated with either of the specified sockets was terminated)\&.
+.SH "EXAMPLE"
+.PP
+\fBCreating a queue broker\fR.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+// Create frontend and backend sockets
+void *frontend = zmq_socket (context, ZMQ_XREP);
+assert (backend);
+void *backend = zmq_socket (context, ZMQ_XREQ);
+assert (frontend);
+// Bind both sockets to TCP ports
+assert (zmq_bind (frontend, "tcp://*:5555") == 0);
+assert (zmq_bind (backend, "tcp://*:5556") == 0);
+// Start a queue device
+zmq_device (ZMQ_QUEUE, frontend, backend);
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.SH "SEE ALSO"
+.sp
+\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
diff --git a/doc/zmq_device.txt b/doc/zmq_device.txt
new file mode 100644
index 0000000..93e616d
--- /dev/null
+++ b/doc/zmq_device.txt
@@ -0,0 +1,138 @@
+zmq_device(3)
+=============
+
+NAME
+----
+zmq_device - start built-in 0MQ device
+
+
+SYNOPSIS
+--------
+*int zmq_device (int 'device', const void '*frontend', const void '*backend');*
+
+
+DESCRIPTION
+-----------
+The _zmq_device()_ function starts a built-in 0MQ device. The 'device' argument
+is one of:
+
+'ZMQ_QUEUE'::
+ starts a queue device
+'ZMQ_FORWARDER'::
+ starts a forwarder device
+'ZMQ_STREAMER'::
+ starts a streamer device
+
+The device connects a frontend socket to a backend socket. Conceptually, data
+flows from frontend to backend. Depending on the socket types, replies may flow
+in the opposite direction.
+
+Before calling _zmq_device()_ you must set any socket options, and connect or
+bind both frontend and backend sockets. The two conventional device models are:
+
+*proxy*::
+ bind frontend socket to an endpoint, and connect backend socket to
+ downstream components. A proxy device model does not require changes to
+ the downstream topology but that topology is static (any changes require
+ reconfiguring the device).
+*broker*::
+ bind frontend socket to one endpoint and bind backend socket to a second
+ endpoint. Downstream components must now connect into the device. A broker
+ device model allows a dynamic downstream topology (components can come and
+ go at any time).
+
+_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,
+and distributes these fairly among a set of services. Requests are fair-queued
+from frontend connections and load-balanced between backend connections.
+Replies automatically return to the client that made the original request.
+
+This device is part of the 'request-reply' pattern. The frontend speaks to
+clients and the backend speaks to services. You should use 'ZMQ_QUEUE' with a
+'ZMQ_XREP' socket for the frontend and a 'ZMQ_XREQ' socket for the backend.
+Other combinations are not documented.
+
+Refer to linkzmq: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
+a set of subscribers. You will generally use this to bridge networks, e.g. read
+on TCP unicast and forward on multicast.
+
+This device is part of the 'publish-subscribe' pattern. The frontend speaks to
+publishers and the backend speaks to subscribers. You should use
+'ZMQ_FORWARDER' with a 'ZMQ_SUB' socket for the frontend and a 'ZMQ_PUB' socket
+for the backend. Other combinations are not documented.
+
+Refer to linkzmq: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
+of pullers. You will generally use this to bridge networks. Messages are
+fair-queued from pushers and load-balanced to pullers.
+
+This device is part of the 'pipeline' pattern. The frontend speaks to pushers
+and the backend speaks to pullers. You should use 'ZMQ_STREAMER' with a
+'ZMQ_PULL' socket for the frontend and a 'ZMQ_PUSH' socket for the backend.
+Other combinations are not documented.
+
+Refer to linkzmq: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
+0MQ 'context' associated with either of the specified sockets was terminated).
+
+
+EXAMPLE
+-------
+.Creating a queue broker
+----
+// Create frontend and backend sockets
+void *frontend = zmq_socket (context, ZMQ_XREP);
+assert (backend);
+void *backend = zmq_socket (context, ZMQ_XREQ);
+assert (frontend);
+// Bind both sockets to TCP ports
+assert (zmq_bind (frontend, "tcp://*:5555") == 0);
+assert (zmq_bind (backend, "tcp://*:5556") == 0);
+// Start a queue device
+zmq_device (ZMQ_QUEUE, frontend, backend);
+----
+
+
+SEE ALSO
+--------
+linkzmq:zmq_bind[3]
+linkzmq:zmq_connect[3]
+linkzmq:zmq_socket[3]
+linkzmq:zmq[7]
+
+
+AUTHORS
+-------
+This 0MQ manual page was written by Pieter Hintjens <ph@imatix.com>
+
+
+RESOURCES
+---------
+Main web site: <http://www.zeromq.org/>
+
+Report bugs to the 0MQ development mailing list: <zeromq-dev@lists.zeromq.org>
+
+
+COPYING
+-------
+Free use of this software is granted under the terms of the GNU Lesser General
+Public License (LGPL). For details see the files `COPYING` and `COPYING.LESSER`
+included with the 0MQ distribution.
diff --git a/doc/zmq_epgm.7 b/doc/zmq_epgm.7
index 9135e1c..06cc456 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_PGM" "7" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_PGM" "7" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -38,7 +38,7 @@ PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport
.sp
The \fIpgm\fR and \fIepgm\fR transports can only be used with the \fIZMQ_PUB\fR and \fIZMQ_SUB\fR socket types\&.
.sp
-Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loopback interface\&. For details, refer to the \fIZMQ_RATE\fR, \fIZMQ_RECOVERY_IVL\fR and \fIZMQ_MCAST_LOOP\fR options documented in \fBzmq_setsockopt\fR(3)\&.
+Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loop\-back interface\&. For details, refer to the \fIZMQ_RATE\fR, \fIZMQ_RECOVERY_IVL\fR and \fIZMQ_MCAST_LOOP\fR options documented in \fBzmq_setsockopt\fR(3)\&.
.if n \{\
.sp
.\}
@@ -105,7 +105,7 @@ Interface names are not standardised in any way and should be assumed to be arbi
A \fImulticast address\fR is specified by an IPv4 multicast address in it\(cqs numeric representation\&.
.SH "WIRE FORMAT"
.sp
-Consecutive PGM datagrams are interpreted by 0MQ as a single continous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams\&. This stream of data consists of 0MQ messages encapsulated in \fIframes\fR as described in \fBzmq_tcp\fR(7)\&.
+Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams\&. This stream of data consists of 0MQ messages encapsulated in \fIframes\fR as described in \fBzmq_tcp\fR(7)\&.
.SS "PGM datagram payload"
.sp
The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ:
@@ -174,7 +174,7 @@ Third datagram payload
.\}
.nf
/* Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, */
-/* using the first ethernet network interface on Linux */
+/* using the first Ethernet network interface on Linux */
/* and the Encapsulated PGM protocol */
rc = zmq_connect(socket, "epgm://eth0;239\&.192\&.1\&.1:5555");
assert (rc == 0);
@@ -193,7 +193,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_epgm.html b/doc/zmq_epgm.html
deleted file mode 100644
index 06a1b70..0000000
--- a/doc/zmq_epgm.html
+++ /dev/null
@@ -1,745 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_pgm(7)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_pgm(7) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_pgm -
- 0MQ reliable multicast transport using PGM
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>PGM (Pragmatic General Multicast) is a protocol for reliable multicast
-transport of data over IP networks.</p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ØMQ implements two variants of PGM, the standard protocol where PGM datagrams
-are layered directly on top of IP datagrams as defined by RFC 3208 (the <em>pgm</em>
-transport) and "Encapsulated PGM" where PGM datagrams are encapsulated inside
-UDP datagrams (the <em>epgm</em> transport).</p></div>
-<div class="paragraph"><p>The <em>pgm</em> and <em>epgm</em> transports can only be used with the <em>ZMQ_PUB</em> and
-<em>ZMQ_SUB</em> socket types.</p></div>
-<div class="paragraph"><p>Further, PGM sockets are rate limited by default and incur a performance
-penalty when used over a loopback interface. For details, refer to the
-<em>ZMQ_RATE</em>, <em>ZMQ_RECOVERY_IVL</em> and <em>ZMQ_MCAST_LOOP</em> options documented in
-<a href="zmq_setsockopt.html">zmq_setsockopt(3)</a>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">The <em>pgm</em> transport implementation requires access to raw IP sockets.
-Additional privileges may be required on some operating systems for this
-operation. Applications not requiring direct interoperability with other PGM
-implementations are encouraged to use the <em>epgm</em> transport instead which does
-not require any special privileges.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_addressing">ADDRESSING</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A ØMQ address string consists of two parts as follows:
-<em>transport</em><tt>://</tt><em>endpoint</em>. The <em>transport</em> part specifies the underlying
-transport protocol to use. For the standard PGM protocol, <em>transport</em> shall be
-set to <tt>pgm</tt>. For the "Encapsulated PGM" protocol <em>transport</em> shall be set to
-<tt>epgm</tt>. The meaning of the <em>endpoint</em> part for both the <em>pgm</em> and <em>epgm</em>
-transport is defined below.</p></div>
-<h3 id="_connecting_a_socket">Connecting a socket</h3><div style="clear:left"></div>
-<div class="paragraph"><p>When connecting a socket to a peer address using <em>zmq_connect()</em> with the <em>pgm</em>
-or <em>epgm</em> transport, the <em>endpoint</em> shall be interpreted as an <em>interface</em>
-followed by a semicolon, followed by a <em>multicast address</em>, followed by a colon
-and a port number.</p></div>
-<div class="paragraph"><p>An <em>interface</em> may be specified by either of the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The interface name as defined by the operating system.
-</p>
-</li>
-<li>
-<p>
-The primary IPv4 address assigned to the interface, in it&#8217;s numeric
- representation.
-</p>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Interface names are not standardised in any way and should be assumed to
-be arbitrary and platform dependent. On Win32 platforms no short interface
-names exist, thus only the primary IPv4 address may be used to specify an
-<em>interface</em>.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>A <em>multicast address</em> is specified by an IPv4 multicast address in it&#8217;s numeric
-representation.</p></div>
-</div>
-<h2 id="_wire_format">WIRE FORMAT</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Consecutive PGM datagrams are interpreted by ØMQ as a single continous stream
-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 <em>frames</em> as described in
-<a href="zmq_tcp.html">zmq_tcp(7)</a>.</p></div>
-<h3 id="_pgm_datagram_payload">PGM datagram payload</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The following ABNF grammar represents the payload of a single PGM datagram as
-used by ØMQ:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt>datagram = (offset data)
-offset = 2OCTET
-data = *OCTET</tt></pre>
-</div></div>
-<div class="paragraph"><p>In order for late joining consumers to be able to identify message boundaries,
-each PGM datagram payload starts with a 16-bit unsigned integer in network byte
-order specifying either the offset of the first message <em>frame</em> in the datagram
-or containing the value <tt>0xFFFF</tt> if the datagram contains solely an
-intermediate part of a larger message.</p></div>
-<div class="paragraph"><p>The following diagram illustrates the layout of a single PGM datagram payload:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt>+------------------+----------------------+
-| offset (16 bits) | data |
-+------------------+----------------------+</tt></pre>
-</div></div>
-<div class="paragraph"><p>The following diagram further illustrates how three example ØMQ frames are laid
-out in consecutive PGM datagram payloads:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt>First datagram payload
-+--------------+-------------+---------------------+
-| Frame offset | Frame 1 | Frame 2, part 1 |
-| 0x0000 | (Message 1) | (Message 2, part 1) |
-+--------------+-------------+---------------------+
-
-Second datagram payload
-+--------------+---------------------+
-| Frame offset | Frame 2, part 2 |
-| 0xFFFF | (Message 2, part 2) |
-+--------------+---------------------+
-
-Third datagram payload
-+--------------+----------------------------+-------------+
-| Frame offset | Frame 2, final 8 bytes | Frame 3 |
-| 0x0008 | (Message 2, final 8 bytes) | (Message 3) |
-+--------------+----------------------------+-------------+</tt></pre>
-</div></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Connecting a socket</div>
-<div class="content">
-<pre><tt>/* Connecting to the multicast address 239.192.1.1, port 5555, */
-/* using the first ethernet network interface on Linux */
-/* and the Encapsulated PGM protocol */
-rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555");
-assert (rc == 0);
-/* Connecting to the multicast address 239.192.1.1, port 5555, */
-/* using the network interface with the address 192.168.1.1 */
-/* and the standard PGM protocol */
-rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555");
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_connect.html">zmq_connect(3)</a>
-<a href="zmq_setsockopt.html">zmq_setsockopt(3)</a>
-<a href="zmq_tcp.html">zmq_tcp(7)</a>
-<a href="zmq_ipc.html">zmq_ipc(7)</a>
-<a href="zmq_inproc.html">zmq_inproc(7)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_epgm.txt b/doc/zmq_epgm.txt
index 4017db2..72ae24f 100644
--- a/doc/zmq_epgm.txt
+++ b/doc/zmq_epgm.txt
@@ -24,7 +24,7 @@ The 'pgm' and 'epgm' transports can only be used with the 'ZMQ_PUB' and
'ZMQ_SUB' socket types.
Further, PGM sockets are rate limited by default and incur a performance
-penalty when used over a loopback interface. For details, refer to the
+penalty when used over a loop-back interface. For details, refer to the
'ZMQ_RATE', 'ZMQ_RECOVERY_IVL' and 'ZMQ_MCAST_LOOP' options documented in
linkzmq:zmq_setsockopt[3].
@@ -69,7 +69,7 @@ representation.
WIRE FORMAT
-----------
-Consecutive PGM datagrams are interpreted by 0MQ as a single continous stream
+Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream
of data where 0MQ messages are not necessarily aligned with PGM datagram
boundaries and a single 0MQ message may span several PGM datagrams. This stream
of data consists of 0MQ messages encapsulated in 'frames' as described in
@@ -130,7 +130,7 @@ EXAMPLE
.Connecting a socket
----
/* Connecting to the multicast address 239.192.1.1, port 5555, */
-/* using the first ethernet network interface on Linux */
+/* using the first Ethernet network interface on Linux */
/* and the Encapsulated PGM protocol */
rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555");
assert (rc == 0);
@@ -153,5 +153,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_errno.3 b/doc/zmq_errno.3
index 7f3f4e6..9e9a688 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_ERRNO" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_ERRNO" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -36,7 +36,7 @@ zmq_errno \- retrieve value of errno for the calling thread
.sp
The \fIzmq_errno()\fR function shall retrieve the value of the \fIerrno\fR variable for the calling thread\&.
.sp
-The \fIzmq_errno()\fR function is provided to assist users on non\-POSIX systems who are experiencing issues with retrieving the correct value of \fIerrno\fR directly\&. Specifically, users on Win32 systems whose application is using a different C runtime library from the C runtime library in use by 0MQ will need to use \fIzmq_errno()\fR for correct operation\&.
+The \fIzmq_errno()\fR function is provided to assist users on non\-POSIX systems who are experiencing issues with retrieving the correct value of \fIerrno\fR directly\&. Specifically, users on Win32 systems whose application is using a different C run\-time library from the C run\-time library in use by 0MQ will need to use \fIzmq_errno()\fR for correct operation\&.
.if n \{\
.sp
.\}
@@ -64,7 +64,7 @@ No errors are defined\&.
\fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_errno.html b/doc/zmq_errno.html
deleted file mode 100644
index f983bd1..0000000
--- a/doc/zmq_errno.html
+++ /dev/null
@@ -1,634 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_errno(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_errno(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_errno -
- retrieve value of errno for the calling thread
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_errno (void);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_errno()</em> function shall retrieve the value of the <em>errno</em> variable for
-the calling thread.</p></div>
-<div class="paragraph"><p>The <em>zmq_errno()</em> function is provided to assist users on non-POSIX systems who
-are experiencing issues with retrieving the correct value of <em>errno</em> directly.
-Specifically, users on Win32 systems whose application is using a different C
-runtime library from the C runtime library in use by ØMQ will need to use
-<em>zmq_errno()</em> for correct operation.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Important</div>
-</td>
-<td class="content">Users not experiencing issues with retrieving the correct value of
-<em>errno</em> should not use this function and should instead access the <em>errno</em>
-variable directly.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_errno()</em> function shall return the value of the <em>errno</em> variable for
-the calling thread.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_errno.txt b/doc/zmq_errno.txt
index 61939a5..f9cf6cb 100644
--- a/doc/zmq_errno.txt
+++ b/doc/zmq_errno.txt
@@ -20,7 +20,7 @@ the calling thread.
The _zmq_errno()_ function is provided to assist users on non-POSIX systems who
are experiencing issues with retrieving the correct value of 'errno' directly.
Specifically, users on Win32 systems whose application is using a different C
-runtime library from the C runtime library in use by 0MQ will need to use
+run-time library from the C run-time library in use by 0MQ will need to use
_zmq_errno()_ for correct operation.
IMPORTANT: Users not experiencing issues with retrieving the correct value of
@@ -46,5 +46,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_forwarder.1 b/doc/zmq_forwarder.1
deleted file mode 100644
index d0a6c39..0000000
--- a/doc/zmq_forwarder.1
+++ /dev/null
@@ -1,57 +0,0 @@
-'\" t
-.\" Title: zmq_forwarder
-.\" Author: [see the "AUTHORS" section]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
-.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
-.\" Language: English
-.\"
-.TH "ZMQ_FORWARDER" "1" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-zmq_forwarder \- forwarding device for publish\-subscribe messaging
-.SH "SYNOPSIS"
-.sp
-To be written\&.
-.SH "DESCRIPTION"
-.sp
-To be written\&.
-.SH "OPTIONS"
-.sp
-To be written\&.
-.SH "SEE ALSO"
-.sp
-\fBzmq\fR(7)
-.SH "AUTHORS"
-.sp
-The 0MQ documentation 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
diff --git a/doc/zmq_forwarder.html b/doc/zmq_forwarder.html
deleted file mode 100644
index 704a8a6..0000000
--- a/doc/zmq_forwarder.html
+++ /dev/null
@@ -1,613 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_forwarder(1)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_forwarder(1) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_forwarder -
- forwarding device for publish-subscribe messaging
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To be written.</p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To be written.</p></div>
-</div>
-<h2 id="_options">OPTIONS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To be written.</p></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_forwarder.txt b/doc/zmq_forwarder.txt
deleted file mode 100644
index b3325f2..0000000
--- a/doc/zmq_forwarder.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-zmq_forwarder(1)
-================
-
-
-NAME
-----
-zmq_forwarder - forwarding device for publish-subscribe messaging
-
-
-SYNOPSIS
---------
-To be written.
-
-
-DESCRIPTION
------------
-To be written.
-
-
-OPTIONS
--------
-To be written.
-
-
-SEE ALSO
---------
-linkzmq:zmq[7]
-
-
-AUTHORS
--------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
-Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_getsockopt.3 b/doc/zmq_getsockopt.3
index d1ea10b..9ab4ec9 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_GETSOCKOPT" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_GETSOCKOPT" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -37,6 +37,45 @@ zmq_getsockopt \- get 0MQ socket options
The \fIzmq_getsockopt()\fR function shall retrieve the value for the option specified by the \fIoption_name\fR argument for the 0MQ socket pointed to by the \fIsocket\fR argument, and store it in the buffer pointed to by the \fIoption_value\fR argument\&. The \fIoption_len\fR argument is the size in bytes of the buffer pointed to by \fIoption_value\fR; upon successful completion \fIzmq_getsockopt()\fR shall modify the \fIoption_len\fR argument to indicate the actual size of the option value stored in the buffer\&.
.sp
The following options can be retrieved with the \fIzmq_getsockopt()\fR function:
+.SS "ZMQ_TYPE: Retrieve socket type"
+.sp
+The \fIZMQ_TYPE\fR option shall retrieve the socket type for the specified \fIsocket\fR\&. The socket type is specified at socket creation time and cannot be modified afterwards\&.
+.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
+N/A
+T}
+T{
+.sp
+Default value
+T}:T{
+.sp
+N/A
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all
+T}
+.TE
+.sp 1
.SS "ZMQ_RCVMORE: More message parts to follow"
.sp
The \fIZMQ_RCVMORE\fR option shall return a boolean value indicating if the multi\-part message currently being read from the specified \fIsocket\fR has more message parts to follow\&. If there are no message parts to follow or if the message currently being read is not a multi\-part message a value of zero shall be returned\&. Otherwise, a value of 1 shall be returned\&.
@@ -207,7 +246,7 @@ T}
.sp 1
.SS "ZMQ_IDENTITY: Retrieve socket identity"
.sp
-The \fIZMQ_IDENTITY\fR option shall retrieve the identity of the specified \fIsocket\fR\&. Socket identity determines if existing 0MQ infastructure (\fImessage queues\fR, \fIforwarding devices\fR) shall be identified with a specific application and persist across multiple runs of the application\&.
+The \fIZMQ_IDENTITY\fR option shall retrieve the identity of the specified \fIsocket\fR\&. Socket identity determines if existing 0MQ infrastructure (\fImessage queues\fR, \fIforwarding devices\fR) shall be identified with a specific application and persist across multiple runs of the application\&.
.sp
If the socket has no identity, each run of an application is completely separate from other runs\&. However, with identity set the socket shall re\-use any existing 0MQ infrastructure configured by the previous run(s)\&. Thus the application may receive messages that were sent in the meantime, \fImessage queue\fR limits shall be shared with previous run(s) and so on\&.
.sp
@@ -326,9 +365,50 @@ all, when using multicast transports
T}
.TE
.sp 1
-.SS "ZMQ_MCAST_LOOP: Control multicast loopback"
+.SS "ZMQ_RECOVERY_IVL_MSEC: Get multicast recovery interval in milliseconds"
+.sp
+The \fIZMQ_RECOVERY_IVL\(cq_MSEC option shall retrieve the recovery interval, in milliseconds, for multicast transports using the specified \*(Aqsocket\fR\&. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur\&.
.sp
-The \fIZMQ_MCAST_LOOP\fR option controls whether data sent via multicast transports can also be received by the sending host via loopback\&. A value of zero indicates that the loopback functionality is disabled, while the default value of 1 indicates that the loopback functionality is enabled\&. Leaving multicast loopback enabled when it is not required can have a negative impact on performance\&. Where possible, disable \fIZMQ_MCAST_LOOP\fR in production environments\&.
+For backward compatibility, the default value of \fIZMQ_RECOVERY_IVL_MSEC\fR is \-1 indicating that the recovery interval should be obtained from the \fIZMQ_RECOVERY_IVL\fR option\&. However, if the \fIZMQ_RECOVERY_IVL_MSEC\fR value is not zero, then it will take precedence, and be used\&.
+.TS
+tab(:);
+lt lt
+lt lt
+lt lt
+lt lt.
+T{
+.sp
+Option value type
+T}:T{
+.sp
+int64_t
+T}
+T{
+.sp
+Option value unit
+T}:T{
+.sp
+milliseconds
+T}
+T{
+.sp
+Default value
+T}:T{
+.sp
+\-1
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all, when using multicast transports
+T}
+.TE
+.sp 1
+.SS "ZMQ_MCAST_LOOP: Control multicast loop\-back"
+.sp
+The \fIZMQ_MCAST_LOOP\fR 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 value of 1 indicates that the loop\-back functionality is enabled\&. Leaving multicast loop\-back enabled when it is not required can have a negative impact on performance\&. Where possible, disable \fIZMQ_MCAST_LOOP\fR in production environments\&.
.TS
tab(:);
lt lt
@@ -443,6 +523,352 @@ all
T}
.TE
.sp 1
+.SS "ZMQ_LINGER: Retrieve linger period for socket shutdown"
+.sp
+The \fIZMQ_LINGER\fR option shall retrieve the linger period for the specified \fIsocket\fR\&. 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 \fBzmq_close\fR(3), and further affects the termination of the socket\(cqs context with \fBzmq_term\fR(3)\&. The following outlines the different behaviours:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The default value of
+\fI\-1\fR
+specifies an infinite linger period\&. Pending messages shall not be discarded after a call to
+\fIzmq_close()\fR; attempting to terminate the socket\(cqs context with
+\fIzmq_term()\fR
+shall block until all pending messages have been sent to a peer\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The value of
+\fI0\fR
+specifies no linger period\&. Pending messages shall be discarded immediately when the socket is closed with
+\fIzmq_close()\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Positive values specify an upper bound for the linger period in milliseconds\&. Pending messages shall not be discarded after a call to
+\fIzmq_close()\fR; attempting to terminate the socket\(cqs context with
+\fIzmq_term()\fR
+shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded\&.
+.TS
+tab(:);
+lt lt
+lt lt
+lt lt
+lt lt.
+T{
+Option value type
+T}:T{
+int
+T}
+T{
+Option value unit
+T}:T{
+milliseconds
+T}
+T{
+Default value
+T}:T{
+\-1 (infinite)
+T}
+T{
+Applicable socket types
+T}:T{
+all
+T}
+.TE
+.sp 1
+.RE
+.SS "ZMQ_RECONNECT_IVL: Retrieve reconnection interval"
+.sp
+The \fIZMQ_RECONNECT_IVL\fR option shall retrieve the initial reconnection interval for the specified \fIsocket\fR\&. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection\-oriented transports\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket\&.
+.sp .5v
+.RE
+.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
+100
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all, only for connection\-oriented transports
+T}
+.TE
+.sp 1
+.SS "ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval"
+.sp
+The \fIZMQ_RECONNECT_IVL_MAX\fR option shall retrieve the maximum reconnection interval for the specified \fIsocket\fR\&. This is the maximum period 0MQ shall wait between attempts to reconnect\&. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached\&. This allows for exponential backoff strategy\&. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+Values less than ZMQ_RECONNECT_IVL will be ignored\&.
+.sp .5v
+.RE
+.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
+0 (only use ZMQ_RECONNECT_IVL)
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all, only for connection\-oriented transport
+T}
+.TE
+.sp 1
+.SS "ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections"
+.sp
+The \fIZMQ_BACKLOG\fR option shall retrieve the maximum length of the queue of outstanding peer connections for the specified \fIsocket\fR; this only applies to connection\-oriented transports\&. For details refer to your operating system documentation for the \fIlisten\fR function\&.
+.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
+connections
+T}
+T{
+.sp
+Default value
+T}:T{
+.sp
+100
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all, only for connection\-oriented transports
+T}
+.TE
+.sp 1
+.SS "ZMQ_FD: Retrieve file descriptor associated with the socket"
+.sp
+The \fIZMQ_FD\fR option shall retrieve the file descriptor associated with the specified \fIsocket\fR\&. The returned file descriptor can be used to integrate the socket into an existing event loop; the 0MQ library shall signal any pending events on the socket in an \fIedge\-triggered\fR fashion by making the file descriptor become ready for reading\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+The ability to read from the returned file descriptor does not necessarily indicate that messages are available to be read from, or can be written to, the underlying socket; applications must retrieve the actual event state with a subsequent retrieval of the \fIZMQ_EVENTS\fR option\&.
+.sp .5v
+.RE
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBCaution\fR
+.ps -1
+.br
+.sp
+The returned file descriptor is intended for use with a \fIpoll\fR or similar system call only\&. Applications must never attempt to read or write data to it directly, neither should they try to close it\&.
+.sp .5v
+.RE
+.TS
+tab(:);
+lt lt
+lt lt
+lt lt
+lt lt.
+T{
+.sp
+Option value type
+T}:T{
+.sp
+int on POSIX systems, SOCKET on Windows
+T}
+T{
+.sp
+Option value unit
+T}:T{
+.sp
+N/A
+T}
+T{
+.sp
+Default value
+T}:T{
+.sp
+N/A
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all
+T}
+.TE
+.sp 1
+.SS "ZMQ_EVENTS: Retrieve socket event state"
+.sp
+The \fIZMQ_EVENTS\fR option shall retrieve the event state for the specified \fIsocket\fR\&. The returned value is a bit mask constructed by OR\(cqing a combination of the following event flags:
+.PP
+\fBZMQ_POLLIN\fR
+.RS 4
+Indicates that at least one message may be received from the specified socket without blocking\&.
+.RE
+.PP
+\fBZMQ_POLLOUT\fR
+.RS 4
+Indicates that at least one message may be sent to the specified socket without blocking\&.
+.RE
+.sp
+The combination of a file descriptor returned by the \fIZMQ_FD\fR option being ready for reading but no actual events returned by a subsequent retrieval of the \fIZMQ_EVENTS\fR option is valid; applications should simply ignore this case and restart their polling operation/event loop\&.
+.TS
+tab(:);
+lt lt
+lt lt
+lt lt
+lt lt.
+T{
+.sp
+Option value type
+T}:T{
+.sp
+uint32_t
+T}
+T{
+.sp
+Option value unit
+T}:T{
+.sp
+N/A (flags)
+T}
+T{
+.sp
+Default value
+T}:T{
+.sp
+N/A
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all
+T}
+.TE
+.sp 1
.SH "RETURN VALUE"
.sp
The \fIzmq_getsockopt()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&.
@@ -476,6 +902,11 @@ The provided
\fIsocket\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBEINTR\fR
+.RS 4
+The operation was interrupted by delivery of a signal\&.
+.RE
.SH "EXAMPLE"
.PP
\fBRetrieving the high water mark\fR.
@@ -499,7 +930,7 @@ assert (rc == 0);
\fBzmq_setsockopt\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_getsockopt.html b/doc/zmq_getsockopt.html
deleted file mode 100644
index 972dbde..0000000
--- a/doc/zmq_getsockopt.html
+++ /dev/null
@@ -1,1202 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_getsockopt(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_getsockopt(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_getsockopt -
- get 0MQ socket options
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_getsockopt (void <em>*socket</em>, int <em>option_name</em>, void <em>*option_value</em>, size_t <em>*option_len</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_getsockopt()</em> function shall retrieve the value for the option
-specified by the <em>option_name</em> argument for the ØMQ socket pointed to by the
-<em>socket</em> argument, and store it in the buffer pointed to by the <em>option_value</em>
-argument. The <em>option_len</em> argument is the size in bytes of the buffer pointed
-to by <em>option_value</em>; upon successful completion <em>zmq_getsockopt()</em> shall
-modify the <em>option_len</em> argument to indicate the actual size of the option
-value stored in the buffer.</p></div>
-<div class="paragraph"><p>The following options can be retrieved with the <em>zmq_getsockopt()</em> function:</p></div>
-<h3 id="_zmq_rcvmore_more_message_parts_to_follow">ZMQ_RCVMORE: More message parts to follow</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_RCVMORE</em> option shall return a boolean value indicating if the
-multi-part message currently being read from the specified <em>socket</em> has more
-message parts to follow. If there are no message parts to follow or if the
-message currently being read is not a multi-part message a value of zero shall
-be returned. Otherwise, a value of 1 shall be returned.</p></div>
-<div class="paragraph"><p>Refer to <a href="zmq_send.html">zmq_send(3)</a> and <a href="zmq_recv.html">zmq_recv(3)</a> for a detailed description
-of sending/receiving multi-part messages.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-int64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-boolean
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_hwm_retrieve_high_water_mark">ZMQ_HWM: Retrieve high water mark</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_HWM</em> option shall retrieve the high water mark for the specified
-<em>socket</em>. 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 <em>socket</em> is communicating with.</p></div>
-<div class="paragraph"><p>If this limit has been reached the socket shall enter an exceptional state and
-depending on the socket type, ØMQ shall take appropriate action such as
-blocking or dropping sent messages. Refer to the individual socket descriptions
-in <a href="zmq_socket.html">zmq_socket(3)</a> for details on the exact action taken for each socket
-type.</p></div>
-<div class="paragraph"><p>The default <em>ZMQ_HWM</em> value of zero means "no limit".</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-uint64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-messages
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_swap_retrieve_disk_offload_size">ZMQ_SWAP: Retrieve disk offload size</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_SWAP</em> option shall retrieve the disk offload (swap) size for the
-specified <em>socket</em>. A socket which has <em>ZMQ_SWAP</em> set to a non-zero value may
-exceed it&#8217;s high water mark; in this case outstanding messages shall be
-offloaded to storage on disk rather than held in memory.</p></div>
-<div class="paragraph"><p>The value of <em>ZMQ_SWAP</em> defines the maximum size of the swap space in bytes.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-int64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-bytes
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_affinity_retrieve_i_o_thread_affinity">ZMQ_AFFINITY: Retrieve I/O thread affinity</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_AFFINITY</em> option shall retrieve the I/O thread affinity for newly
-created connections on the specified <em>socket</em>.</p></div>
-<div class="paragraph"><p>Affinity determines which threads from the ØMQ I/O thread pool associated with
-the socket&#8217;s <em>context</em> shall handle newly created connections. A value of zero
-specifies no affinity, meaning that work shall be distributed fairly among all
-ØMQ I/O threads in the thread pool. For non-zero values, the lowest bit
-corresponds to thread 1, second lowest bit to thread 2 and so on. For example,
-a value of 3 specifies that subsequent connections on <em>socket</em> shall be handled
-exclusively by I/O threads 1 and 2.</p></div>
-<div class="paragraph"><p>See also <a href="zmq_init.html">zmq_init(3)</a> for details on allocating the number of I/O
-threads for a specific <em>context</em>.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-uint64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A (bitmap)
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_identity_retrieve_socket_identity">ZMQ_IDENTITY: Retrieve socket identity</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_IDENTITY</em> option shall retrieve the identity of the specified
-<em>socket</em>. Socket identity determines if existing ØMQ infastructure (<em>message
-queues</em>, <em>forwarding devices</em>) shall be identified with a specific application
-and persist across multiple runs of the application.</p></div>
-<div class="paragraph"><p>If the socket has no identity, each run of an application is completely
-separate from other runs. However, with identity set the socket shall re-use
-any existing ØMQ infrastructure configured by the previous run(s). Thus the
-application may receive messages that were sent in the meantime, <em>message
-queue</em> limits shall be shared with previous run(s) and so on.</p></div>
-<div class="paragraph"><p>Identity can be at least one byte and at most 255 bytes long. Identities
-starting with binary zero are reserved for use by ØMQ infrastructure.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-binary data
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-NULL
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_rate_retrieve_multicast_data_rate">ZMQ_RATE: Retrieve multicast data rate</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_RATE</em> option shall retrieve the maximum send or receive data rate for
-multicast transports using the specified <em>socket</em>.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-int64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-kilobits per second
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-100
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all, when using multicast transports
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_recovery_ivl_get_multicast_recovery_interval">ZMQ_RECOVERY_IVL: Get multicast recovery interval</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_RECOVERY_IVL</em> option shall retrieve the recovery interval for
-multicast transports using the specified <em>socket</em>. The recovery interval
-determines the maximum time in seconds that a receiver can be absent from a
-multicast group before unrecoverable data loss will occur.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-int64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-seconds
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-10
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all, when using multicast transports
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_mcast_loop_control_multicast_loopback">ZMQ_MCAST_LOOP: Control multicast loopback</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_MCAST_LOOP</em> option controls whether data sent via multicast
-transports can also be received by the sending host via loopback. A value of
-zero indicates that the loopback functionality is disabled, while the default
-value of 1 indicates that the loopback functionality is enabled. Leaving
-multicast loopback enabled when it is not required can have a negative impact
-on performance. Where possible, disable <em>ZMQ_MCAST_LOOP</em> in production
-environments.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-int64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-boolean
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-1
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all, when using multicast transports
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_sndbuf_retrieve_kernel_transmit_buffer_size">ZMQ_SNDBUF: Retrieve kernel transmit buffer size</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_SNDBUF</em> option shall retrieve the underlying kernel transmit buffer
-size for the specified <em>socket</em>. A value of zero means that the OS default is
-in effect. For details refer to your operating system documentation for the
-<em>SO_SNDBUF</em> socket option.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-uint64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-bytes
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_rcvbuf_retrieve_kernel_receive_buffer_size">ZMQ_RCVBUF: Retrieve kernel receive buffer size</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_RCVBUF</em> option shall retrieve the underlying kernel receive buffer
-size for the specified <em>socket</em>. A value of zero means that the OS default is
-in effect. For details refer to your operating system documentation for the
-<em>SO_RCVBUF</em> socket option.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-uint64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-bytes
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_getsockopt()</em> function shall return zero if successful. Otherwise it
-shall return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EINVAL</strong>
-</dt>
-<dd>
-<p>
-The requested option <em>option_name</em> is unknown, or the requested <em>option_len</em> or
-<em>option_value</em> is invalid, or the size of the buffer pointed to by
-<em>option_value</em>, as specified by <em>option_len</em>, is insufficient for storing the
-option value.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ETERM</strong>
-</dt>
-<dd>
-<p>
-The ØMQ <em>context</em> associated with the specified <em>socket</em> was terminated.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>socket</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Retrieving the high water mark</div>
-<div class="content">
-<pre><tt>/* Retrieve high water mark into hwm */
-int64_t hwm;
-size_t hwm_size = sizeof (hwm);
-rc = zmq_getsockopt (socket, ZMQ_HWM, &amp;hwm, &amp;hwm_size);
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_setsockopt.html">zmq_setsockopt(3)</a>
-<a href="zmq_socket.html">zmq_socket(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:40:36 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt
index 1e36a2a..1279fbc 100644
--- a/doc/zmq_getsockopt.txt
+++ b/doc/zmq_getsockopt.txt
@@ -26,6 +26,19 @@ value stored in the buffer.
The following options can be retrieved with the _zmq_getsockopt()_ function:
+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.
+
+[horizontal]
+Option value type:: int
+Option value unit:: N/A
+Default value:: N/A
+Applicable socket types:: all
+
+
ZMQ_RCVMORE: More message parts to follow
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RCVMORE' option shall return a boolean value indicating if the
@@ -108,7 +121,7 @@ Applicable socket types:: N/A
ZMQ_IDENTITY: Retrieve socket identity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_IDENTITY' option shall retrieve the identity of the specified
-'socket'. Socket identity determines if existing 0MQ infastructure (_message
+'socket'. Socket identity determines if existing 0MQ infrastructure (_message
queues_, _forwarding devices_) shall be identified with a specific application
and persist across multiple runs of the application.
@@ -154,13 +167,33 @@ Default value:: 10
Applicable socket types:: all, when using multicast transports
-ZMQ_MCAST_LOOP: Control multicast loopback
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+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
+can be absent from a multicast group before unrecoverable data loss will
+occur.
+
+For backward compatibility, the default value of 'ZMQ_RECOVERY_IVL_MSEC' is
+-1 indicating that the recovery interval should be obtained from the
+'ZMQ_RECOVERY_IVL' option. However, if the 'ZMQ_RECOVERY_IVL_MSEC' value is
+not zero, then it will take precedence, and be used.
+
+[horizontal]
+Option value type:: int64_t
+Option value unit:: milliseconds
+Default value:: -1
+Applicable socket types:: all, when using multicast transports
+
+
+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 loopback. A value of
-zero indicates that the loopback functionality is disabled, while the default
-value of 1 indicates that the loopback functionality is enabled. Leaving
-multicast loopback enabled when it is not required can have a negative impact
+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
+value of 1 indicates that the loop-back functionality is enabled. Leaving
+multicast loop-back enabled when it is not required can have a negative impact
on performance. Where possible, disable 'ZMQ_MCAST_LOOP' in production
environments.
@@ -199,6 +232,135 @@ Default value:: 0
Applicable socket types:: all
+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
+linkzmq:zmq_close[3], and further affects the termination of the socket's
+context with linkzmq:zmq_term[3]. The following outlines the different
+behaviours:
+
+* The default value of '-1' specifies an infinite linger period. Pending
+ messages shall not be discarded after a call to _zmq_close()_; attempting to
+ terminate the socket's context with _zmq_term()_ shall block until all
+ pending messages have been sent to a peer.
+
+* The value of '0' specifies no linger period. Pending messages shall be
+ discarded immediately when the socket is closed with _zmq_close()_.
+
+* Positive values specify an upper bound for the linger period in milliseconds.
+ Pending messages shall not be discarded after a call to _zmq_close()_;
+ attempting to terminate the socket's context with _zmq_term()_ shall block
+ until either all pending messages have been sent to a peer, or the linger
+ period expires, after which any pending messages shall be discarded.
+
+[horizontal]
+Option value type:: int
+Option value unit:: milliseconds
+Default value:: -1 (infinite)
+Applicable socket types:: all
+
+
+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 0MQ shall
+wait between attempts to reconnect disconnected peers when using
+connection-oriented transports.
+
+NOTE: The reconnection interval may be randomized by 0MQ to prevent
+reconnection storms in topologies with a large number of peers per socket.
+
+[horizontal]
+Option value type:: int
+Option value unit:: milliseconds
+Default value:: 100
+Applicable socket types:: all, only for connection-oriented transports
+
+
+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 0MQ shall wait
+between attempts to reconnect. On each reconnect attempt, the previous interval
+shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for
+exponential backoff strategy. Default value means no exponential backoff is
+performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL.
+
+NOTE: Values less than ZMQ_RECONNECT_IVL will be ignored.
+
+[horizontal]
+Option value type:: int
+Option value unit:: milliseconds
+Default value:: 0 (only use ZMQ_RECONNECT_IVL)
+Applicable socket types:: all, only for connection-oriented transport
+
+
+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
+documentation for the 'listen' function.
+
+[horizontal]
+Option value type:: int
+Option value unit:: connections
+Default value:: 100
+Applicable socket types:: all, only for connection-oriented transports
+
+
+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 0MQ library shall signal any pending
+events on the socket in an _edge-triggered_ fashion by making the file
+descriptor become ready for reading.
+
+NOTE: The ability to read from the returned file descriptor does not
+necessarily indicate that messages are available to be read from, or can be
+written to, the underlying socket; applications must retrieve the actual event
+state with a subsequent retrieval of the 'ZMQ_EVENTS' option.
+
+CAUTION: The returned file descriptor is intended for use with a 'poll' or
+similar system call only. Applications must never attempt to read or write data
+to it directly, neither should they try to close it.
+
+[horizontal]
+Option value type:: int on POSIX systems, SOCKET on Windows
+Option value unit:: N/A
+Default value:: N/A
+Applicable socket types:: all
+
+
+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:
+
+*ZMQ_POLLIN*::
+Indicates that at least one message may be received from the specified socket
+without blocking.
+
+*ZMQ_POLLOUT*::
+Indicates that at least one message may be sent to the specified socket without
+blocking.
+
+The combination of a file descriptor returned by the 'ZMQ_FD' option being
+ready for reading but no actual events returned by a subsequent retrieval of
+the 'ZMQ_EVENTS' option is valid; applications should simply ignore this case
+and restart their polling operation/event loop.
+
+[horizontal]
+Option value type:: uint32_t
+Option value unit:: N/A (flags)
+Default value:: N/A
+Applicable socket types:: all
+
+
RETURN VALUE
------------
The _zmq_getsockopt()_ function shall return zero if successful. Otherwise it
@@ -216,6 +378,8 @@ option value.
The 0MQ 'context' associated with the specified 'socket' was terminated.
*EFAULT*::
The provided 'socket' was not valid (NULL).
+*EINTR*::
+The operation was interrupted by delivery of a signal.
EXAMPLE
@@ -239,5 +403,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_init.3 b/doc/zmq_init.3
index ea52ea3..12fbe75 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_INIT" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_INIT" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -37,6 +37,10 @@ zmq_init \- initialise 0MQ context
The \fIzmq_init()\fR function initialises a 0MQ \fIcontext\fR\&.
.sp
The \fIio_threads\fR argument specifies the size of the 0MQ thread pool to handle I/O operations\&. If your application is using only the \fIinproc\fR transport for messaging you may set this to zero, otherwise set it to at least one\&.
+.PP
+\fBThread safety\fR. A 0MQ
+\fIcontext\fR
+is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller\&.
.SH "RETURN VALUE"
.sp
The \fIzmq_init()\fR function shall return an opaque handle to the initialised \fIcontext\fR if successful\&. Otherwise it shall return NULL and set \fIerrno\fR to one of the values defined below\&.
@@ -53,7 +57,7 @@ was requested\&.
\fBzmq\fR(7) \fBzmq_term\fR(3)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_init.html b/doc/zmq_init.html
deleted file mode 100644
index 3248e3f..0000000
--- a/doc/zmq_init.html
+++ /dev/null
@@ -1,632 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_init(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_init(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_init -
- initialise 0MQ context
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>void *zmq_init (int <em>io_threads</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_init()</em> function initialises a ØMQ <em>context</em>.</p></div>
-<div class="paragraph"><p>The <em>io_threads</em> argument specifies the size of the ØMQ thread pool to handle
-I/O operations. If your application is using only the <em>inproc</em> transport for
-messaging you may set this to zero, otherwise set it to at least one.</p></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_init()</em> function shall return an opaque handle to the initialised
-<em>context</em> if successful. Otherwise it shall return NULL and set <em>errno</em> to one
-of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EINVAL</strong>
-</dt>
-<dd>
-<p>
-An invalid number of <em>io_threads</em> was requested.
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq.html">zmq(7)</a>
-<a href="zmq_term.html">zmq_term(3)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_init.txt b/doc/zmq_init.txt
index 04bbbc8..eadf65d 100644
--- a/doc/zmq_init.txt
+++ b/doc/zmq_init.txt
@@ -20,6 +20,11 @@ The 'io_threads' argument specifies the size of the 0MQ thread pool to handle
I/O operations. If your application is using only the 'inproc' transport for
messaging you may set this to zero, otherwise set it to at least one.
+.Thread safety
+A 0MQ 'context' is thread safe and may be shared among as many application
+threads as necessary, without any additional locking required on the part of
+the caller.
+
RETURN VALUE
------------
@@ -42,5 +47,5 @@ linkzmq:zmq_term[3]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_inproc.7 b/doc/zmq_inproc.7
index e9cb0f1..a6839e3 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_INPROC" "7" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_INPROC" "7" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -101,7 +101,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_inproc.html b/doc/zmq_inproc.html
deleted file mode 100644
index 8a3aceb..0000000
--- a/doc/zmq_inproc.html
+++ /dev/null
@@ -1,669 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_inproc(7)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_inproc(7) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_inproc -
- 0MQ local in-process (inter-thread) communication transport
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The in-process transport passes messages via memory directly between threads
-sharing a single ØMQ <em>context</em>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">No I/O threads are involved in passing messages using the <em>inproc</em>
-transport. Therefore, if you are using a ØMQ <em>context</em> for in-process messaging
-only you can initialise the <em>context</em> with zero I/O threads. See
-<a href="zmq_init.html">zmq_init(3)</a> for details.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_addressing">ADDRESSING</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A ØMQ address string consists of two parts as follows:
-<em>transport</em><tt>://</tt><em>endpoint</em>. The <em>transport</em> part specifies the underlying
-transport protocol to use, and for the in-process transport shall be set to
-<tt>inproc</tt>. The meaning of the <em>endpoint</em> part for the in-process transport is
-defined below.</p></div>
-<h3 id="_assigning_a_local_address_to_a_socket">Assigning a local address to a socket</h3><div style="clear:left"></div>
-<div class="paragraph"><p>When assigning a local address to a <em>socket</em> using <em>zmq_bind()</em> with the
-<em>inproc</em> transport, the <em>endpoint</em> shall be interpreted as an arbitrary string
-identifying the <em>name</em> to create. The <em>name</em> must be unique within the ØMQ
-<em>context</em> associated with the <em>socket</em> and may be up to 256 characters in
-length. No other restrictions are placed on the format of the <em>name</em>.</p></div>
-<h3 id="_connecting_a_socket">Connecting a socket</h3><div style="clear:left"></div>
-<div class="paragraph"><p>When connecting a <em>socket</em> to a peer address using <em>zmq_connect()</em> with the
-<em>inproc</em> transport, the <em>endpoint</em> shall be interpreted as an arbitrary string
-identifying the <em>name</em> to connect to. The <em>name</em> must have been previously
-created by assigning it to at least one <em>socket</em> within the same ØMQ <em>context</em>
-as the <em>socket</em> being connected.</p></div>
-</div>
-<h2 id="_wire_format">WIRE FORMAT</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Not applicable.</p></div>
-</div>
-<h2 id="_examples">EXAMPLES</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Assigning a local address to a socket</div>
-<div class="content">
-<pre><tt>/* Assign the in-process name "#1" */
-rc = zmq_bind(socket, "inproc://#1");
-assert (rc == 0);
-/* Assign the in-process name "my-endpoint" */
-rc = zmq_bind(socket, "inproc://my-endpoint");
-assert (rc == 0);</tt></pre>
-</div></div>
-<div class="listingblock">
-<div class="title">Connecting a socket</div>
-<div class="content">
-<pre><tt>/* Connect to the in-process name "#1" */
-rc = zmq_connect(socket, "inproc://#1");
-assert (rc == 0);
-/* Connect to the in-process name "my-endpoint" */
-rc = zmq_connect(socket, "inproc://my-endpoint");
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_bind.html">zmq_bind(3)</a>
-<a href="zmq_connect.html">zmq_connect(3)</a>
-<a href="zmq_ipc.html">zmq_ipc(7)</a>
-<a href="zmq_tcp.html">zmq_tcp(7)</a>
-<a href="zmq_pgm.html">zmq_pgm(7)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_inproc.txt b/doc/zmq_inproc.txt
index 2805f71..e68e14b 100644
--- a/doc/zmq_inproc.txt
+++ b/doc/zmq_inproc.txt
@@ -85,5 +85,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_ipc.7 b/doc/zmq_ipc.7
index 49d9e9e..0d20a4a 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_IPC" "7" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_IPC" "7" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -95,7 +95,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_ipc.html b/doc/zmq_ipc.html
deleted file mode 100644
index f300728..0000000
--- a/doc/zmq_ipc.html
+++ /dev/null
@@ -1,662 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_ipc(7)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_ipc(7) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_ipc -
- 0MQ local inter-process communication transport
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The inter-process transport passes messages between local processes using a
-system-dependent IPC mechanism.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">The inter-process transport is currently only implemented on operating
-systems that provide UNIX domain sockets.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_addressing">ADDRESSING</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A ØMQ address string consists of two parts as follows:
-<em>transport</em><tt>://</tt><em>endpoint</em>. The <em>transport</em> part specifies the underlying
-transport protocol to use, and for the inter-process transport shall be set to
-<tt>ipc</tt>. The meaning of the <em>endpoint</em> part for the inter-process transport is
-defined below.</p></div>
-<h3 id="_assigning_a_local_address_to_a_socket">Assigning a local address to a socket</h3><div style="clear:left"></div>
-<div class="paragraph"><p>When assigning a local address to a <em>socket</em> using <em>zmq_bind()</em> with the <em>ipc</em>
-transport, the <em>endpoint</em> shall be interpreted as an arbitrary string
-identifying the <em>pathname</em> to create. The <em>pathname</em> must be unique within the
-operating system namespace used by the <em>ipc</em> implementation, and must fulfill
-any restrictions placed by the operating system on the format and length of a
-<em>pathname</em>.</p></div>
-<h3 id="_connecting_a_socket">Connecting a socket</h3><div style="clear:left"></div>
-<div class="paragraph"><p>When connecting a <em>socket</em> to a peer address using <em>zmq_connect()</em> with the
-<em>ipc</em> transport, the <em>endpoint</em> shall be interpreted as an arbitrary string
-identifying the <em>pathname</em> to connect to. The <em>pathname</em> must have been
-previously created within the operating system namespace by assigning it to a
-<em>socket</em> with <em>zmq_bind()</em>.</p></div>
-</div>
-<h2 id="_wire_format">WIRE FORMAT</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Not applicable.</p></div>
-</div>
-<h2 id="_examples">EXAMPLES</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Assigning a local address to a socket</div>
-<div class="content">
-<pre><tt>/* Assign the pathname "/tmp/feeds/0" */
-rc = zmq_bind(socket, "ipc:///tmp/feeds/0");
-assert (rc == 0);</tt></pre>
-</div></div>
-<div class="listingblock">
-<div class="title">Connecting a socket</div>
-<div class="content">
-<pre><tt>/* Connect to the pathname "/tmp/feeds/0" */
-rc = zmq_connect(socket, "ipc:///tmp/feeds/0");
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_bind.html">zmq_bind(3)</a>
-<a href="zmq_connect.html">zmq_connect(3)</a>
-<a href="zmq_inproc.html">zmq_inproc(7)</a>
-<a href="zmq_tcp.html">zmq_tcp(7)</a>
-<a href="zmq_pgm.html">zmq_pgm(7)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_ipc.txt b/doc/zmq_ipc.txt
index 81f6747..974ad24 100644
--- a/doc/zmq_ipc.txt
+++ b/doc/zmq_ipc.txt
@@ -76,5 +76,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_msg_close.3 b/doc/zmq_msg_close.3
index 0361d6a..1e7cdae 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_MSG_CLOSE" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_MSG_CLOSE" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -64,7 +64,7 @@ No errors are defined\&.
\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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_msg_close.html b/doc/zmq_msg_close.html
deleted file mode 100644
index bc01ec2..0000000
--- a/doc/zmq_msg_close.html
+++ /dev/null
@@ -1,638 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_msg_close(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_msg_close(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_msg_close -
- release 0MQ message
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_msg_close (zmq_msg_t <em>*msg</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_close()</em> function shall inform the ØMQ infrastructure that any
-resources associated with the message object referenced by <em>msg</em> are no longer
-required and may be released. Actual release of resources associated with the
-message object shall be postponed by ØMQ until all users of the message or
-underlying data buffer have indicated it is no longer required.</p></div>
-<div class="paragraph"><p>Applications should ensure that <em>zmq_msg_close()</em> is called once a message is
-no longer required, otherwise memory leaks may occur.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">Never access <em>zmq_msg_t</em> members directly, instead always use the
-<em>zmq_msg</em> family of functions.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_close()</em> function shall return zero if successful. Otherwise
-it shall return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_msg_init.html">zmq_msg_init(3)</a>
-<a href="zmq_msg_init_size.html">zmq_msg_init_size(3)</a>
-<a href="zmq_msg_init_data.html">zmq_msg_init_data(3)</a>
-<a href="zmq_msg_data.html">zmq_msg_data(3)</a>
-<a href="zmq_msg_size.html">zmq_msg_size(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_msg_close.txt b/doc/zmq_msg_close.txt
index 1da353b..f72251a 100644
--- a/doc/zmq_msg_close.txt
+++ b/doc/zmq_msg_close.txt
@@ -50,5 +50,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_msg_copy.3 b/doc/zmq_msg_copy.3
index aa2d5d7..9fc0f7e 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_MSG_COPY" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_MSG_COPY" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -78,7 +78,7 @@ No errors are defined\&.
\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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_msg_copy.html b/doc/zmq_msg_copy.html
deleted file mode 100644
index 085c449..0000000
--- a/doc/zmq_msg_copy.html
+++ /dev/null
@@ -1,647 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_msg_copy(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_msg_copy(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_msg_copy -
- copy content of a message to another message
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_msg_copy (zmq_msg_t <em>*dest</em>, zmq_msg_t <em>*src</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_copy()</em> function shall copy the message object referenced by <em>src</em>
-to the message object referenced by <em>dest</em>. The original content of <em>dest</em>, if
-any, shall be released.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">The implementation may choose not to physically copy the message
-content, rather to share the underlying buffer between <em>src</em> and <em>dest</em>. Avoid
-modifying message content after a message has been copied with
-<em>zmq_msg_copy()</em>, doing so can result in undefined behaviour. If what you need
-is an actual hard copy, allocate a new message using <em>zmq_msg_init_size()</em> and
-copy the message content using <em>memcpy()</em>.</td>
-</tr></table>
-</div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">Never access <em>zmq_msg_t</em> members directly, instead always use the
-<em>zmq_msg</em> family of functions.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_copy()</em> function shall return zero if successful. Otherwise it
-shall return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_msg_move.html">zmq_msg_move(3)</a>
-<a href="zmq_msg_init.html">zmq_msg_init(3)</a>
-<a href="zmq_msg_init_size.html">zmq_msg_init_size(3)</a>
-<a href="zmq_msg_init_data.html">zmq_msg_init_data(3)</a>
-<a href="zmq_msg_close.html">zmq_msg_close(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_msg_copy.txt b/doc/zmq_msg_copy.txt
index f41a42e..d23dcdb 100644
--- a/doc/zmq_msg_copy.txt
+++ b/doc/zmq_msg_copy.txt
@@ -52,5 +52,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_msg_data.3 b/doc/zmq_msg_data.3
index b966299..a2d31a4 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_MSG_DATA" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_MSG_DATA" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -62,7 +62,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_msg_data.html b/doc/zmq_msg_data.html
deleted file mode 100644
index 9444a5f..0000000
--- a/doc/zmq_msg_data.html
+++ /dev/null
@@ -1,633 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_msg_data(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_msg_data(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_msg_data -
- retrieve pointer to message content
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>void *zmq_msg_data (zmq_msg_t <em>*msg</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_data()</em> function shall return a pointer to the message content of
-the message object referenced by <em>msg</em>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">Never access <em>zmq_msg_t</em> members directly, instead always use the
-<em>zmq_msg</em> family of functions.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Upon successful completion, <em>zmq_msg_data()</em> shall return a pointer to the
-message content.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_msg_size.html">zmq_msg_size(3)</a>
-<a href="zmq_msg_init.html">zmq_msg_init(3)</a>
-<a href="zmq_msg_init_size.html">zmq_msg_init_size(3)</a>
-<a href="zmq_msg_init_data.html">zmq_msg_init_data(3)</a>
-<a href="zmq_msg_close.html">zmq_msg_close(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_msg_data.txt b/doc/zmq_msg_data.txt
index dbf6612..36a3ce3 100644
--- a/doc/zmq_msg_data.txt
+++ b/doc/zmq_msg_data.txt
@@ -44,5 +44,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_msg_init.3 b/doc/zmq_msg_init.3
index bbbd50f..dc080dd 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_MSG_INIT" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_MSG_INIT" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -96,7 +96,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_msg_init.html b/doc/zmq_msg_init.html
deleted file mode 100644
index 4964c66..0000000
--- a/doc/zmq_msg_init.html
+++ /dev/null
@@ -1,656 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_msg_init(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_msg_init(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_msg_init -
- initialise empty 0MQ message
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_msg_init (zmq_msg_t <em>*msg</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_init()</em> function shall initialise the message object referenced by
-<em>msg</em> to represent an empty message. This function is most useful when called
-before receiving a message with <em>zmq_recv()</em>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">Never access <em>zmq_msg_t</em> members directly, instead always use the
-<em>zmq_msg</em> family of functions.</td>
-</tr></table>
-</div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">The functions <em>zmq_msg_init()</em>, <em>zmq_msg_init_data()</em> and
-<em>zmq_msg_init_size()</em> are mutually exclusive. Never initialize the same
-<em>zmq_msg_t</em> twice.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_init()</em> function shall return zero if successful. Otherwise it
-shall return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receiving a message from a socket</div>
-<div class="content">
-<pre><tt>zmq_msg_t msg;
-rc = zmq_msg_init (&amp;msg);
-assert (rc == 0);
-rc = zmq_recv (socket, &amp;msg, 0);
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_msg_init_size.html">zmq_msg_init_size(3)</a>
-<a href="zmq_msg_init_data.html">zmq_msg_init_data(3)</a>
-<a href="zmq_msg_close.html">zmq_msg_close(3)</a>
-<a href="zmq_msg_data.html">zmq_msg_data(3)</a>
-<a href="zmq_msg_size.html">zmq_msg_size(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_msg_init.txt b/doc/zmq_msg_init.txt
index d31dbae..1c2577d 100644
--- a/doc/zmq_msg_init.txt
+++ b/doc/zmq_msg_init.txt
@@ -61,5 +61,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_msg_init_data.3 b/doc/zmq_msg_init_data.3
index 928f84e..11f822d 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_MSG_INIT_DATA" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_MSG_INIT_DATA" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -108,7 +108,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_msg_init_data.html b/doc/zmq_msg_init_data.html
deleted file mode 100644
index 2d93dee..0000000
--- a/doc/zmq_msg_init_data.html
+++ /dev/null
@@ -1,669 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_msg_init_data(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_msg_init_data(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_msg_init_data -
- initialise 0MQ message from a supplied buffer
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>typedef void (zmq_free_fn) (void <em>*data</em>, void <em>*hint</em>);</strong></p></div>
-<div class="paragraph"><p><strong>int zmq_msg_init_data (zmq_msg_t <em>*msg</em>, void <em>*data</em>, size_t <em>size</em>, zmq_free_fn <em>*ffn</em>, void <em>*hint</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_init_data()</em> function shall initialise the message object
-referenced by <em>msg</em> to represent the content referenced by the buffer located
-at address <em>data</em>, <em>size</em> bytes long. No copy of <em>data</em> shall be performed and
-ØMQ shall take ownership of the supplied buffer.</p></div>
-<div class="paragraph"><p>If provided, the deallocation function <em>ffn</em> shall be called once the data
-buffer is no longer required by ØMQ, with the <em>data</em> and <em>hint</em> arguments
-supplied to <em>zmq_msg_init_data()</em>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">Never access <em>zmq_msg_t</em> members directly, instead always use the
-<em>zmq_msg</em> family of functions.</td>
-</tr></table>
-</div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">The functions <em>zmq_msg_init()</em>, <em>zmq_msg_init_data()</em> and
-<em>zmq_msg_init_size()</em> are mutually exclusive. Never initialize the same
-<em>zmq_msg_t</em> twice.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_init_data()</em> function shall return zero if successful. Otherwise
-it shall return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Initialising a message from a supplied buffer</div>
-<div class="content">
-<pre><tt>void my_free (void *data, void *hint)
-{
- free (data);
-}
-
- /* ... */
-
-void *data = malloc (6);
-assert (data);
-memcpy (data, "ABCDEF", 6);
-zmq_msg_t msg;
-rc = zmq_msg_init_data (&amp;msg, data, 6, my_free, NULL);
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_msg_init_size.html">zmq_msg_init_size(3)</a>
-<a href="zmq_msg_init.html">zmq_msg_init(3)</a>
-<a href="zmq_msg_close.html">zmq_msg_close(3)</a>
-<a href="zmq_msg_data.html">zmq_msg_data(3)</a>
-<a href="zmq_msg_size.html">zmq_msg_size(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_msg_init_data.txt b/doc/zmq_msg_init_data.txt
index 8378757..50f05c5 100644
--- a/doc/zmq_msg_init_data.txt
+++ b/doc/zmq_msg_init_data.txt
@@ -76,5 +76,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_msg_init_size.3 b/doc/zmq_msg_init_size.3
index 5290f90..2f7c494 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_MSG_INIT_SIZE" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_MSG_INIT_SIZE" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -83,7 +83,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_msg_init_size.html b/doc/zmq_msg_init_size.html
deleted file mode 100644
index 64ac76c..0000000
--- a/doc/zmq_msg_init_size.html
+++ /dev/null
@@ -1,656 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_msg_init_size(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_msg_init_size(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_msg_init_size -
- initialise 0MQ message of a specified size
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_msg_init_size (zmq_msg_t <em>*msg</em>, size_t <em>size</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_init_size()</em> function shall allocate any resources required to
-store a message <em>size</em> bytes long and initialise the message object referenced
-by <em>msg</em> to represent the newly allocated message.</p></div>
-<div class="paragraph"><p>The implementation shall choose whether to store message content on the stack
-(small messages) or on the heap (large messages). For performance reasons
-<em>zmq_msg_init_size()</em> shall not clear the message data.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">Never access <em>zmq_msg_t</em> members directly, instead always use the
-<em>zmq_msg</em> family of functions.</td>
-</tr></table>
-</div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">The functions <em>zmq_msg_init()</em>, <em>zmq_msg_init_data()</em> and
-<em>zmq_msg_init_size()</em> are mutually exclusive. Never initialize the same
-<em>zmq_msg_t</em> twice.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_init_size()</em> function shall return zero if successful. Otherwise
-it shall return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>ENOMEM</strong>
-</dt>
-<dd>
-<p>
-Insufficient storage space is available.
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_msg_init_data.html">zmq_msg_init_data(3)</a>
-<a href="zmq_msg_init.html">zmq_msg_init(3)</a>
-<a href="zmq_msg_close.html">zmq_msg_close(3)</a>
-<a href="zmq_msg_data.html">zmq_msg_data(3)</a>
-<a href="zmq_msg_size.html">zmq_msg_size(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_msg_init_size.txt b/doc/zmq_msg_init_size.txt
index b4ef393..9be6263 100644
--- a/doc/zmq_msg_init_size.txt
+++ b/doc/zmq_msg_init_size.txt
@@ -54,5 +54,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_msg_move.3 b/doc/zmq_msg_move.3
index 458bdd5..6a3f97c 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_MSG_MOVE" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_MSG_MOVE" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -62,7 +62,7 @@ No errors are defined\&.
\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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_msg_move.html b/doc/zmq_msg_move.html
deleted file mode 100644
index 1c8e155..0000000
--- a/doc/zmq_msg_move.html
+++ /dev/null
@@ -1,636 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_msg_move(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_msg_move(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_msg_move -
- move content of a message to another message
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_msg_move (zmq_msg_t <em>*dest</em>, zmq_msg_t <em>*src</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_move()</em> function shall move the content of the message object
-referenced by <em>src</em> to the message object referenced by <em>dest</em>. No actual
-copying of message content is performed, <em>dest</em> is simply updated to reference
-the new content. <em>src</em> becomes an empty message after calling <em>zmq_msg_move()</em>.
-The original content of <em>dest</em>, if any, shall be released.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">Never access <em>zmq_msg_t</em> members directly, instead always use the
-<em>zmq_msg</em> family of functions.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_move()</em> function shall return zero if successful. Otherwise it
-shall return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_msg_copy.html">zmq_msg_copy(3)</a>
-<a href="zmq_msg_init.html">zmq_msg_init(3)</a>
-<a href="zmq_msg_init_size.html">zmq_msg_init_size(3)</a>
-<a href="zmq_msg_init_data.html">zmq_msg_init_data(3)</a>
-<a href="zmq_msg_close.html">zmq_msg_close(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_msg_move.txt b/doc/zmq_msg_move.txt
index 75c8e74..5e4081b 100644
--- a/doc/zmq_msg_move.txt
+++ b/doc/zmq_msg_move.txt
@@ -47,5 +47,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_msg_size.3 b/doc/zmq_msg_size.3
index 0384e6b..627c084 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_MSG_SIZE" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_MSG_SIZE" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -62,7 +62,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_msg_size.html b/doc/zmq_msg_size.html
deleted file mode 100644
index 176e8ad..0000000
--- a/doc/zmq_msg_size.html
+++ /dev/null
@@ -1,633 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_msg_size(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_msg_size(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_msg_size -
- retrieve message content size in bytes
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>size_t zmq_msg_size (zmq_msg_t <em>*msg</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_msg_size()</em> function shall return the size in bytes of the content of
-the message object referenced by <em>msg</em>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">Never access <em>zmq_msg_t</em> members directly, instead always use the
-<em>zmq_msg</em> family of functions.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Upon successful completion, <em>zmq_msg_data()</em> shall return the size of the
-message content in bytes.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_msg_data.html">zmq_msg_data(3)</a>
-<a href="zmq_msg_init.html">zmq_msg_init(3)</a>
-<a href="zmq_msg_init_size.html">zmq_msg_init_size(3)</a>
-<a href="zmq_msg_init_data.html">zmq_msg_init_data(3)</a>
-<a href="zmq_msg_close.html">zmq_msg_close(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_msg_size.txt b/doc/zmq_msg_size.txt
index 05abfa6..dd11235 100644
--- a/doc/zmq_msg_size.txt
+++ b/doc/zmq_msg_size.txt
@@ -44,5 +44,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_pgm.7 b/doc/zmq_pgm.7
index 9135e1c..06cc456 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_PGM" "7" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_PGM" "7" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -38,7 +38,7 @@ PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport
.sp
The \fIpgm\fR and \fIepgm\fR transports can only be used with the \fIZMQ_PUB\fR and \fIZMQ_SUB\fR socket types\&.
.sp
-Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loopback interface\&. For details, refer to the \fIZMQ_RATE\fR, \fIZMQ_RECOVERY_IVL\fR and \fIZMQ_MCAST_LOOP\fR options documented in \fBzmq_setsockopt\fR(3)\&.
+Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loop\-back interface\&. For details, refer to the \fIZMQ_RATE\fR, \fIZMQ_RECOVERY_IVL\fR and \fIZMQ_MCAST_LOOP\fR options documented in \fBzmq_setsockopt\fR(3)\&.
.if n \{\
.sp
.\}
@@ -105,7 +105,7 @@ Interface names are not standardised in any way and should be assumed to be arbi
A \fImulticast address\fR is specified by an IPv4 multicast address in it\(cqs numeric representation\&.
.SH "WIRE FORMAT"
.sp
-Consecutive PGM datagrams are interpreted by 0MQ as a single continous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams\&. This stream of data consists of 0MQ messages encapsulated in \fIframes\fR as described in \fBzmq_tcp\fR(7)\&.
+Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams\&. This stream of data consists of 0MQ messages encapsulated in \fIframes\fR as described in \fBzmq_tcp\fR(7)\&.
.SS "PGM datagram payload"
.sp
The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ:
@@ -174,7 +174,7 @@ Third datagram payload
.\}
.nf
/* Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, */
-/* using the first ethernet network interface on Linux */
+/* using the first Ethernet network interface on Linux */
/* and the Encapsulated PGM protocol */
rc = zmq_connect(socket, "epgm://eth0;239\&.192\&.1\&.1:5555");
assert (rc == 0);
@@ -193,7 +193,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_pgm.html b/doc/zmq_pgm.html
deleted file mode 100644
index 06a1b70..0000000
--- a/doc/zmq_pgm.html
+++ /dev/null
@@ -1,745 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_pgm(7)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_pgm(7) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_pgm -
- 0MQ reliable multicast transport using PGM
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>PGM (Pragmatic General Multicast) is a protocol for reliable multicast
-transport of data over IP networks.</p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ØMQ implements two variants of PGM, the standard protocol where PGM datagrams
-are layered directly on top of IP datagrams as defined by RFC 3208 (the <em>pgm</em>
-transport) and "Encapsulated PGM" where PGM datagrams are encapsulated inside
-UDP datagrams (the <em>epgm</em> transport).</p></div>
-<div class="paragraph"><p>The <em>pgm</em> and <em>epgm</em> transports can only be used with the <em>ZMQ_PUB</em> and
-<em>ZMQ_SUB</em> socket types.</p></div>
-<div class="paragraph"><p>Further, PGM sockets are rate limited by default and incur a performance
-penalty when used over a loopback interface. For details, refer to the
-<em>ZMQ_RATE</em>, <em>ZMQ_RECOVERY_IVL</em> and <em>ZMQ_MCAST_LOOP</em> options documented in
-<a href="zmq_setsockopt.html">zmq_setsockopt(3)</a>.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">The <em>pgm</em> transport implementation requires access to raw IP sockets.
-Additional privileges may be required on some operating systems for this
-operation. Applications not requiring direct interoperability with other PGM
-implementations are encouraged to use the <em>epgm</em> transport instead which does
-not require any special privileges.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_addressing">ADDRESSING</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A ØMQ address string consists of two parts as follows:
-<em>transport</em><tt>://</tt><em>endpoint</em>. The <em>transport</em> part specifies the underlying
-transport protocol to use. For the standard PGM protocol, <em>transport</em> shall be
-set to <tt>pgm</tt>. For the "Encapsulated PGM" protocol <em>transport</em> shall be set to
-<tt>epgm</tt>. The meaning of the <em>endpoint</em> part for both the <em>pgm</em> and <em>epgm</em>
-transport is defined below.</p></div>
-<h3 id="_connecting_a_socket">Connecting a socket</h3><div style="clear:left"></div>
-<div class="paragraph"><p>When connecting a socket to a peer address using <em>zmq_connect()</em> with the <em>pgm</em>
-or <em>epgm</em> transport, the <em>endpoint</em> shall be interpreted as an <em>interface</em>
-followed by a semicolon, followed by a <em>multicast address</em>, followed by a colon
-and a port number.</p></div>
-<div class="paragraph"><p>An <em>interface</em> may be specified by either of the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The interface name as defined by the operating system.
-</p>
-</li>
-<li>
-<p>
-The primary IPv4 address assigned to the interface, in it&#8217;s numeric
- representation.
-</p>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Interface names are not standardised in any way and should be assumed to
-be arbitrary and platform dependent. On Win32 platforms no short interface
-names exist, thus only the primary IPv4 address may be used to specify an
-<em>interface</em>.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>A <em>multicast address</em> is specified by an IPv4 multicast address in it&#8217;s numeric
-representation.</p></div>
-</div>
-<h2 id="_wire_format">WIRE FORMAT</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Consecutive PGM datagrams are interpreted by ØMQ as a single continous stream
-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 <em>frames</em> as described in
-<a href="zmq_tcp.html">zmq_tcp(7)</a>.</p></div>
-<h3 id="_pgm_datagram_payload">PGM datagram payload</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The following ABNF grammar represents the payload of a single PGM datagram as
-used by ØMQ:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt>datagram = (offset data)
-offset = 2OCTET
-data = *OCTET</tt></pre>
-</div></div>
-<div class="paragraph"><p>In order for late joining consumers to be able to identify message boundaries,
-each PGM datagram payload starts with a 16-bit unsigned integer in network byte
-order specifying either the offset of the first message <em>frame</em> in the datagram
-or containing the value <tt>0xFFFF</tt> if the datagram contains solely an
-intermediate part of a larger message.</p></div>
-<div class="paragraph"><p>The following diagram illustrates the layout of a single PGM datagram payload:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt>+------------------+----------------------+
-| offset (16 bits) | data |
-+------------------+----------------------+</tt></pre>
-</div></div>
-<div class="paragraph"><p>The following diagram further illustrates how three example ØMQ frames are laid
-out in consecutive PGM datagram payloads:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt>First datagram payload
-+--------------+-------------+---------------------+
-| Frame offset | Frame 1 | Frame 2, part 1 |
-| 0x0000 | (Message 1) | (Message 2, part 1) |
-+--------------+-------------+---------------------+
-
-Second datagram payload
-+--------------+---------------------+
-| Frame offset | Frame 2, part 2 |
-| 0xFFFF | (Message 2, part 2) |
-+--------------+---------------------+
-
-Third datagram payload
-+--------------+----------------------------+-------------+
-| Frame offset | Frame 2, final 8 bytes | Frame 3 |
-| 0x0008 | (Message 2, final 8 bytes) | (Message 3) |
-+--------------+----------------------------+-------------+</tt></pre>
-</div></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Connecting a socket</div>
-<div class="content">
-<pre><tt>/* Connecting to the multicast address 239.192.1.1, port 5555, */
-/* using the first ethernet network interface on Linux */
-/* and the Encapsulated PGM protocol */
-rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555");
-assert (rc == 0);
-/* Connecting to the multicast address 239.192.1.1, port 5555, */
-/* using the network interface with the address 192.168.1.1 */
-/* and the standard PGM protocol */
-rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555");
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_connect.html">zmq_connect(3)</a>
-<a href="zmq_setsockopt.html">zmq_setsockopt(3)</a>
-<a href="zmq_tcp.html">zmq_tcp(7)</a>
-<a href="zmq_ipc.html">zmq_ipc(7)</a>
-<a href="zmq_inproc.html">zmq_inproc(7)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_pgm.txt b/doc/zmq_pgm.txt
index 4017db2..72ae24f 100644
--- a/doc/zmq_pgm.txt
+++ b/doc/zmq_pgm.txt
@@ -24,7 +24,7 @@ The 'pgm' and 'epgm' transports can only be used with the 'ZMQ_PUB' and
'ZMQ_SUB' socket types.
Further, PGM sockets are rate limited by default and incur a performance
-penalty when used over a loopback interface. For details, refer to the
+penalty when used over a loop-back interface. For details, refer to the
'ZMQ_RATE', 'ZMQ_RECOVERY_IVL' and 'ZMQ_MCAST_LOOP' options documented in
linkzmq:zmq_setsockopt[3].
@@ -69,7 +69,7 @@ representation.
WIRE FORMAT
-----------
-Consecutive PGM datagrams are interpreted by 0MQ as a single continous stream
+Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream
of data where 0MQ messages are not necessarily aligned with PGM datagram
boundaries and a single 0MQ message may span several PGM datagrams. This stream
of data consists of 0MQ messages encapsulated in 'frames' as described in
@@ -130,7 +130,7 @@ EXAMPLE
.Connecting a socket
----
/* Connecting to the multicast address 239.192.1.1, port 5555, */
-/* using the first ethernet network interface on Linux */
+/* using the first Ethernet network interface on Linux */
/* and the Encapsulated PGM protocol */
rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555");
assert (rc == 0);
@@ -153,5 +153,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_poll.3 b/doc/zmq_poll.3
index 3f12c3b..a5d005c 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_POLL" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_POLL" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -70,11 +70,11 @@ All 0MQ sockets passed to the \fIzmq_poll()\fR function must share the same 0MQ
.sp .5v
.RE
.sp
-For each \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall first clear the \fIrevents\fR member, and then indicate any requested events that have occured by setting the bit corresponding to the event condition in the \fIrevents\fR member\&.
+For each \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall first clear the \fIrevents\fR member, and then indicate any requested events that have occurred by setting the bit corresponding to the event condition in the \fIrevents\fR member\&.
.sp
-If none of the requested events have occured on any \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall wait up to \fItimeout\fR microseconds for an event to occur on any of the requested items\&. If the value of \fItimeout\fR is 0, \fIzmq_poll()\fR shall return immediately\&. If the value of \fItimeout\fR is \-1, \fIzmq_poll()\fR shall block indefinitely until a requested event has occured on at least one \fBzmq_pollitem_t\fR\&.
+If none of the requested events have occurred on any \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall wait \fItimeout\fR microseconds for an event to occur on any of the requested items\&. If the value of \fItimeout\fR is 0, \fIzmq_poll()\fR shall return immediately\&. If the value of \fItimeout\fR is \-1, \fIzmq_poll()\fR shall block indefinitely until a requested event has occurred on at least one \fBzmq_pollitem_t\fR\&.
.sp
-The \fIevents\fR and \fIrevents\fR members of \fBzmq_pollitem_t\fR are bitmasks constructed by OR\(cqing a combination of the following event flags:
+The \fIevents\fR and \fIrevents\fR members of \fBzmq_pollitem_t\fR are bit masks constructed by OR\(cqing a combination of the following event flags:
.PP
\fBZMQ_POLLIN\fR
.RS 4
@@ -134,33 +134,8 @@ The \fIzmq_poll()\fR function may be implemented or emulated using operating sys
.SH "RETURN VALUE"
.sp
Upon successful completion, the \fIzmq_poll()\fR function shall return the number of \fBzmq_pollitem_t\fR structures with events signaled in \fIrevents\fR or 0 if no events have been signaled\&. Upon failure, \fIzmq_poll()\fR shall return \-1 and set \fIerrno\fR to one of the values defined below\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBImportant\fR
-.ps -1
-.br
-.sp
-The \fIzmq_poll()\fR function may return \fBbefore\fR the \fItimeout\fR period has expired even if no events have been signaled\&.
-.sp .5v
-.RE
.SH "ERRORS"
.PP
-\fBEFAULT\fR
-.RS 4
-At least one of the members of the
-\fIitems\fR
-array refers to a
-\fIsocket\fR
-belonging to a different application thread\&.
-.RE
-.PP
\fBETERM\fR
.RS 4
At least one of the members of the
@@ -178,6 +153,11 @@ The provided
\fIitems\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBEINTR\fR
+.RS 4
+The operation was interrupted by delivery of a signal before any events were available\&.
+.RE
.SH "EXAMPLE"
.PP
\fBPolling indefinitely for input events on both a 0MQ socket and a standard socket.\fR.
@@ -210,7 +190,7 @@ assert (rc >= 0);
Your operating system documentation for the \fIpoll()\fR system call\&.
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_poll.html b/doc/zmq_poll.html
deleted file mode 100644
index 43882b1..0000000
--- a/doc/zmq_poll.html
+++ /dev/null
@@ -1,764 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_poll(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_poll(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_poll -
- input/output multiplexing
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_poll (zmq_pollitem_t <em>*items</em>, int <em>nitems</em>, long <em>timeout</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_poll()</em> function provides a mechanism for applications to multiplex
-input/output events in a level-triggered fashion over a set of sockets. Each
-member of the array pointed to by the <em>items</em> argument is a <strong>zmq_pollitem_t</strong>
-structure. The <em>nitems</em> argument specifies the number of items in the <em>items</em>
-array. The <strong>zmq_pollitem_t</strong> structure is defined as follows:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt>typedef struct
-{
- void <em>*socket</em>;
- int <em>fd</em>;
- short <em>events</em>;
- short <em>revents</em>;
-} zmq_pollitem_t;</tt></pre>
-</div></div>
-<div class="paragraph"><p>For each <strong>zmq_pollitem_t</strong> item, <em>zmq_poll()</em> shall examine either the ØMQ
-socket referenced by <em>socket</em> <strong>or</strong> the standard socket specified by the file
-descriptor <em>fd</em>, for the event(s) specified in <em>events</em>. If both <em>socket</em> and
-<em>fd</em> are set in a single <strong>zmq_pollitem_t</strong>, the ØMQ socket referenced by
-<em>socket</em> shall take precedence and the value of <em>fd</em> shall be ignored.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">All ØMQ sockets passed to the <em>zmq_poll()</em> function must share the
-same ØMQ <em>context</em> and must belong to the thread calling <em>zmq_poll()</em>.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>For each <strong>zmq_pollitem_t</strong> item, <em>zmq_poll()</em> shall first clear the <em>revents</em>
-member, and then indicate any requested events that have occured by setting the
-bit corresponding to the event condition in the <em>revents</em> member.</p></div>
-<div class="paragraph"><p>If none of the requested events have occured on any <strong>zmq_pollitem_t</strong> item,
-<em>zmq_poll()</em> shall wait up to <em>timeout</em> microseconds for an event to occur on
-any of the requested items. If the value of <em>timeout</em> is <tt>0</tt>, <em>zmq_poll()</em>
-shall return immediately. If the value of <em>timeout</em> is <tt>-1</tt>, <em>zmq_poll()</em> shall
-block indefinitely until a requested event has occured on at least one
-<strong>zmq_pollitem_t</strong>.</p></div>
-<div class="paragraph"><p>The <em>events</em> and <em>revents</em> members of <strong>zmq_pollitem_t</strong> are bitmasks constructed
-by OR&#8217;ing a combination of the following event flags:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>ZMQ_POLLIN</strong>
-</dt>
-<dd>
-<p>
-For ØMQ sockets, at least one message may be received from the <em>socket</em> without
-blocking. For standard sockets this is equivalent to the <em>POLLIN</em> flag of the
-<em>poll()</em> system call and generally means that at least one byte of data may be
-read from <em>fd</em> without blocking.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ZMQ_POLLOUT</strong>
-</dt>
-<dd>
-<p>
-For ØMQ sockets, at least one message may be sent to the <em>socket</em> without
-blocking. For standard sockets this is equivalent to the <em>POLLOUT</em> flag of the
-<em>poll()</em> system call and generally means that at least one byte of data may be
-written to <em>fd</em> without blocking.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ZMQ_POLLERR</strong>
-</dt>
-<dd>
-<p>
-For standard sockets, this flag is passed through <em>zmq_poll()</em> to the
-underlying <em>poll()</em> system call and generally means that some sort of error
-condition is present on the socket specified by <em>fd</em>. For ØMQ sockets this flag
-has no effect if set in <em>events</em>, and shall never be returned in <em>revents</em> by
-<em>zmq_poll()</em>.
-</p>
-</dd>
-</dl></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">The <em>zmq_poll()</em> function may be implemented or emulated using operating
-system interfaces other than <em>poll()</em>, and as such may be subject to the limits
-of those interfaces in ways not defined in this documentation.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Upon successful completion, the <em>zmq_poll()</em> function shall return the number
-of <strong>zmq_pollitem_t</strong> structures with events signaled in <em>revents</em> or <tt>0</tt> if no
-events have been signaled. Upon failure, <em>zmq_poll()</em> shall return <tt>-1</tt> and set
-<em>errno</em> to one of the values defined below.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Important</div>
-</td>
-<td class="content">The <em>zmq_poll()</em> function may return <strong>before</strong> the <em>timeout</em> period
-has expired even if no events have been signaled.</td>
-</tr></table>
-</div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-At least one of the members of the <em>items</em> array refers to a <em>socket</em> belonging
-to a different application thread.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ETERM</strong>
-</dt>
-<dd>
-<p>
-At least one of the members of the <em>items</em> array refers to a <em>socket</em> whose
-associated ØMQ <em>context</em> was terminated.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>items</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Polling indefinitely for input events on both a ØMQ socket and a standard socket.</div>
-<div class="content">
-<pre><tt>zmq_pollitem_t items [2];
-/* First item refers to 0MQ socket 'socket' */
-items[0].socket = socket;
-items[0].events = ZMQ_POLLIN;
-/* Second item refers to standard socket 'fd' */
-items[1].socket = NULL;
-items[1].fd = fd;
-items[1].events = ZMQ_POLLIN;
-/* Poll for events indefinitely */
-int rc = zmq_poll (items, 2, -1);
-assert (rc &gt;= 0);
-/* Returned events will be stored in items[].revents */</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_socket.html">zmq_socket(3)</a>
-<a href="zmq_send.html">zmq_send(3)</a>
-<a href="zmq_recv.html">zmq_recv(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-<div class="paragraph"><p>Your operating system documentation for the <em>poll()</em> system call.</p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:40:36 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_poll.txt b/doc/zmq_poll.txt
index fe2a209..26d7dac 100644
--- a/doc/zmq_poll.txt
+++ b/doc/zmq_poll.txt
@@ -40,17 +40,17 @@ NOTE: All 0MQ sockets passed to the _zmq_poll()_ function must share the
same 0MQ 'context' and must belong to the thread calling _zmq_poll()_.
For each *zmq_pollitem_t* item, _zmq_poll()_ shall first clear the 'revents'
-member, and then indicate any requested events that have occured by setting the
+member, and then indicate any requested events that have occurred by setting the
bit corresponding to the event condition in the 'revents' member.
-If none of the requested events have occured on any *zmq_pollitem_t* item,
-_zmq_poll()_ shall wait up to 'timeout' microseconds for an event to occur on
+If none of the requested events have occurred on any *zmq_pollitem_t* item,
+_zmq_poll()_ shall wait 'timeout' microseconds for an event to occur on
any of the requested items. If the value of 'timeout' is `0`, _zmq_poll()_
shall return immediately. If the value of 'timeout' is `-1`, _zmq_poll()_ shall
-block indefinitely until a requested event has occured on at least one
+block indefinitely until a requested event has occurred on at least one
*zmq_pollitem_t*.
-The 'events' and 'revents' members of *zmq_pollitem_t* are bitmasks constructed
+The 'events' and 'revents' members of *zmq_pollitem_t* are bit masks constructed
by OR'ing a combination of the following event flags:
*ZMQ_POLLIN*::
@@ -84,20 +84,17 @@ of *zmq_pollitem_t* structures with events signaled in 'revents' or `0` if no
events have been signaled. Upon failure, _zmq_poll()_ shall return `-1` and set
'errno' to one of the values defined below.
-IMPORTANT: The _zmq_poll()_ function may return *before* the 'timeout' period
-has expired even if no events have been signaled.
-
ERRORS
------
-*EFAULT*::
-At least one of the members of the 'items' array refers to a 'socket' belonging
-to a different application thread.
*ETERM*::
At least one of the members of the 'items' array refers to a 'socket' whose
associated 0MQ 'context' was terminated.
*EFAULT*::
The provided 'items' was not valid (NULL).
+*EINTR*::
+The operation was interrupted by delivery of a signal before any events were
+available.
EXAMPLE
@@ -131,5 +128,5 @@ Your operating system documentation for the _poll()_ system call.
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_queue.1 b/doc/zmq_queue.1
deleted file mode 100644
index 24f54ca..0000000
--- a/doc/zmq_queue.1
+++ /dev/null
@@ -1,57 +0,0 @@
-'\" t
-.\" Title: zmq_queue
-.\" Author: [see the "AUTHORS" section]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
-.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
-.\" Language: English
-.\"
-.TH "ZMQ_QUEUE" "1" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-zmq_queue \- forwarding device for request\-reply messaging
-.SH "SYNOPSIS"
-.sp
-To be written\&.
-.SH "DESCRIPTION"
-.sp
-To be written\&.
-.SH "OPTIONS"
-.sp
-To be written\&.
-.SH "SEE ALSO"
-.sp
-\fBzmq\fR(7)
-.SH "AUTHORS"
-.sp
-The 0MQ documentation 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
diff --git a/doc/zmq_queue.html b/doc/zmq_queue.html
deleted file mode 100644
index c737eb8..0000000
--- a/doc/zmq_queue.html
+++ /dev/null
@@ -1,613 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_queue(1)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_queue(1) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_queue -
- forwarding device for request-reply messaging
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To be written.</p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To be written.</p></div>
-</div>
-<h2 id="_options">OPTIONS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To be written.</p></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_queue.txt b/doc/zmq_queue.txt
deleted file mode 100644
index a3f84f2..0000000
--- a/doc/zmq_queue.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-zmq_queue(1)
-============
-
-
-NAME
-----
-zmq_queue - forwarding device for request-reply messaging
-
-
-SYNOPSIS
---------
-To be written.
-
-
-DESCRIPTION
------------
-To be written.
-
-
-OPTIONS
--------
-To be written.
-
-
-SEE ALSO
---------
-linkzmq:zmq[7]
-
-
-AUTHORS
--------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
-Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_recv.3 b/doc/zmq_recv.3
index 2a62efd..970d1ba 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_RECV" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_RECV" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -95,6 +95,11 @@ The provided
\fIsocket\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBEINTR\fR
+.RS 4
+The operation was interrupted by delivery of a signal before a message was available\&.
+.RE
.SH "EXAMPLE"
.PP
\fBReceiving a message from a socket\fR.
@@ -148,7 +153,7 @@ do {
\fBzmq_send\fR(3) \fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_recv.html b/doc/zmq_recv.html
deleted file mode 100644
index 16e5461..0000000
--- a/doc/zmq_recv.html
+++ /dev/null
@@ -1,729 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_recv(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_recv(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_recv -
- receive a message from a socket
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_recv (void <em>*socket</em>, zmq_msg_t <em>*msg</em>, int <em>flags</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_recv()</em> function shall receive a message from the socket referenced by
-the <em>socket</em> argument and store it in the message referenced by the <em>msg</em>
-argument. Any content previously stored in <em>msg</em> shall be properly deallocated.
-If there are no messages available on the specified <em>socket</em> the <em>zmq_recv()</em>
-function shall block until the request can be satisfied. The <em>flags</em> argument
-is a combination of the flags defined below:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>ZMQ_NOBLOCK</strong>
-</dt>
-<dd>
-<p>
-Specifies that the operation should be performed in non-blocking mode. If there
-are no messages available on the specified <em>socket</em>, the <em>zmq_recv()</em> function
-shall fail with <em>errno</em> set to EAGAIN.
-</p>
-</dd>
-</dl></div>
-<h3 id="_multi_part_messages">Multi-part messages</h3><div style="clear:left"></div>
-<div class="paragraph"><p>A ØMQ message is composed of 1 or more message parts; each message part is an
-independent <em>zmq_msg_t</em> in its own right. ØMQ ensures atomic delivery of
-messages; peers shall receive either all <em>message parts</em> of a message or none
-at all.</p></div>
-<div class="paragraph"><p>The total number of message parts is unlimited.</p></div>
-<div class="paragraph"><p>An application wishing to determine if a message is composed of multiple parts
-does so by retrieving the value of the <em>ZMQ_RCVMORE</em> socket option on the
-<em>socket</em> it is receiving the message from. If there are no message parts to
-follow, or if the message is not composed of multiple parts, <em>ZMQ_RCVMORE</em>
-shall report a value of zero. Otherwise, <em>ZMQ_RCVMORE</em> shall report a value of
-1, indicating that more message parts are to follow.</p></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_recv()</em> function shall return zero if successful. Otherwise it shall
-return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EAGAIN</strong>
-</dt>
-<dd>
-<p>
-Non-blocking mode was requested and no messages are available at the moment.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ENOTSUP</strong>
-</dt>
-<dd>
-<p>
-The <em>zmq_recv()</em> operation is not supported by this socket type.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFSM</strong>
-</dt>
-<dd>
-<p>
-The <em>zmq_recv()</em> operation cannot be performed on this socket at the moment due
-to the socket not being in the appropriate state. This error may occur with
-socket types that switch between several states, such as ZMQ_REP. See the
-<em>messaging patterns</em> section of <a href="zmq_socket.html">zmq_socket(3)</a> for more information.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ETERM</strong>
-</dt>
-<dd>
-<p>
-The ØMQ <em>context</em> associated with the specified <em>socket</em> was terminated.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>socket</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receiving a message from a socket</div>
-<div class="content">
-<pre><tt>/* Create an empty 0MQ message */
-zmq_msg_t msg;
-int rc = zmq_msg_init (&amp;msg);
-assert (rc == 0);
-/* Block until a message is available to be received from socket */
-rc = zmq_recv (socket, &amp;msg, 0);
-assert (rc == 0);
-/* Release message */
-zmq_msg_close (&amp;msg);</tt></pre>
-</div></div>
-<div class="listingblock">
-<div class="title">Receiving a multi-part message</div>
-<div class="content">
-<pre><tt>int64_t more;
-size_t more_size = sizeof more;
-do {
- /* Create an empty 0MQ message to hold the message part */
- zmq_msg_t part;
- int rc = zmq_msg_init (&amp;part);
- assert (rc == 0);
- /* Block until a message is available to be received from socket */
- rc = zmq_recv (socket, &amp;part, 0);
- assert (rc == 0);
- /* Determine if more message parts are to follow */
- rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &amp;more, &amp;more_size);
- assert (rc == 0);
- zmq_msg_close (&amp;part);
-} while (more);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_send.html">zmq_send(3)</a>
-<a href="zmq_getsockopt.html">zmq_getsockopt(3)</a>
-<a href="zmq_socket.html">zmq_socket(7)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:40:36 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_recv.txt b/doc/zmq_recv.txt
index dc60af6..1e6e65d 100644
--- a/doc/zmq_recv.txt
+++ b/doc/zmq_recv.txt
@@ -65,6 +65,9 @@ _messaging patterns_ section of linkzmq:zmq_socket[3] for more information.
The 0MQ 'context' associated with the specified 'socket' was terminated.
*EFAULT*::
The provided 'socket' was not valid (NULL).
+*EINTR*::
+The operation was interrupted by delivery of a signal before a message was
+available.
EXAMPLE
@@ -112,5 +115,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_send.3 b/doc/zmq_send.3
index 268911f..039d5f1 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_SEND" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_SEND" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -113,9 +113,14 @@ was terminated\&.
\fBEFAULT\fR
.RS 4
The provided
-\fIcontext\fR
+\fIsocket\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBEINTR\fR
+.RS 4
+The operation was interrupted by delivery of a signal before the message was sent\&.
+.RE
.SH "EXAMPLE"
.PP
\fBFilling in a message and sending it to a socket\fR.
@@ -159,7 +164,7 @@ rc = zmq_send (socket, &part3, 0);
\fBzmq_recv\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_send.html b/doc/zmq_send.html
deleted file mode 100644
index 1e94c89..0000000
--- a/doc/zmq_send.html
+++ /dev/null
@@ -1,735 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_send(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_send(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_send -
- send a message on a socket
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_send (void <em>*socket</em>, zmq_msg_t <em>*msg</em>, int <em>flags</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_send()</em> function shall queue the message referenced by the <em>msg</em>
-argument to be sent to the socket referenced by the <em>socket</em> argument. The
-<em>flags</em> argument is a combination of the flags defined below:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>ZMQ_NOBLOCK</strong>
-</dt>
-<dd>
-<p>
-Specifies that the operation should be performed in non-blocking mode. If the
-message cannot be queued on the <em>socket</em>, the <em>zmq_send()</em> function shall fail
-with <em>errno</em> set to EAGAIN.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ZMQ_SNDMORE</strong>
-</dt>
-<dd>
-<p>
-Specifies that the message being sent is a multi-part message, and that further
-message parts are to follow. Refer to the section regarding multi-part messages
-below for a detailed description.
-</p>
-</dd>
-</dl></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">A successful invocation of <em>zmq_send()</em> does not indicate that the
-message has been transmitted to the network, only that it has been queued on
-the <em>socket</em> and ØMQ has assumed responsibility for the message.</td>
-</tr></table>
-</div>
-<h3 id="_multi_part_messages">Multi-part messages</h3><div style="clear:left"></div>
-<div class="paragraph"><p>A ØMQ message is composed of 1 or more message parts; each message part is an
-independent <em>zmq_msg_t</em> in its own right. ØMQ ensures atomic delivery of
-messages; peers shall receive either all <em>message parts</em> of a message or none
-at all.</p></div>
-<div class="paragraph"><p>The total number of message parts is unlimited.</p></div>
-<div class="paragraph"><p>An application wishing to send a multi-part message does so by specifying the
-<em>ZMQ_SNDMORE</em> flag to <em>zmq_send()</em>. The presence of this flag indicates to ØMQ
-that the message being sent is a multi-part message and that more message parts
-are to follow. When the application wishes to send the final message part it
-does so by calling <em>zmq_send()</em> without the <em>ZMQ_SNDMORE</em> flag; this indicates
-that no more message parts are to follow.</p></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_send()</em> function shall return zero if successful. Otherwise it shall
-return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EAGAIN</strong>
-</dt>
-<dd>
-<p>
-Non-blocking mode was requested and the message cannot be sent at the moment.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ENOTSUP</strong>
-</dt>
-<dd>
-<p>
-The <em>zmq_send()</em> operation is not supported by this socket type.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFSM</strong>
-</dt>
-<dd>
-<p>
-The <em>zmq_send()</em> operation cannot be performed on this socket at the moment due
-to the socket not being in the appropriate state. This error may occur with
-socket types that switch between several states, such as ZMQ_REP. See the
-<em>messaging patterns</em> section of <a href="zmq_socket.html">zmq_socket(3)</a> for more information.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ETERM</strong>
-</dt>
-<dd>
-<p>
-The ØMQ <em>context</em> associated with the specified <em>socket</em> was terminated.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>context</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Filling in a message and sending it to a socket</div>
-<div class="content">
-<pre><tt>/* Create a new message, allocating 6 bytes for message content */
-zmq_msg_t msg;
-int rc = zmq_msg_init_size (&amp;msg, 6);
-assert (rc == 0);
-/* Fill in message content with 'AAAAAA' */
-memset (zmq_msg_data (&amp;msg), 'A', 6);
-/* Send the message to the socket */
-rc = zmq_send (socket, &amp;msg, 0);
-assert (rc == 0);</tt></pre>
-</div></div>
-<div class="listingblock">
-<div class="title">Sending a multi-part message</div>
-<div class="content">
-<pre><tt>/* Send a multi-part message consisting of three parts to socket */
-rc = zmq_send (socket, &amp;part1, ZMQ_SNDMORE);
-rc = zmq_send (socket, &amp;part2, ZMQ_SNDMORE);
-/* Final part; no more parts to follow */
-rc = zmq_send (socket, &amp;part3, 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_recv.html">zmq_recv(3)</a>
-<a href="zmq_socket.html">zmq_socket(7)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:40:36 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_send.txt b/doc/zmq_send.txt
index 793d1a8..87b3a3f 100644
--- a/doc/zmq_send.txt
+++ b/doc/zmq_send.txt
@@ -70,7 +70,10 @@ _messaging patterns_ section of linkzmq:zmq_socket[3] for more information.
*ETERM*::
The 0MQ 'context' associated with the specified 'socket' was terminated.
*EFAULT*::
-The provided 'context' was not valid (NULL).
+The provided 'socket' was not valid (NULL).
+*EINTR*::
+The operation was interrupted by delivery of a signal before the message was
+sent.
EXAMPLE
@@ -107,5 +110,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_setsockopt.3 b/doc/zmq_setsockopt.3
index c6d0e96..094e946 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/20/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_SETSOCKOPT" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_SETSOCKOPT" "3" "03/20/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -32,6 +32,8 @@ zmq_setsockopt \- set 0MQ socket options
.SH "SYNOPSIS"
.sp
\fBint zmq_setsockopt (void \fR\fB\fI*socket\fR\fR\fB, int \fR\fB\fIoption_name\fR\fR\fB, const void \fR\fB\fI*option_value\fR\fR\fB, size_t \fR\fB\fIoption_len\fR\fR\fB);\fR
+.sp
+Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE and ZMQ_LINGER, only take effect for subsequent socket bind/connects\&.
.SH "DESCRIPTION"
.sp
The \fIzmq_setsockopt()\fR function shall set the option specified by the \fIoption_name\fR argument to the value pointed to by the \fIoption_value\fR argument for the 0MQ socket pointed to by the \fIsocket\fR argument\&. The \fIoption_len\fR argument is the size of the option value in bytes\&.
@@ -166,7 +168,7 @@ T}
.sp 1
.SS "ZMQ_IDENTITY: Set socket identity"
.sp
-The \fIZMQ_IDENTITY\fR option shall set the identity of the specified \fIsocket\fR\&. Socket identity determines if existing 0MQ infastructure (\fImessage queues\fR, \fIforwarding devices\fR) shall be identified with a specific application and persist across multiple runs of the application\&.
+The \fIZMQ_IDENTITY\fR option shall set the identity of the specified \fIsocket\fR\&. Socket identity determines if existing 0MQ infrastructure (\fImessage queues\fR, \fIforwarding devices\fR) shall be identified with a specific application and persist across multiple runs of the application\&.
.sp
If the socket has no identity, each run of an application is completely separate from other runs\&. However, with identity set the socket shall re\-use any existing 0MQ infrastructure configured by the previous run(s)\&. Thus the application may receive messages that were sent in the meantime, \fImessage queue\fR limits shall be shared with previous run(s) and so on\&.
.sp
@@ -211,7 +213,7 @@ T}
.sp
The \fIZMQ_SUBSCRIBE\fR option shall establish a new message filter on a \fIZMQ_SUB\fR socket\&. Newly created \fIZMQ_SUB\fR sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter\&.
.sp
-An empty \fIoption_value\fR of length zero shall subscribe to all incoming messages\&. A non\-empty \fIoption_value\fR shall subscribe to all messages beginning with the specified prefix\&. Mutiple filters may be attached to a single \fIZMQ_SUB\fR socket, in which case a message shall be accepted if it matches at least one filter\&.
+An empty \fIoption_value\fR of length zero shall subscribe to all incoming messages\&. A non\-empty \fIoption_value\fR shall subscribe to all messages beginning with the specified prefix\&. Multiple filters may be attached to a single \fIZMQ_SUB\fR socket, in which case a message shall be accepted if it matches at least one filter\&.
.TS
tab(:);
lt lt
@@ -342,7 +344,7 @@ The \fIZMQ_RECOVERY_IVL\fR option shall set the recovery interval for multicast
.ps -1
.br
.sp
-Excersize care when setting large recovery intervals as the data needed for recovery will be held in memory\&. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in\-memory buffer\&.
+Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory\&. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in\-memory buffer\&.
.sp .5v
.RE
.TS
@@ -381,9 +383,66 @@ all, when using multicast transports
T}
.TE
.sp 1
-.SS "ZMQ_MCAST_LOOP: Control multicast loopback"
+.SS "ZMQ_RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds"
+.sp
+The \fIZMQ_RECOVERY_IVL_MSEC\fR option shall set the recovery interval, specified in milliseconds (ms) for multicast transports using the specified \fIsocket\fR\&. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur\&.
+.sp
+A non\-zero value of the \fIZMQ_RECOVERY_IVL_MSEC\fR option will take precedence over the \fIZMQ_RECOVERY_IVL\fR option, but since the default for the \fIZMQ_RECOVERY_IVL_MSEC\fR is \-1, the default is to use the \fIZMQ_RECOVERY_IVL\fR option value\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBCaution\fR
+.ps -1
+.br
.sp
-The \fIZMQ_MCAST_LOOP\fR option shall control whether data sent via multicast transports using the specified \fIsocket\fR can also be received by the sending host via loopback\&. A value of zero disables the loopback functionality, while the default value of 1 enables the loopback functionality\&. Leaving multicast loopback enabled when it is not required can have a negative impact on performance\&. Where possible, disable \fIZMQ_MCAST_LOOP\fR in production environments\&.
+Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory\&. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in\-memory buffer\&.
+.sp .5v
+.RE
+.TS
+tab(:);
+lt lt
+lt lt
+lt lt
+lt lt.
+T{
+.sp
+Option value type
+T}:T{
+.sp
+int64_t
+T}
+T{
+.sp
+Option value unit
+T}:T{
+.sp
+milliseconds
+T}
+T{
+.sp
+Default value
+T}:T{
+.sp
+\-1
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all, when using multicast transports
+T}
+.TE
+.sp 1
+.SS "ZMQ_MCAST_LOOP: Control multicast loop\-back"
+.sp
+The \fIZMQ_MCAST_LOOP\fR option shall control whether data sent via multicast transports using the specified \fIsocket\fR can also be received by the sending host via loop\-back\&. A value of zero disables the loop\-back functionality, while the default value of 1 enables the loop\-back functionality\&. Leaving multicast loop\-back enabled when it is not required can have a negative impact on performance\&. Where possible, disable \fIZMQ_MCAST_LOOP\fR in production environments\&.
.TS
tab(:);
lt lt
@@ -498,6 +557,230 @@ all
T}
.TE
.sp 1
+.SS "ZMQ_LINGER: Set linger period for socket shutdown"
+.sp
+The \fIZMQ_LINGER\fR option shall set the linger period for the specified \fIsocket\fR\&. 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 \fBzmq_close\fR(3), and further affects the termination of the socket\(cqs context with \fBzmq_term\fR(3)\&. The following outlines the different behaviours:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The default value of
+\fI\-1\fR
+specifies an infinite linger period\&. Pending messages shall not be discarded after a call to
+\fIzmq_close()\fR; attempting to terminate the socket\(cqs context with
+\fIzmq_term()\fR
+shall block until all pending messages have been sent to a peer\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The value of
+\fI0\fR
+specifies no linger period\&. Pending messages shall be discarded immediately when the socket is closed with
+\fIzmq_close()\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Positive values specify an upper bound for the linger period in milliseconds\&. Pending messages shall not be discarded after a call to
+\fIzmq_close()\fR; attempting to terminate the socket\(cqs context with
+\fIzmq_term()\fR
+shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded\&.
+.TS
+tab(:);
+lt lt
+lt lt
+lt lt
+lt lt.
+T{
+Option value type
+T}:T{
+int
+T}
+T{
+Option value unit
+T}:T{
+milliseconds
+T}
+T{
+Default value
+T}:T{
+\-1 (infinite)
+T}
+T{
+Applicable socket types
+T}:T{
+all
+T}
+.TE
+.sp 1
+.RE
+.SS "ZMQ_RECONNECT_IVL: Set reconnection interval"
+.sp
+The \fIZMQ_RECONNECT_IVL\fR option shall set the initial reconnection interval for the specified \fIsocket\fR\&. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection\-oriented transports\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket\&.
+.sp .5v
+.RE
+.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
+100
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all, only for connection\-oriented transports
+T}
+.TE
+.sp 1
+.SS "ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval"
+.sp
+The \fIZMQ_RECONNECT_IVL_MAX\fR option shall set the maximum reconnection interval for the specified \fIsocket\fR\&. This is the maximum period 0MQ shall wait between attempts to reconnect\&. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached\&. This allows for exponential backoff strategy\&. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+Values less than ZMQ_RECONNECT_IVL will be ignored\&.
+.sp .5v
+.RE
+.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
+0 (only use ZMQ_RECONNECT_IVL)
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all, only for connection\-oriented transports
+T}
+.TE
+.sp 1
+.SS "ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections"
+.sp
+The \fIZMQ_BACKLOG\fR option shall set the maximum length of the queue of outstanding peer connections for the specified \fIsocket\fR; this only applies to connection\-oriented transports\&. For details refer to your operating system documentation for the \fIlisten\fR function\&.
+.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
+connections
+T}
+T{
+.sp
+Default value
+T}:T{
+.sp
+100
+T}
+T{
+.sp
+Applicable socket types
+T}:T{
+.sp
+all, only for connection\-oriented transports\&.
+T}
+.TE
+.sp 1
.SH "RETURN VALUE"
.sp
The \fIzmq_setsockopt()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&.
@@ -529,6 +812,11 @@ The provided
\fIsocket\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBEINTR\fR
+.RS 4
+The operation was interrupted by delivery of a signal\&.
+.RE
.SH "EXAMPLE"
.PP
\fBSubscribing to messages on a ZMQ_SUB socket\fR.
@@ -576,7 +864,7 @@ assert (rc);
\fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_setsockopt.html b/doc/zmq_setsockopt.html
deleted file mode 100644
index 1e3db91..0000000
--- a/doc/zmq_setsockopt.html
+++ /dev/null
@@ -1,1277 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_setsockopt(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_setsockopt(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_setsockopt -
- set 0MQ socket options
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_setsockopt (void <em>*socket</em>, int <em>option_name</em>, const void <em>*option_value</em>, size_t <em>option_len</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_setsockopt()</em> function shall set the option specified by the
-<em>option_name</em> argument to the value pointed to by the <em>option_value</em> argument
-for the ØMQ socket pointed to by the <em>socket</em> argument. The <em>option_len</em>
-argument is the size of the option value in bytes.</p></div>
-<div class="paragraph"><p>The following socket options can be set with the <em>zmq_setsockopt()</em> function:</p></div>
-<h3 id="_zmq_hwm_set_high_water_mark">ZMQ_HWM: Set high water mark</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_HWM</em> option shall set the high water mark for the specified <em>socket</em>.
-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
-<em>socket</em> is communicating with.</p></div>
-<div class="paragraph"><p>If this limit has been reached the socket shall enter an exceptional state and
-depending on the socket type, ØMQ shall take appropriate action such as
-blocking or dropping sent messages. Refer to the individual socket descriptions
-in <a href="zmq_socket.html">zmq_socket(3)</a> for details on the exact action taken for each socket
-type.</p></div>
-<div class="paragraph"><p>The default <em>ZMQ_HWM</em> value of zero means "no limit".</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-uint64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-messages
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_swap_set_disk_offload_size">ZMQ_SWAP: Set disk offload size</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_SWAP</em> option shall set the disk offload (swap) size for the specified
-<em>socket</em>. A socket which has <em>ZMQ_SWAP</em> set to a non-zero value may exceed it&#8217;s
-high water mark; in this case outstanding messages shall be offloaded to
-storage on disk rather than held in memory.</p></div>
-<div class="paragraph"><p>The value of <em>ZMQ_SWAP</em> defines the maximum size of the swap space in bytes.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-int64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-bytes
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_affinity_set_i_o_thread_affinity">ZMQ_AFFINITY: Set I/O thread affinity</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_AFFINITY</em> option shall set the I/O thread affinity for newly created
-connections on the specified <em>socket</em>.</p></div>
-<div class="paragraph"><p>Affinity determines which threads from the ØMQ I/O thread pool associated with
-the socket&#8217;s <em>context</em> shall handle newly created connections. A value of zero
-specifies no affinity, meaning that work shall be distributed fairly among all
-ØMQ I/O threads in the thread pool. For non-zero values, the lowest bit
-corresponds to thread 1, second lowest bit to thread 2 and so on. For example,
-a value of 3 specifies that subsequent connections on <em>socket</em> shall be handled
-exclusively by I/O threads 1 and 2.</p></div>
-<div class="paragraph"><p>See also <a href="zmq_init.html">zmq_init(3)</a> for details on allocating the number of I/O
-threads for a specific <em>context</em>.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-uint64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A (bitmap)
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_identity_set_socket_identity">ZMQ_IDENTITY: Set socket identity</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_IDENTITY</em> option shall set the identity of the specified <em>socket</em>.
-Socket identity determines if existing ØMQ infastructure (<em>message queues</em>,
-<em>forwarding devices</em>) shall be identified with a specific application and
-persist across multiple runs of the application.</p></div>
-<div class="paragraph"><p>If the socket has no identity, each run of an application is completely
-separate from other runs. However, with identity set the socket shall re-use
-any existing ØMQ infrastructure configured by the previous run(s). Thus the
-application may receive messages that were sent in the meantime, <em>message
-queue</em> limits shall be shared with previous run(s) and so on.</p></div>
-<div class="paragraph"><p>Identity should be at least one byte and at most 255 bytes long. Identities
-starting with binary zero are reserved for use by ØMQ infrastructure.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-binary data
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-NULL
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_subscribe_establish_message_filter">ZMQ_SUBSCRIBE: Establish message filter</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_SUBSCRIBE</em> option shall establish a new message filter on a <em>ZMQ_SUB</em>
-socket. Newly created <em>ZMQ_SUB</em> sockets shall filter out all incoming messages,
-therefore you should call this option to establish an initial message filter.</p></div>
-<div class="paragraph"><p>An empty <em>option_value</em> of length zero shall subscribe to all incoming
-messages. A non-empty <em>option_value</em> shall subscribe to all messages beginning
-with the specified prefix. Mutiple filters may be attached to a single
-<em>ZMQ_SUB</em> socket, in which case a message shall be accepted if it matches at
-least one filter.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-binary data
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-ZMQ_SUB
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_unsubscribe_remove_message_filter">ZMQ_UNSUBSCRIBE: Remove message filter</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_UNSUBSCRIBE</em> option shall remove an existing message filter on a
-<em>ZMQ_SUB</em> socket. The filter specified must match an existing filter previously
-established with the <em>ZMQ_SUBSCRIBE</em> option. If the socket has several
-instances of the same filter attached the <em>ZMQ_UNSUBSCRIBE</em> option shall remove
-only one instance, leaving the rest in place and functional.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-binary data
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-ZMQ_SUB
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_rate_set_multicast_data_rate">ZMQ_RATE: Set multicast data rate</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_RATE</em> option shall set the maximum send or receive data rate for
-multicast transports such as <a href="zmq_pgm.html">zmq_pgm(7)</a> using the specified <em>socket</em>.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-int64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-kilobits per second
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-100
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all, when using multicast transports
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_recovery_ivl_set_multicast_recovery_interval">ZMQ_RECOVERY_IVL: Set multicast recovery interval</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_RECOVERY_IVL</em> option shall set the recovery interval for multicast
-transports using the specified <em>socket</em>. The recovery interval determines the
-maximum time in seconds that a receiver can be absent from a multicast group
-before unrecoverable data loss will occur.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Caution</div>
-</td>
-<td class="content">Excersize care when setting large recovery intervals as the data
-needed for recovery will be held in memory. For example, a 1 minute recovery
-interval at a data rate of 1Gbps requires a 7GB in-memory buffer.</td>
-</tr></table>
-</div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-int64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-seconds
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-10
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all, when using multicast transports
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_mcast_loop_control_multicast_loopback">ZMQ_MCAST_LOOP: Control multicast loopback</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_MCAST_LOOP</em> option shall control whether data sent via multicast
-transports using the specified <em>socket</em> can also be received by the sending
-host via loopback. A value of zero disables the loopback functionality, while
-the default value of 1 enables the loopback functionality. Leaving multicast
-loopback enabled when it is not required can have a negative impact on
-performance. Where possible, disable <em>ZMQ_MCAST_LOOP</em> in production
-environments.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-int64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-boolean
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-1
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all, when using multicast transports
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_sndbuf_set_kernel_transmit_buffer_size">ZMQ_SNDBUF: Set kernel transmit buffer size</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_SNDBUF</em> option shall set the underlying kernel transmit buffer size
-for the <em>socket</em> to the specified size in bytes. A value of zero means leave
-the OS default unchanged. For details please refer to your operating system
-documentation for the <em>SO_SNDBUF</em> socket option.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-uint64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-bytes
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_zmq_rcvbuf_set_kernel_receive_buffer_size">ZMQ_RCVBUF: Set kernel receive buffer size</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The <em>ZMQ_RCVBUF</em> option shall set the underlying kernel receive buffer size for
-the <em>socket</em> to the specified size in bytes. A value of zero means leave the
-OS default unchanged. For details refer to your operating system documentation
-for the <em>SO_RCVBUF</em> socket option.</p></div>
-<div class="hdlist"><table>
-<tr>
-<td class="hdlist1">
-Option value type
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-uint64_t
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Option value unit
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-bytes
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Default value
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-0
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Applicable socket types
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-all
-</p>
-</td>
-</tr>
-</table></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_setsockopt()</em> function shall return zero if successful. Otherwise it
-shall return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EINVAL</strong>
-</dt>
-<dd>
-<p>
-The requested option <em>option_name</em> is unknown, or the requested <em>option_len</em> or
-<em>option_value</em> is invalid.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>ETERM</strong>
-</dt>
-<dd>
-<p>
-The ØMQ <em>context</em> associated with the specified <em>socket</em> was terminated.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>socket</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Subscribing to messages on a <em>ZMQ_SUB</em> socket</div>
-<div class="content">
-<pre><tt>/* Subscribe to all messages */
-rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "", 0);
-assert (rc == 0);
-/* Subscribe to messages prefixed with "ANIMALS.CATS" */
-rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12);</tt></pre>
-</div></div>
-<div class="listingblock">
-<div class="title">Setting I/O thread affinity</div>
-<div class="content">
-<pre><tt>int64_t affinity;
-/* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */
-affinity = 1;
-rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &amp;affinity, sizeof affinity);
-assert (rc);
-rc = zmq_bind (socket, "tcp://lo:5555");
-assert (rc);
-/* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */
-affinity = 2;
-rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &amp;affinity, sizeof affinity);
-assert (rc);
-rc = zmq_bind (socket, "tcp://lo:5556");
-assert (rc);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_getsockopt.html">zmq_getsockopt(3)</a>
-<a href="zmq_socket.html">zmq_socket(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:40:36 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt
index 1b551c6..8022568 100644
--- a/doc/zmq_setsockopt.txt
+++ b/doc/zmq_setsockopt.txt
@@ -12,6 +12,8 @@ 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
-----------
@@ -87,7 +89,7 @@ Applicable socket types:: N/A
ZMQ_IDENTITY: Set socket identity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_IDENTITY' option shall set the identity of the specified 'socket'.
-Socket identity determines if existing 0MQ infastructure (_message queues_,
+Socket identity determines if existing 0MQ infrastructure (_message queues_,
_forwarding devices_) shall be identified with a specific application and
persist across multiple runs of the application.
@@ -115,7 +117,7 @@ therefore you should call this option to establish an initial message filter.
An empty 'option_value' of length zero shall subscribe to all incoming
messages. A non-empty 'option_value' shall subscribe to all messages beginning
-with the specified prefix. Mutiple filters may be attached to a single
+with the specified prefix. Multiple filters may be attached to a single
'ZMQ_SUB' socket, in which case a message shall be accepted if it matches at
least one filter.
@@ -160,7 +162,7 @@ transports using the specified 'socket'. The recovery interval determines the
maximum time in seconds that a receiver can be absent from a multicast group
before unrecoverable data loss will occur.
-CAUTION: Excersize care when setting large recovery intervals as the data
+CAUTION: Exercise care when setting large recovery intervals as the data
needed for recovery will be held in memory. For example, a 1 minute recovery
interval at a data rate of 1Gbps requires a 7GB in-memory buffer.
@@ -171,13 +173,37 @@ Default value:: 10
Applicable socket types:: all, when using multicast transports
-ZMQ_MCAST_LOOP: Control multicast loopback
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+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
+receiver can be absent from a multicast group before unrecoverable data loss
+will occur.
+
+A non-zero value of the 'ZMQ_RECOVERY_IVL_MSEC' option will take precedence
+over the 'ZMQ_RECOVERY_IVL' option, but since the default for the
+'ZMQ_RECOVERY_IVL_MSEC' is -1, the default is to use the 'ZMQ_RECOVERY_IVL'
+option value.
+
+CAUTION: Exercise care when setting large recovery intervals as the data
+needed for recovery will be held in memory. For example, a 1 minute recovery
+interval at a data rate of 1Gbps requires a 7GB in-memory buffer.
+
+[horizontal]
+Option value type:: int64_t
+Option value unit:: milliseconds
+Default value:: -1
+Applicable socket types:: all, when using multicast transports
+
+
+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 loopback. A value of zero disables the loopback functionality, while
-the default value of 1 enables the loopback functionality. Leaving multicast
-loopback enabled when it is not required can have a negative impact on
+host via loop-back. A value of zero disables the loop-back functionality, while
+the default value of 1 enables the loop-back functionality. Leaving multicast
+loop-back enabled when it is not required can have a negative impact on
performance. Where possible, disable 'ZMQ_MCAST_LOOP' in production
environments.
@@ -216,6 +242,85 @@ Default value:: 0
Applicable socket types:: all
+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
+linkzmq:zmq_close[3], and further affects the termination of the socket's
+context with linkzmq:zmq_term[3]. The following outlines the different
+behaviours:
+
+* The default value of '-1' specifies an infinite linger period. Pending
+ messages shall not be discarded after a call to _zmq_close()_; attempting to
+ terminate the socket's context with _zmq_term()_ shall block until all
+ pending messages have been sent to a peer.
+
+* The value of '0' specifies no linger period. Pending messages shall be
+ discarded immediately when the socket is closed with _zmq_close()_.
+
+* Positive values specify an upper bound for the linger period in milliseconds.
+ Pending messages shall not be discarded after a call to _zmq_close()_;
+ attempting to terminate the socket's context with _zmq_term()_ shall block
+ until either all pending messages have been sent to a peer, or the linger
+ period expires, after which any pending messages shall be discarded.
+
+[horizontal]
+Option value type:: int
+Option value unit:: milliseconds
+Default value:: -1 (infinite)
+Applicable socket types:: all
+
+
+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 0MQ
+shall wait between attempts to reconnect disconnected peers when using
+connection-oriented transports.
+
+NOTE: The reconnection interval may be randomized by 0MQ to prevent
+reconnection storms in topologies with a large number of peers per socket.
+
+[horizontal]
+Option value type:: int
+Option value unit:: milliseconds
+Default value:: 100
+Applicable socket types:: all, only for connection-oriented transports
+
+
+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 0MQ shall wait between
+attempts to reconnect. On each reconnect attempt, the previous interval shall be
+doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential
+backoff strategy. Default value means no exponential backoff is performed and
+reconnect interval calculations are only based on ZMQ_RECONNECT_IVL.
+
+NOTE: Values less than ZMQ_RECONNECT_IVL will be ignored.
+
+[horizontal]
+Option value type:: int
+Option value unit:: milliseconds
+Default value:: 0 (only use ZMQ_RECONNECT_IVL)
+Applicable socket types:: all, only for connection-oriented transports
+
+
+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
+documentation for the 'listen' function.
+
+[horizontal]
+Option value type:: int
+Option value unit:: connections
+Default value:: 100
+Applicable socket types:: all, only for connection-oriented transports.
+
+
RETURN VALUE
------------
The _zmq_setsockopt()_ function shall return zero if successful. Otherwise it
@@ -231,6 +336,8 @@ _option_value_ is invalid.
The 0MQ 'context' associated with the specified 'socket' was terminated.
*EFAULT*::
The provided 'socket' was not valid (NULL).
+*EINTR*::
+The operation was interrupted by delivery of a signal.
EXAMPLE
@@ -271,5 +378,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_socket.3 b/doc/zmq_socket.3
index b8dc539..000cb0f 100644
--- a/doc/zmq_socket.3
+++ b/doc/zmq_socket.3
@@ -2,12 +2,12 @@
.\" Title: zmq_socket
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/20/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_SOCKET" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_SOCKET" "3" "03/20/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -44,10 +44,16 @@ interface to either connection\-oriented reliable byte streams (SOCK_STREAM), or
\fImessage queue\fR, with the exact queueing semantics depending on the socket type in use\&. Where conventional sockets transfer streams of bytes or discrete datagrams, 0MQ sockets transfer discrete
\fImessages\fR\&.
.sp
-0MQ sockets being \fIasynchronous\fR means that the timings of the physical connection setup and teardown, reconnect and effective delivery are transparent to the user and organized by 0MQ itself\&. Further, messages may be \fIqueued\fR in the event that a peer is unavailable to receive them\&.
+0MQ sockets being \fIasynchronous\fR means that the timings of the physical connection setup and tear down, reconnect and effective delivery are transparent to the user and organized by 0MQ itself\&. Further, messages may be \fIqueued\fR in the event that a peer is unavailable to receive them\&.
.sp
Conventional sockets allow only strict one\-to\-one (two peers), many\-to\-one (many clients, one server), or in some cases one\-to\-many (multicast) relationships\&. With the exception of \fIZMQ_PAIR\fR, 0MQ sockets may be connected \fBto multiple endpoints\fR using \fIzmq_connect()\fR, while simultaneously accepting incoming connections \fBfrom multiple endpoints\fR bound to the socket using \fIzmq_bind()\fR, thus allowing many\-to\-many relationships\&.
.PP
+\fBThread safety\fR. 0MQ
+\fIsockets\fR
+are
+\fInot\fR
+thread safe\&. Applications MUST NOT use a socket from multiple threads except after migrating a socket from one thread to another with a "full fence" memory barrier\&.
+.PP
\fBSocket types\fR. The following sections present the socket types defined by 0MQ, grouped by the general
\fImessaging pattern\fR
which is built from related socket types\&.
@@ -134,7 +140,7 @@ T}
\fBZMQ_REP\fR
.RS 4
.sp
-A socket of type \fIZMQ_REP\fR is used by a \fIservice\fR to receive requests from and send replies to a \fIclient\fR\&. This socket type allows only an alternating sequence of \fIzmq_recv(request)\fR and subsequent \fIzmq_send(reply)\fR calls\&. Each request received is fair\-queued from among all \fIclients\fR, and each reply sent is routed to the \fIclient\fR that issued the last request\&.
+A socket of type \fIZMQ_REP\fR is used by a \fIservice\fR to receive requests from and send replies to a \fIclient\fR\&. This socket type allows only an alternating sequence of \fIzmq_recv(request)\fR and subsequent \fIzmq_send(reply)\fR calls\&. Each request received is fair\-queued from among all \fIclients\fR, and each reply sent is routed to the \fIclient\fR that issued the last request\&. If the original requester doesn\(cqt exist any more the reply is silently discarded\&.
.sp
When a \fIZMQ_REP\fR socket enters an exceptional state due to having reached the high water mark for a \fIclient\fR, then any replies sent to the \fIclient\fR in question shall be dropped until the exceptional state ends\&.
.sp
@@ -181,7 +187,7 @@ Fair\-queued
T}
T{
.sp
-Outgoing routing stratagy
+Outgoing routing strategy
T}:T{
.sp
Last peer
@@ -202,20 +208,22 @@ T}
.nr an-break-flag 1
.br
.ps +1
-\fBZMQ_XREQ\fR
+\fBZMQ_DEALER\fR
.RS 4
.sp
-A socket of type \fIZMQ_XREQ\fR is an advanced pattern used for extending request/reply sockets\&. Each message sent is load\-balanced among all connected peers, and each message received is fair\-queued from all connected peers\&.
+A socket of type \fIZMQ_DEALER\fR is an advanced pattern used for extending request/reply sockets\&. Each message sent is load\-balanced among all connected peers, and each message received is fair\-queued from all connected peers\&.
.sp
-When a \fIZMQ_XREQ\fR socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the exceptional state ends or at least one peer becomes available for sending; messages are not discarded\&.
+Previously this socket was called \fIZMQ_XREQ\fR and that name remains available for backwards compatibility\&.
.sp
-When a \fIZMQ_XREQ\fR socket is connected to a \fIZMQ_REP\fR socket each message sent must consist of an empty message part, the \fIdelimiter\fR, followed by one or more \fIbody parts\fR\&.
+When a \fIZMQ_DEALER\fR socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the exceptional state ends or at least one peer becomes available for sending; messages are not discarded\&.
+.sp
+When a \fIZMQ_DEALER\fR socket is connected to a \fIZMQ_REP\fR socket each message sent must consist of an empty message part, the \fIdelimiter\fR, followed by one or more \fIbody parts\fR\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
-.B Table\ \&3.\ \&Summary of ZMQ_XREQ characteristics
+.B Table\ \&3.\ \&Summary of ZMQ_DEALER characteristics
.TS
tab(:);
lt lt
@@ -229,7 +237,7 @@ T{
Compatible peer sockets
T}:T{
.sp
-\fIZMQ_XREP\fR, \fIZMQ_REP\fR
+\fIZMQ_ROUTER\fR, \fIZMQ_REP\fR
T}
T{
.sp
@@ -275,20 +283,22 @@ T}
.nr an-break-flag 1
.br
.ps +1
-\fBZMQ_XREP\fR
+\fBZMQ_ROUTER\fR
.RS 4
.sp
-A socket of type \fIZMQ_XREP\fR is an advanced pattern used for extending request/reply sockets\&. When receiving messages a \fIZMQ_XREP\fR socket shall prepend a message part containing the \fIidentity\fR of the originating peer to the message before passing it to the application\&. Messages received are fair\-queued from among all connected peers\&. When sending messages a \fIZMQ_XREP\fR socket shall remove the first part of the message and use it to determine the \fIidentity\fR of the peer the message shall be routed to\&.
+A socket of type \fIZMQ_ROUTER\fR is an advanced pattern used for extending request/reply sockets\&. When receiving messages a \fIZMQ_ROUTER\fR socket shall prepend a message part containing the \fIidentity\fR of the originating peer to the message before passing it to the application\&. Messages received are fair\-queued from among all connected peers\&. When sending messages a \fIZMQ_ROUTER\fR socket shall remove the first part of the message and use it to determine the \fIidentity\fR of the peer the message shall be routed to\&. If the peer does not exist anymore the message shall be silently discarded\&.
+.sp
+Previously this socket was called \fIZMQ_XREP\fR and that name remains available for backwards compatibility\&.
.sp
-When a \fIZMQ_XREP\fR socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any messages sent to the socket shall be dropped until the exceptional state ends\&. Likewise, any messages routed to a non\-existent peer or a peer for which the individual high water mark has been reached shall also be dropped\&.
+When a \fIZMQ_ROUTER\fR socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any messages sent to the socket shall be dropped until the exceptional state ends\&. Likewise, any messages routed to a non\-existent peer or a peer for which the individual high water mark has been reached shall also be dropped\&.
.sp
-When a \fIZMQ_REQ\fR socket is connected to a \fIZMQ_XREP\fR socket, in addition to the \fIidentity\fR of the originating peer each message received shall contain an empty \fIdelimiter\fR message part\&. Hence, the entire structure of each received message as seen by the application becomes: one or more \fIidentity\fR parts, \fIdelimiter\fR part, one or more \fIbody parts\fR\&. When sending replies to a \fIZMQ_REQ\fR socket the application must include the \fIdelimiter\fR part\&.
+When a \fIZMQ_REQ\fR socket is connected to a \fIZMQ_ROUTER\fR socket, in addition to the \fIidentity\fR of the originating peer each message received shall contain an empty \fIdelimiter\fR message part\&. Hence, the entire structure of each received message as seen by the application becomes: one or more \fIidentity\fR parts, \fIdelimiter\fR part, one or more \fIbody parts\fR\&. When sending replies to a \fIZMQ_REQ\fR socket the application must include the \fIdelimiter\fR part\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
-.B Table\ \&4.\ \&Summary of ZMQ_XREP characteristics
+.B Table\ \&4.\ \&Summary of ZMQ_ROUTER characteristics
.TS
tab(:);
lt lt
@@ -302,7 +312,7 @@ T{
Compatible peer sockets
T}:T{
.sp
-\fIZMQ_XREQ\fR, \fIZMQ_REQ\fR
+\fIZMQ_DEALER\fR, \fIZMQ_REQ\fR
T}
T{
.sp
@@ -344,7 +354,7 @@ T}
.RE
.SS "Publish\-subscribe pattern"
.sp
-The publish\-subscribe pattern is used for one\-to\-many distribution of data from a single \fIpublisher\fR to multiple \fIsubscribers\fR in a fanout fashion\&.
+The publish\-subscribe pattern is used for one\-to\-many distribution of data from a single \fIpublisher\fR to multiple \fIsubscribers\fR in a fan out fashion\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
@@ -354,9 +364,9 @@ The publish\-subscribe pattern is used for one\-to\-many distribution of data fr
\fBZMQ_PUB\fR
.RS 4
.sp
-A socket of type \fIZMQ_PUB\fR is used by a \fIpublisher\fR to distribute data\&. Messages sent are distributed in a fanout fashion to all connected peers\&. The \fBzmq_recv\fR(3) function is not implemented for this socket type\&.
+A socket of type \fIZMQ_PUB\fR is used by a \fIpublisher\fR to distribute data\&. Messages sent are distributed in a fan out fashion to all connected peers\&. The \fBzmq_recv\fR(3) function is not implemented for this socket type\&.
.sp
-When a \fIZMQ_PUB\fR socket enters an exceptional state due to having reached the high water mark for a \fIsubscriber\fR, then any messages that would be sent to the \fIsubscriber\fR in question shall instead be dropped until the exceptional state ends\&.
+When a \fIZMQ_PUB\fR socket enters an exceptional state due to having reached the high water mark for a \fIsubscriber\fR, then any messages that would be sent to the \fIsubscriber\fR in question shall instead be dropped until the exceptional state ends\&. The \fIzmq_send()\fR function shall never block for this socket type\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
@@ -404,7 +414,7 @@ T{
Outgoing routing strategy
T}:T{
.sp
-Fanout
+Fan out
T}
T{
.sp
@@ -480,7 +490,7 @@ T{
ZMQ_HWM option action
T}:T{
.sp
-N/A
+Drop
T}
.TE
.sp 1
@@ -634,7 +644,7 @@ T}
.RE
.SS "Exclusive pair pattern"
.sp
-The exclusive pair is an advanced pattern used for communicating exclusively between two peers\&.
+The exclusive pair pattern is used to connect a peer to precisely one other peer\&. This pattern is used for inter\-thread communication across the inproc transport\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
@@ -660,7 +670,7 @@ When a \fIZMQ_PAIR\fR socket enters an exceptional state due to having reached t
.ps -1
.br
.sp
-\fIZMQ_PAIR\fR sockets are experimental, and are currently missing several features such as auto\-reconnection\&.
+\fIZMQ_PAIR\fR sockets are designed for inter\-thread communication across the \fBzmq_inproc\fR(7) transport and do not implement functionality such as auto\-reconnection\&. \fIZMQ_PAIR\fR sockets are considered experimental and may have other missing or broken aspects\&.
.sp .5v
.RE
.sp
@@ -734,25 +744,23 @@ The requested socket
is invalid\&.
.RE
.PP
-\fBEMTHREAD\fR
-.RS 4
-The maximum number of sockets within this
-\fIcontext\fR
-has been exceeded\&.
-.RE
-.PP
\fBEFAULT\fR
.RS 4
The provided
\fIcontext\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBETERM\fR
+.RS 4
+The context specified was terminated\&.
+.RE
.SH "SEE ALSO"
.sp
-\fBzmq_init\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_send\fR(3) \fBzmq_recv\fR(3) \fBzmq\fR(7)
+\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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_socket.html b/doc/zmq_socket.html
deleted file mode 100644
index 50f5844..0000000
--- a/doc/zmq_socket.html
+++ /dev/null
@@ -1,1403 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_socket(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_socket(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_socket -
- create 0MQ socket
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>void *zmq_socket (void <em>*context</em>, int <em>type</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_socket()</em> function shall create a ØMQ socket within the specified
-<em>context</em> and return an opaque handle to the newly created socket. The <em>type</em>
-argument specifies the socket type, which determines the semantics of
-communication over the socket.</p></div>
-<div class="paragraph"><p>The newly created socket is initially unbound, and not associated with any
-endpoints. In order to establish a message flow a socket must first be
-connected to at least one endpoint with <a href="zmq_connect.html">zmq_connect(3)</a>, or at least one
-endpoint must be created for accepting incoming connections with
-<a href="zmq_bind.html">zmq_bind(3)</a>.</p></div>
-<div class="paragraph"><div class="title">Key differences to conventional sockets</div><p>Generally speaking, conventional sockets present a <em>synchronous</em> interface to
-either connection-oriented reliable byte streams (SOCK_STREAM), or
-connection-less unreliable datagrams (SOCK_DGRAM). In comparison, ØMQ sockets
-present an abstraction of an asynchronous <em>message queue</em>, with the exact
-queueing semantics depending on the socket type in use. Where conventional
-sockets transfer streams of bytes or discrete datagrams, ØMQ sockets transfer
-discrete <em>messages</em>.</p></div>
-<div class="paragraph"><p>ØMQ sockets being <em>asynchronous</em> means that the timings of the physical
-connection setup and teardown, reconnect and effective delivery are transparent
-to the user and organized by ØMQ itself. Further, messages may be <em>queued</em> in
-the event that a peer is unavailable to receive them.</p></div>
-<div class="paragraph"><p>Conventional sockets allow only strict one-to-one (two peers), many-to-one
-(many clients, one server), or in some cases one-to-many (multicast)
-relationships. With the exception of <em>ZMQ_PAIR</em>, ØMQ sockets may be connected
-<strong>to multiple endpoints</strong> using <em>zmq_connect()</em>, while simultaneously accepting
-incoming connections <strong>from multiple endpoints</strong> bound to the socket using
-<em>zmq_bind()</em>, thus allowing many-to-many relationships.</p></div>
-<div class="paragraph"><div class="title">Socket types</div><p>The following sections present the socket types defined by ØMQ, grouped by the
-general <em>messaging pattern</em> which is built from related socket types.</p></div>
-<h3 id="_request_reply_pattern">Request-reply pattern</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The request-reply pattern is used for sending requests from a <em>client</em> to one
-or more instances of a <em>service</em>, and receiving subsequent replies to each
-request sent.</p></div>
-<h4 id="_zmq_req">ZMQ_REQ</h4>
-<div class="paragraph"><p>A socket of type <em>ZMQ_REQ</em> is used by a <em>client</em> to send requests to and
-receive replies from a <em>service</em>. This socket type allows only an alternating
-sequence of <em>zmq_send(request)</em> and subsequent <em>zmq_recv(reply)</em> calls. Each
-request sent is load-balanced among all <em>services</em>, and each reply received is
-matched with the last issued request.</p></div>
-<div class="paragraph"><p>When a <em>ZMQ_REQ</em> socket enters an exceptional state due to having reached the
-high water mark for all <em>services</em>, or if there are no <em>services</em> at all, then
-any <a href="zmq_send.html">zmq_send(3)</a> operations on the socket shall block until the
-exceptional state ends or at least one <em>service</em> becomes available for sending;
-messages are not discarded.</p></div>
-<div class="hdlist"><div class="title">Summary of ZMQ_REQ characteristics</div><table>
-<tr>
-<td class="hdlist1">
-Compatible peer sockets
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-<em>ZMQ_REP</em>
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Direction
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Bidirectional
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Send/receive pattern
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Send, Receive, Send, Receive, &#8230;
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Outgoing routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Load-balanced
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Incoming routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Last peer
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-ZMQ_HWM option action
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Block
-</p>
-</td>
-</tr>
-</table></div>
-<h4 id="_zmq_rep">ZMQ_REP</h4>
-<div class="paragraph"><p>A socket of type <em>ZMQ_REP</em> is used by a <em>service</em> to receive requests from and
-send replies to a <em>client</em>. This socket type allows only an alternating
-sequence of <em>zmq_recv(request)</em> and subsequent <em>zmq_send(reply)</em> calls. Each
-request received is fair-queued from among all <em>clients</em>, and each reply sent
-is routed to the <em>client</em> that issued the last request.</p></div>
-<div class="paragraph"><p>When a <em>ZMQ_REP</em> socket enters an exceptional state due to having reached the
-high water mark for a <em>client</em>, then any replies sent to the <em>client</em> in
-question shall be dropped until the exceptional state ends.</p></div>
-<div class="hdlist"><div class="title">Summary of ZMQ_REP characteristics</div><table>
-<tr>
-<td class="hdlist1">
-Compatible peer sockets
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-<em>ZMQ_REQ</em>
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Direction
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Bidirectional
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Send/receive pattern
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Receive, Send, Receive, Send, &#8230;
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Incoming routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Fair-queued
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Outgoing routing stratagy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Last peer
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-ZMQ_HWM option action
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Drop
-</p>
-</td>
-</tr>
-</table></div>
-<h4 id="_zmq_xreq">ZMQ_XREQ</h4>
-<div class="paragraph"><p>A socket of type <em>ZMQ_XREQ</em> is an advanced pattern used for extending
-request/reply sockets. Each message sent is load-balanced among all connected
-peers, and each message received is fair-queued from all connected peers.</p></div>
-<div class="paragraph"><p>When a <em>ZMQ_XREQ</em> socket enters an exceptional state due to having reached the
-high water mark for all peers, or if there are no peers at all, then any
-<a href="zmq_send.html">zmq_send(3)</a> operations on the socket shall block until the exceptional
-state ends or at least one peer becomes available for sending; messages are not
-discarded.</p></div>
-<div class="paragraph"><p>When a <em>ZMQ_XREQ</em> socket is connected to a <em>ZMQ_REP</em> socket each message sent
-must consist of an empty message part, the <em>delimiter</em>, followed by one or more
-<em>body parts</em>.</p></div>
-<div class="hdlist"><div class="title">Summary of ZMQ_XREQ characteristics</div><table>
-<tr>
-<td class="hdlist1">
-Compatible peer sockets
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-<em>ZMQ_XREP</em>, <em>ZMQ_REP</em>
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Direction
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Bidirectional
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Send/receive pattern
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Unrestricted
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Outgoing routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Load-balanced
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Incoming routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Fair-queued
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-ZMQ_HWM option action
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Block
-</p>
-</td>
-</tr>
-</table></div>
-<h4 id="_zmq_xrep">ZMQ_XREP</h4>
-<div class="paragraph"><p>A socket of type <em>ZMQ_XREP</em> is an advanced pattern used for extending
-request/reply sockets. When receiving messages a <em>ZMQ_XREP</em> socket shall
-prepend a message part containing the <em>identity</em> of the originating peer to the
-message before passing it to the application. Messages received are fair-queued
-from among all connected peers. When sending messages a <em>ZMQ_XREP</em> socket shall
-remove the first part of the message and use it to determine the <em>identity</em> of
-the peer the message shall be routed to.</p></div>
-<div class="paragraph"><p>When a <em>ZMQ_XREP</em> socket enters an exceptional state due to having reached the
-high water mark for all peers, or if there are no peers at all, then any
-messages sent to the socket shall be dropped until the exceptional state ends.
-Likewise, any messages routed to a non-existent peer or a peer for which the
-individual high water mark has been reached shall also be dropped.</p></div>
-<div class="paragraph"><p>When a <em>ZMQ_REQ</em> socket is connected to a <em>ZMQ_XREP</em> socket, in addition to the
-<em>identity</em> of the originating peer each message received shall contain an empty
-<em>delimiter</em> message part. Hence, the entire structure of each received message
-as seen by the application becomes: one or more <em>identity</em> parts, <em>delimiter</em>
-part, one or more <em>body parts</em>. When sending replies to a <em>ZMQ_REQ</em> socket the
-application must include the <em>delimiter</em> part.</p></div>
-<div class="hdlist"><div class="title">Summary of ZMQ_XREP characteristics</div><table>
-<tr>
-<td class="hdlist1">
-Compatible peer sockets
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-<em>ZMQ_XREQ</em>, <em>ZMQ_REQ</em>
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Direction
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Bidirectional
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Send/receive pattern
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Unrestricted
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Outgoing routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-See text
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Incoming routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Fair-queued
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-ZMQ_HWM option action
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Drop
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_publish_subscribe_pattern">Publish-subscribe pattern</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The publish-subscribe pattern is used for one-to-many distribution of data from
-a single <em>publisher</em> to multiple <em>subscribers</em> in a fanout fashion.</p></div>
-<h4 id="_zmq_pub">ZMQ_PUB</h4>
-<div class="paragraph"><p>A socket of type <em>ZMQ_PUB</em> is used by a <em>publisher</em> to distribute data.
-Messages sent are distributed in a fanout fashion to all connected peers.
-The <a href="zmq_recv.html">zmq_recv(3)</a> function is not implemented for this socket type.</p></div>
-<div class="paragraph"><p>When a <em>ZMQ_PUB</em> socket enters an exceptional state due to having reached the
-high water mark for a <em>subscriber</em>, then any messages that would be sent to the
-<em>subscriber</em> in question shall instead be dropped until the exceptional state
-ends.</p></div>
-<div class="hdlist"><div class="title">Summary of ZMQ_PUB characteristics</div><table>
-<tr>
-<td class="hdlist1">
-Compatible peer sockets
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-<em>ZMQ_SUB</em>
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Direction
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Unidirectional
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Send/receive pattern
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Send only
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Incoming routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Outgoing routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Fanout
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-ZMQ_HWM option action
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Drop
-</p>
-</td>
-</tr>
-</table></div>
-<h4 id="_zmq_sub">ZMQ_SUB</h4>
-<div class="paragraph"><p>A socket of type <em>ZMQ_SUB</em> is used by a <em>subscriber</em> to subscribe to data
-distributed by a <em>publisher</em>. Initially a <em>ZMQ_SUB</em> socket is not subscribed to
-any messages, use the <em>ZMQ_SUBSCRIBE</em> option of <a href="zmq_setsockopt.html">zmq_setsockopt(3)</a> to
-specify which messages to subscribe to. The <em>zmq_send()</em> function is not
-implemented for this socket type.</p></div>
-<div class="hdlist"><div class="title">Summary of ZMQ_SUB characteristics</div><table>
-<tr>
-<td class="hdlist1">
-Compatible peer sockets
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-<em>ZMQ_PUB</em>
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Direction
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Unidirectional
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Send/receive pattern
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Receive only
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Incoming routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Fair-queued
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Outgoing routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-ZMQ_HWM option action
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_pipeline_pattern">Pipeline pattern</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The pipeline pattern is used for distributing data to <em>nodes</em> arranged in
-a pipeline. Data always flows down the pipeline, and each stage of the pipeline
-is connected to at least one <em>node</em>. When a pipeline stage is connected to
-multiple <em>nodes</em> data is load-balanced among all connected <em>nodes</em>.</p></div>
-<h4 id="_zmq_push">ZMQ_PUSH</h4>
-<div class="paragraph"><p>A socket of type <em>ZMQ_PUSH</em> is used by a pipeline <em>node</em> to send messages
-to downstream pipeline <em>nodes</em>. Messages are load-balanced to all connected
-downstream <em>nodes</em>. The <em>zmq_recv()</em> function is not implemented for this
-socket type.</p></div>
-<div class="paragraph"><p>When a <em>ZMQ_PUSH</em> socket enters an exceptional state due to having reached the
-high water mark for all downstream <em>nodes</em>, or if there are no downstream
-<em>nodes</em> at all, then any <a href="zmq_send.html">zmq_send(3)</a> operations on the socket shall
-block until the exceptional state ends or at least one downstream <em>node</em>
-becomes available for sending; messages are not discarded.</p></div>
-<div class="paragraph"><p>Deprecated alias: <em>ZMQ_DOWNSTREAM</em>.</p></div>
-<div class="hdlist"><div class="title">Summary of ZMQ_PUSH characteristics</div><table>
-<tr>
-<td class="hdlist1">
-Compatible peer sockets
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-<em>ZMQ_PULL</em>
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Direction
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Unidirectional
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Send/receive pattern
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Send only
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Incoming routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Outgoing routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Load-balanced
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-ZMQ_HWM option action
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Block
-</p>
-</td>
-</tr>
-</table></div>
-<h4 id="_zmq_pull">ZMQ_PULL</h4>
-<div class="paragraph"><p>A socket of type <em>ZMQ_PULL</em> is used by a pipeline <em>node</em> to receive messages
-from upstream pipeline <em>nodes</em>. Messages are fair-queued from among all
-connected upstream <em>nodes</em>. The <em>zmq_send()</em> function is not implemented for
-this socket type.</p></div>
-<div class="paragraph"><p>Deprecated alias: <em>ZMQ_UPSTREAM</em>.</p></div>
-<div class="hdlist"><div class="title">Summary of ZMQ_PULL characteristics</div><table>
-<tr>
-<td class="hdlist1">
-Compatible peer sockets
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-<em>ZMQ_PUSH</em>
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Direction
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Unidirectional
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Send/receive pattern
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Receive only
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Incoming routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Fair-queued
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Outgoing routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-ZMQ_HWM option action
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-</table></div>
-<h3 id="_exclusive_pair_pattern">Exclusive pair pattern</h3><div style="clear:left"></div>
-<div class="paragraph"><p>The exclusive pair is an advanced pattern used for communicating exclusively
-between two peers.</p></div>
-<h4 id="_zmq_pair">ZMQ_PAIR</h4>
-<div class="paragraph"><p>A socket of type <em>ZMQ_PAIR</em> can only be connected to a single peer at any one
-time. No message routing or filtering is performed on messages sent over a
-<em>ZMQ_PAIR</em> socket.</p></div>
-<div class="paragraph"><p>When a <em>ZMQ_PAIR</em> socket enters an exceptional state due to having reached the
-high water mark for the connected peer, or if no peer is connected, then
-any <a href="zmq_send.html">zmq_send(3)</a> operations on the socket shall block until the peer
-becomes available for sending; messages are not discarded.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content"><em>ZMQ_PAIR</em> sockets are experimental, and are currently missing several
-features such as auto-reconnection.</td>
-</tr></table>
-</div>
-<div class="hdlist"><div class="title">Summary of ZMQ_PAIR characteristics</div><table>
-<tr>
-<td class="hdlist1">
-Compatible peer sockets
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-<em>ZMQ_PAIR</em>
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Direction
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Bidirectional
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Send/receive pattern
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Unrestricted
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Incoming routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-Outgoing routing strategy
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-N/A
-</p>
-</td>
-</tr>
-<tr>
-<td class="hdlist1">
-ZMQ_HWM option action
-<br />
-</td>
-<td class="hdlist2">
-<p style="margin-top: 0;">
-Block
-</p>
-</td>
-</tr>
-</table></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_socket()</em> function shall return an opaque handle to the newly created
-socket if successful. Otherwise, it shall return NULL and set <em>errno</em> to one of
-the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EINVAL</strong>
-</dt>
-<dd>
-<p>
-The requested socket <em>type</em> is invalid.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EMTHREAD</strong>
-</dt>
-<dd>
-<p>
-The maximum number of sockets within this <em>context</em> has been exceeded.
-</p>
-</dd>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>context</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_init.html">zmq_init(3)</a>
-<a href="zmq_setsockopt.html">zmq_setsockopt(3)</a>
-<a href="zmq_bind.html">zmq_bind(3)</a>
-<a href="zmq_connect.html">zmq_connect(3)</a>
-<a href="zmq_send.html">zmq_send(3)</a>
-<a href="zmq_recv.html">zmq_recv(3)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_socket.txt b/doc/zmq_socket.txt
index 2156af2..6250b38 100644
--- a/doc/zmq_socket.txt
+++ b/doc/zmq_socket.txt
@@ -35,7 +35,7 @@ sockets transfer streams of bytes or discrete datagrams, 0MQ sockets transfer
discrete _messages_.
0MQ sockets being _asynchronous_ means that the timings of the physical
-connection setup and teardown, reconnect and effective delivery are transparent
+connection setup and tear down, reconnect and effective delivery are transparent
to the user and organized by 0MQ itself. Further, messages may be _queued_ in
the event that a peer is unavailable to receive them.
@@ -46,6 +46,11 @@ relationships. With the exception of 'ZMQ_PAIR', 0MQ sockets may be connected
incoming connections *from multiple endpoints* bound to the socket using
_zmq_bind()_, thus allowing many-to-many relationships.
+.Thread safety
+0MQ 'sockets' are _not_ thread safe. Applications MUST NOT use a socket
+from multiple threads except after migrating a socket from one thread to
+another with a "full fence" memory barrier.
+
.Socket types
The following sections present the socket types defined by 0MQ, grouped by the
general _messaging pattern_ which is built from related socket types.
@@ -88,7 +93,8 @@ A socket of type 'ZMQ_REP' is used by a _service_ to receive requests from and
send replies to a _client_. This socket type allows only an alternating
sequence of _zmq_recv(request)_ and subsequent _zmq_send(reply)_ calls. Each
request received is fair-queued from among all _clients_, and each reply sent
-is routed to the _client_ that issued the last request.
+is routed to the _client_ that issued the last request. If the original
+requester doesn't exist any more the reply is silently discarded.
When a 'ZMQ_REP' socket enters an exceptional state due to having reached the
high water mark for a _client_, then any replies sent to the _client_ in
@@ -100,29 +106,32 @@ Compatible peer sockets:: 'ZMQ_REQ'
Direction:: Bidirectional
Send/receive pattern:: Receive, Send, Receive, Send, ...
Incoming routing strategy:: Fair-queued
-Outgoing routing stratagy:: Last peer
+Outgoing routing strategy:: Last peer
ZMQ_HWM option action:: Drop
-ZMQ_XREQ
-^^^^^^^^
-A socket of type 'ZMQ_XREQ' is an advanced pattern used for extending
+ZMQ_DEALER
+^^^^^^^^^^
+A socket of type 'ZMQ_DEALER' is an advanced pattern used for extending
request/reply sockets. Each message sent is load-balanced among all connected
peers, and each message received is fair-queued from all connected peers.
-When a 'ZMQ_XREQ' socket enters an exceptional state due to having reached the
+Previously this socket was called 'ZMQ_XREQ' and that name remains available
+for backwards compatibility.
+
+When a 'ZMQ_DEALER' socket enters an exceptional state due to having reached the
high water mark for all peers, or if there are no peers at all, then any
linkzmq:zmq_send[3] operations on the socket shall block until the exceptional
state ends or at least one peer becomes available for sending; messages are not
discarded.
-When a 'ZMQ_XREQ' socket is connected to a 'ZMQ_REP' socket each message sent
+When a 'ZMQ_DEALER' socket is connected to a 'ZMQ_REP' socket each message sent
must consist of an empty message part, the _delimiter_, followed by one or more
_body parts_.
[horizontal]
-.Summary of ZMQ_XREQ characteristics
-Compatible peer sockets:: 'ZMQ_XREP', 'ZMQ_REP'
+.Summary of ZMQ_DEALER characteristics
+Compatible peer sockets:: 'ZMQ_ROUTER', 'ZMQ_REP'
Direction:: Bidirectional
Send/receive pattern:: Unrestricted
Outgoing routing strategy:: Load-balanced
@@ -130,23 +139,27 @@ Incoming routing strategy:: Fair-queued
ZMQ_HWM option action:: Block
-ZMQ_XREP
-^^^^^^^^
-A socket of type 'ZMQ_XREP' is an advanced pattern used for extending
-request/reply sockets. When receiving messages a 'ZMQ_XREP' socket shall
+ZMQ_ROUTER
+^^^^^^^^^^
+A socket of type 'ZMQ_ROUTER' is an advanced pattern used for extending
+request/reply sockets. When receiving messages a 'ZMQ_ROUTER' socket shall
prepend a message part containing the _identity_ of the originating peer to the
message before passing it to the application. Messages received are fair-queued
-from among all connected peers. When sending messages a 'ZMQ_XREP' socket shall
+from among all connected peers. When sending messages a 'ZMQ_ROUTER' socket shall
remove the first part of the message and use it to determine the _identity_ of
-the peer the message shall be routed to.
+the peer the message shall be routed to. If the peer does not exist anymore
+the message shall be silently discarded.
-When a 'ZMQ_XREP' socket enters an exceptional state due to having reached the
+Previously this socket was called 'ZMQ_XREP' and that name remains available
+for backwards compatibility.
+
+When a 'ZMQ_ROUTER' socket enters an exceptional state due to having reached the
high water mark for all peers, or if there are no peers at all, then any
messages sent to the socket shall be dropped until the exceptional state ends.
Likewise, any messages routed to a non-existent peer or a peer for which the
individual high water mark has been reached shall also be dropped.
-When a 'ZMQ_REQ' socket is connected to a 'ZMQ_XREP' socket, in addition to the
+When a 'ZMQ_REQ' socket is connected to a 'ZMQ_ROUTER' socket, in addition to the
_identity_ of the originating peer each message received shall contain an empty
_delimiter_ message part. Hence, the entire structure of each received message
as seen by the application becomes: one or more _identity_ parts, _delimiter_
@@ -154,8 +167,8 @@ part, one or more _body parts_. When sending replies to a 'ZMQ_REQ' socket the
application must include the _delimiter_ part.
[horizontal]
-.Summary of ZMQ_XREP characteristics
-Compatible peer sockets:: 'ZMQ_XREQ', 'ZMQ_REQ'
+.Summary of ZMQ_ROUTER characteristics
+Compatible peer sockets:: 'ZMQ_DEALER', 'ZMQ_REQ'
Direction:: Bidirectional
Send/receive pattern:: Unrestricted
Outgoing routing strategy:: See text
@@ -166,19 +179,19 @@ ZMQ_HWM option action:: Drop
Publish-subscribe pattern
~~~~~~~~~~~~~~~~~~~~~~~~~
The publish-subscribe pattern is used for one-to-many distribution of data from
-a single _publisher_ to multiple _subscribers_ in a fanout fashion.
+a single _publisher_ to multiple _subscribers_ in a fan out fashion.
ZMQ_PUB
^^^^^^^
A socket of type 'ZMQ_PUB' is used by a _publisher_ to distribute data.
-Messages sent are distributed in a fanout fashion to all connected peers.
+Messages sent are distributed in a fan out fashion to all connected peers.
The linkzmq:zmq_recv[3] function is not implemented for this socket type.
When a 'ZMQ_PUB' socket enters an exceptional state due to having reached the
high water mark for a _subscriber_, then any messages that would be sent to the
_subscriber_ in question shall instead be dropped until the exceptional state
-ends.
+ends. The _zmq_send()_ function shall never block for this socket type.
[horizontal]
.Summary of ZMQ_PUB characteristics
@@ -186,7 +199,7 @@ Compatible peer sockets:: 'ZMQ_SUB'
Direction:: Unidirectional
Send/receive pattern:: Send only
Incoming routing strategy:: N/A
-Outgoing routing strategy:: Fanout
+Outgoing routing strategy:: Fan out
ZMQ_HWM option action:: Drop
@@ -205,7 +218,7 @@ Direction:: Unidirectional
Send/receive pattern:: Receive only
Incoming routing strategy:: Fair-queued
Outgoing routing strategy:: N/A
-ZMQ_HWM option action:: N/A
+ZMQ_HWM option action:: Drop
Pipeline pattern
@@ -262,8 +275,9 @@ ZMQ_HWM option action:: N/A
Exclusive pair pattern
~~~~~~~~~~~~~~~~~~~~~~
-The exclusive pair is an advanced pattern used for communicating exclusively
-between two peers.
+The exclusive pair pattern is used to connect a peer to precisely one other
+peer. This pattern is used for inter-thread communication across the inproc
+transport.
ZMQ_PAIR
@@ -277,8 +291,10 @@ high water mark for the connected peer, or if no peer is connected, then
any linkzmq:zmq_send[3] operations on the socket shall block until the peer
becomes available for sending; messages are not discarded.
-NOTE: 'ZMQ_PAIR' sockets are experimental, and are currently missing several
-features such as auto-reconnection.
+NOTE: 'ZMQ_PAIR' sockets are designed for inter-thread communication across
+the linkzmq:zmq_inproc[7] transport and do not implement functionality such
+as auto-reconnection. 'ZMQ_PAIR' sockets are considered experimental and may
+have other missing or broken aspects.
[horizontal]
.Summary of ZMQ_PAIR characteristics
@@ -301,11 +317,10 @@ ERRORS
------
*EINVAL*::
The requested socket 'type' is invalid.
-*EMTHREAD*::
-The maximum number of sockets within this 'context' has been exceeded.
*EFAULT*::
The provided 'context' was not valid (NULL).
-
+*ETERM*::
+The context specified was terminated.
SEE ALSO
--------
@@ -315,10 +330,11 @@ linkzmq:zmq_bind[3]
linkzmq:zmq_connect[3]
linkzmq:zmq_send[3]
linkzmq:zmq_recv[3]
+linkzmq:zmq_inproc[7]
linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_streamer.1 b/doc/zmq_streamer.1
deleted file mode 100644
index 2537be7..0000000
--- a/doc/zmq_streamer.1
+++ /dev/null
@@ -1,57 +0,0 @@
-'\" t
-.\" Title: zmq_streamer
-.\" Author: [see the "AUTHORS" section]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
-.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
-.\" Language: English
-.\"
-.TH "ZMQ_STREAMER" "1" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-zmq_streamer \- streamer device for parallelized pipeline messaging
-.SH "SYNOPSIS"
-.sp
-To be written\&.
-.SH "DESCRIPTION"
-.sp
-To be written\&.
-.SH "OPTIONS"
-.sp
-To be written\&.
-.SH "SEE ALSO"
-.sp
-\fBzmq\fR(7)
-.SH "AUTHORS"
-.sp
-The 0MQ documentation 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
diff --git a/doc/zmq_streamer.html b/doc/zmq_streamer.html
deleted file mode 100644
index 038ef97..0000000
--- a/doc/zmq_streamer.html
+++ /dev/null
@@ -1,613 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_streamer(1)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_streamer(1) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_streamer -
- streamer device for parallelized pipeline messaging
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To be written.</p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To be written.</p></div>
-</div>
-<h2 id="_options">OPTIONS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To be written.</p></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_streamer.txt b/doc/zmq_streamer.txt
deleted file mode 100644
index c8d517b..0000000
--- a/doc/zmq_streamer.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-zmq_streamer(1)
-===============
-
-
-NAME
-----
-zmq_streamer - streamer device for parallelized pipeline messaging
-
-
-SYNOPSIS
---------
-To be written.
-
-
-DESCRIPTION
------------
-To be written.
-
-
-OPTIONS
--------
-To be written.
-
-
-SEE ALSO
---------
-linkzmq:zmq[7]
-
-
-AUTHORS
--------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
-Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_strerror.3 b/doc/zmq_strerror.3
index ab9507a..43bb42e 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_STRERROR" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_STRERROR" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -64,7 +64,7 @@ if (!ctx) {
\fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_strerror.html b/doc/zmq_strerror.html
deleted file mode 100644
index 4cc4faf..0000000
--- a/doc/zmq_strerror.html
+++ /dev/null
@@ -1,634 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_strerror(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_strerror(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_strerror -
- get 0MQ error message string
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>const char *zmq_strerror (int <em>errnum</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_strerror()</em> function shall return a pointer to an error message string
-corresponding to the error number specified by the <em>errnum</em> argument. As ØMQ
-defines additional error numbers over and above those defined by the operating
-system, applications should use <em>zmq_strerror()</em> in preference to the standard
-<em>strerror()</em> function.</p></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_strerror()</em> function shall return a pointer to an error message
-string.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Displaying an error message when a ØMQ context cannot be initialised</div>
-<div class="content">
-<pre><tt>void *ctx = zmq_init (1, 1, 0);
-if (!ctx) {
- printf ("Error occurred during zmq_init(): %s\n", zmq_strerror (errno));
- abort ();
-}</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_strerror.txt b/doc/zmq_strerror.txt
index 61f30e3..2cd9829 100644
--- a/doc/zmq_strerror.txt
+++ b/doc/zmq_strerror.txt
@@ -51,5 +51,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_tcp.7 b/doc/zmq_tcp.7
index 75c7949..08fba12 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_TCP" "7" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_TCP" "7" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -49,7 +49,7 @@ An \fIinterface\fR may be specified by either of the following:
.sp -1
.IP \(bu 2.3
.\}
-The wildcard
+The wild\-card
*, meaning all available interfaces\&.
.RE
.sp
@@ -197,10 +197,10 @@ The following diagram illustrates the layout of a frame with a \fIpayload length
/* TCP port 5555 on all available interfaces */
rc = zmq_bind(socket, "tcp://*:5555");
assert (rc == 0);
-/* TCP port 5555 on the local loopback interface on all platforms */
+/* TCP port 5555 on the local loop\-back interface on all platforms */
rc = zmq_bind(socket, "tcp://127\&.0\&.0\&.1:5555");
assert (rc == 0);
-/* TCP port 5555 on the first ethernet network interface on Linux */
+/* TCP port 5555 on the first Ethernet network interface on Linux */
rc = zmq_bind(socket, "tcp://eth0:5555");
assert (rc == 0);
.fi
@@ -230,7 +230,7 @@ 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
-The 0MQ documentation 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 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
diff --git a/doc/zmq_tcp.html b/doc/zmq_tcp.html
deleted file mode 100644
index 99a5897..0000000
--- a/doc/zmq_tcp.html
+++ /dev/null
@@ -1,755 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_tcp(7)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_tcp(7) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_tcp -
- 0MQ unicast transport using TCP
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>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.</p></div>
-</div>
-<h2 id="_addressing">ADDRESSING</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A ØMQ address string consists of two parts as follows:
-<em>transport</em><tt>://</tt><em>endpoint</em>. The <em>transport</em> part specifies the underlying
-transport protocol to use, and for the TCP transport shall be set to <tt>tcp</tt>.
-The meaning of the <em>endpoint</em> part for the TCP transport is defined below.</p></div>
-<h3 id="_assigning_a_local_address_to_a_socket">Assigning a local address to a socket</h3><div style="clear:left"></div>
-<div class="paragraph"><p>When assigning a local address to a socket using <em>zmq_bind()</em> with the <em>tcp</em>
-transport, the <em>endpoint</em> shall be interpreted as an <em>interface</em> followed by a
-colon and the TCP port number to use.</p></div>
-<div class="paragraph"><p>An <em>interface</em> may be specified by either of the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The wildcard <tt>*</tt>, meaning all available interfaces.
-</p>
-</li>
-<li>
-<p>
-The primary IPv4 address assigned to the interface, in its numeric
- representation.
-</p>
-</li>
-<li>
-<p>
-The interface name as defined by the operating system.
-</p>
-</li>
-</ul></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Interface names are not standardised in any way and should be assumed to
-be arbitrary and platform dependent. On Win32 platforms no short interface
-names exist, thus only the primary IPv4 address may be used to specify an
-<em>interface</em>.</td>
-</tr></table>
-</div>
-<h3 id="_connecting_a_socket">Connecting a socket</h3><div style="clear:left"></div>
-<div class="paragraph"><p>When connecting a socket to a peer address using <em>zmq_connect()</em> with the <em>tcp</em>
-transport, the <em>endpoint</em> shall be interpreted as a <em>peer address</em> followed by
-a colon and the TCP port number to use.</p></div>
-<div class="paragraph"><p>A <em>peer address</em> may be specified by either of the following:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The DNS name of the peer.
-</p>
-</li>
-<li>
-<p>
-The IPv4 address of the peer, in it&#8217;s numeric representation.
-</p>
-</li>
-</ul></div>
-</div>
-<h2 id="_wire_format">WIRE FORMAT</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ØMQ messages are transmitted over TCP in frames consisting of an encoded
-<em>payload length</em>, followed by a <em>flags</em> field and the message body. The <em>payload
-length</em> is defined as the combined length in octets of the message body and the
-<em>flags</em> field.</p></div>
-<div class="paragraph"><p>For frames with a <em>payload length</em> not exceeding 254 octets, the <em>payload
-length</em> shall be encoded as a single octet. The minimum valid <em>payload length</em>
-of a frame is 1 octet, thus a <em>payload length</em> of 0 octets is invalid and such
-frames SHOULD be ignored.</p></div>
-<div class="paragraph"><p>For frames with a <em>payload length</em> exceeding 254 octets, the <em>payload length</em>
-shall be encoded as a single octet with the value <tt>255</tt> followed by the
-<em>payload length</em> represented as a 64-bit unsigned integer in network byte
-order.</p></div>
-<div class="paragraph"><p>The <em>flags</em> field consists of a single octet containing various control flags:</p></div>
-<div class="paragraph"><p>Bit 0 (MORE): <em>More message parts to follow</em>. A value of 0 indicates that there
-are no more message parts to follow; or that the message being sent is not a
-multi-part message. A value of 1 indicates that the message being sent is a
-multi-part message and more message parts are to follow.</p></div>
-<div class="paragraph"><p>Bits 1-7: <em>Reserved</em>. Bits 1-7 are reserved for future expansion and MUST be
-set to zero.</p></div>
-<div class="paragraph"><p>The following ABNF grammar represents a single <em>frame</em>:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt> frame = (length flags data)
- length = OCTET / (escape 8OCTET)
- flags = OCTET
- escape = %xFF
- data = *OCTET</tt></pre>
-</div></div>
-<div class="paragraph"><p>The following diagram illustrates the layout of a frame with a <em>payload length</em>
-not exceeding 254 octets:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt>0 1 2 3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Payload length| Flags | Message body ... |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Message body ...
-+-+-+-+-+-+-+- ...</tt></pre>
-</div></div>
-<div class="paragraph"><p>The following diagram illustrates the layout of a frame with a <em>payload length</em>
-exceeding 254 octets:</p></div>
-<div class="literalblock">
-<div class="content">
-<pre><tt>0 1 2 3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| 0xff | Payload length ... |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Payload length ... |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Payload length| Flags | Message body ... |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Message body ...
-+-+-+-+-+-+-+-+ ...</tt></pre>
-</div></div>
-</div>
-<h2 id="_examples">EXAMPLES</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Assigning a local address to a socket</div>
-<div class="content">
-<pre><tt>/* TCP port 5555 on all available interfaces */
-rc = zmq_bind(socket, "tcp://*:5555");
-assert (rc == 0);
-/* TCP port 5555 on the local loopback interface on all platforms */
-rc = zmq_bind(socket, "tcp://127.0.0.1:5555");
-assert (rc == 0);
-/* TCP port 5555 on the first ethernet network interface on Linux */
-rc = zmq_bind(socket, "tcp://eth0:5555");
-assert (rc == 0);</tt></pre>
-</div></div>
-<div class="listingblock">
-<div class="title">Connecting a socket</div>
-<div class="content">
-<pre><tt>/* Connecting using an IP address */
-rc = zmq_connect(socket, "tcp://192.168.1.1:5555");
-assert (rc == 0);
-/* Connecting using a DNS name */
-rc = zmq_connect(socket, "tcp://server1:5555");
-assert (rc == 0);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq_bind.html">zmq_bind(3)</a>
-<a href="zmq_connect.html">zmq_connect(3)</a>
-<a href="zmq_pgm.html">zmq_pgm(7)</a>
-<a href="zmq_ipc.html">zmq_ipc(7)</a>
-<a href="zmq_inproc.html">zmq_inproc(7)</a>
-<a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_tcp.txt b/doc/zmq_tcp.txt
index 29fa181..a0c945a 100644
--- a/doc/zmq_tcp.txt
+++ b/doc/zmq_tcp.txt
@@ -30,7 +30,7 @@ colon and the TCP port number to use.
An 'interface' may be specified by either of the following:
-* The wildcard `*`, meaning all available interfaces.
+* The wild-card `*`, meaning all available interfaces.
* The primary IPv4 address assigned to the interface, in its numeric
representation.
* The interface name as defined by the operating system.
@@ -127,10 +127,10 @@ EXAMPLES
/* TCP port 5555 on all available interfaces */
rc = zmq_bind(socket, "tcp://*:5555");
assert (rc == 0);
-/* TCP port 5555 on the local loopback interface on all platforms */
+/* TCP port 5555 on the local loop-back interface on all platforms */
rc = zmq_bind(socket, "tcp://127.0.0.1:5555");
assert (rc == 0);
-/* TCP port 5555 on the first ethernet network interface on Linux */
+/* TCP port 5555 on the first Ethernet network interface on Linux */
rc = zmq_bind(socket, "tcp://eth0:5555");
assert (rc == 0);
----
@@ -158,5 +158,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_term.3 b/doc/zmq_term.3
index 0f6daa4..608df99 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_TERM" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_TERM" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -34,37 +34,39 @@ zmq_term \- terminate 0MQ context
\fBint zmq_term (void \fR\fB\fI*context\fR\fR\fB);\fR
.SH "DESCRIPTION"
.sp
-The \fIzmq_term()\fR function terminates the 0MQ context \fIcontext\fR\&.
+The \fIzmq_term()\fR function shall terminate the 0MQ context \fIcontext\fR\&.
.sp
-If there are no longer any sockets open within \fIcontext\fR at the time \fIzmq_term()\fR is called then \fIcontext\fR shall be shut down and all associated resources shall be released immediately\&.
-.sp
-Otherwise, the following applies:
+Context termination is performed in the following steps:
.sp
.RS 4
.ie n \{\
-\h'-04'\(bu\h'+03'\c
+\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
-.IP \(bu 2.3
+.IP " 1." 4.2
.\}
-The
-\fIzmq_term()\fR
-function shall return immediately\&.
+Any blocking operations currently in progress on sockets open within
+\fIcontext\fR
+shall return immediately with an error code of ETERM\&. With the exception of
+\fIzmq_close()\fR, any further operations on sockets open within
+\fIcontext\fR
+shall fail with an error code of ETERM\&.
.RE
.sp
.RS 4
.ie n \{\
-\h'-04'\(bu\h'+03'\c
+\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
-.IP \(bu 2.3
+.IP " 2." 4.2
.\}
-Any blocking operations currently in progress on sockets open within
-\fIcontext\fR
-shall return immediately with an error code of ETERM\&.
-.RE
+After interrupting all blocking calls,
+\fIzmq_term()\fR
+shall
+\fIblock\fR
+until the following conditions are satisfied:
.sp
.RS 4
.ie n \{\
@@ -74,10 +76,10 @@ shall return immediately with an error code of ETERM\&.
.sp -1
.IP \(bu 2.3
.\}
-With the exception of
-\fIzmq_close()\fR, any further operations on sockets open within
+All sockets open within
\fIcontext\fR
-shall fail with an error code of ETERM\&.
+have been closed with
+\fIzmq_close()\fR\&.
.RE
.sp
.RS 4
@@ -88,12 +90,16 @@ shall fail with an error code of ETERM\&.
.sp -1
.IP \(bu 2.3
.\}
-The actual shutdown of
-\fIcontext\fR, and release of any associated resources,
-\fBshall be delayed\fR
-until the last socket within it is closed with
-\fIzmq_close()\fR\&.
+For each socket within
+\fIcontext\fR, all messages sent by the application with
+\fIzmq_send()\fR
+have either been physically transferred to a network peer, or the socket\(cqs linger period set with the
+\fIZMQ_LINGER\fR
+socket option has expired\&.
+.RE
.RE
+.sp
+For further details regarding socket linger behaviour refer to the \fIZMQ_LINGER\fR option in \fBzmq_setsockopt\fR(3)\&.
.SH "RETURN VALUE"
.sp
The \fIzmq_term()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&.
@@ -105,12 +111,17 @@ The provided
\fIcontext\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBEINTR\fR
+.RS 4
+Termination was interrupted by a signal\&. It can be restarted if needed\&.
+.RE
.SH "SEE ALSO"
.sp
-\fBzmq\fR(7) \fBzmq_init\fR(3)
+\fBzmq\fR(7) \fBzmq_init\fR(3) \fBzmq_close\fR(3) \fBzmq_setsockopt\fR(3)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_term.html b/doc/zmq_term.html
deleted file mode 100644
index 54af0d7..0000000
--- a/doc/zmq_term.html
+++ /dev/null
@@ -1,658 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_term(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_term(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_term -
- terminate 0MQ context
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>int zmq_term (void <em>*context</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_term()</em> function terminates the ØMQ context <em>context</em>.</p></div>
-<div class="paragraph"><p>If there are no longer any sockets open within <em>context</em> at the time
-<em>zmq_term()</em> is called then <em>context</em> shall be shut down and all associated
-resources shall be released immediately.</p></div>
-<div class="paragraph"><p>Otherwise, the following applies:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The <em>zmq_term()</em> function shall return immediately.
-</p>
-</li>
-<li>
-<p>
-Any blocking operations currently in progress on sockets open within
- <em>context</em> shall return immediately with an error code of ETERM.
-</p>
-</li>
-<li>
-<p>
-With the exception of <em>zmq_close()</em>, any further operations on sockets open
- within <em>context</em> shall fail with an error code of ETERM.
-</p>
-</li>
-<li>
-<p>
-The actual shutdown of <em>context</em>, and release of any associated resources,
- <strong>shall be delayed</strong> until the last socket within it is closed with
- <em>zmq_close()</em>.
-</p>
-</li>
-</ul></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_term()</em> function shall return zero if successful. Otherwise it shall
-return <tt>-1</tt> and set <em>errno</em> to one of the values defined below.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<strong>EFAULT</strong>
-</dt>
-<dd>
-<p>
-The provided <em>context</em> was not valid (NULL).
-</p>
-</dd>
-</dl></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq.html">zmq(7)</a>
-<a href="zmq_init.html">zmq_init(3)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_term.txt b/doc/zmq_term.txt
index f3ffa01..c7e13d7 100644
--- a/doc/zmq_term.txt
+++ b/doc/zmq_term.txt
@@ -14,25 +14,27 @@ SYNOPSIS
DESCRIPTION
-----------
-The _zmq_term()_ function terminates the 0MQ context 'context'.
+The _zmq_term()_ function shall terminate the 0MQ context 'context'.
-If there are no longer any sockets open within 'context' at the time
-_zmq_term()_ is called then 'context' shall be shut down and all associated
-resources shall be released immediately.
+Context termination is performed in the following steps:
-Otherwise, the following applies:
+1. Any blocking operations currently in progress on sockets open within
+ 'context' shall return immediately with an error code of ETERM. With the
+ exception of _zmq_close()_, any further operations on sockets open within
+ 'context' shall fail with an error code of ETERM.
-* The _zmq_term()_ function shall return immediately.
+2. After interrupting all blocking calls, _zmq_term()_ shall _block_ until the
+ following conditions are satisfied:
++
+ * All sockets open within 'context' have been closed with _zmq_close()_.
-* Any blocking operations currently in progress on sockets open within
- 'context' shall return immediately with an error code of ETERM.
+ * For each socket within 'context', all messages sent by the application
+ with _zmq_send()_ have either been physically transferred to a network
+ peer, or the socket's linger period set with the _ZMQ_LINGER_ socket
+ option has expired.
-* With the exception of _zmq_close()_, any further operations on sockets open
- within 'context' shall fail with an error code of ETERM.
-
-* The actual shutdown of 'context', and release of any associated resources,
- *shall be delayed* until the last socket within it is closed with
- _zmq_close()_.
+For further details regarding socket linger behaviour refer to the _ZMQ_LINGER_
+option in linkzmq:zmq_setsockopt[3].
RETURN VALUE
@@ -45,15 +47,19 @@ ERRORS
------
*EFAULT*::
The provided 'context' was not valid (NULL).
+*EINTR*::
+Termination was interrupted by a signal. It can be restarted if needed.
SEE ALSO
--------
linkzmq:zmq[7]
linkzmq:zmq_init[3]
+linkzmq:zmq_close[3]
+linkzmq:zmq_setsockopt[3]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/doc/zmq_version.3 b/doc/zmq_version.3
index a53df35..36248e5 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 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_VERSION" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_VERSION" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -34,7 +34,7 @@ zmq_version \- report 0MQ library version
\fBvoid zmq_version (int \fR\fB\fI*major\fR\fR\fB, int \fR\fB\fI*minor\fR\fR\fB, int \fR\fB\fI*patch\fR\fR\fB);\fR
.SH "DESCRIPTION"
.sp
-The \fIzmq_version()\fR function shall fill in the integer variables pointed to by the \fImajor\fR, \fIminor\fR and \fIpatch\fR arguments with the major, minor and patchlevel components of the 0MQ library version\&.
+The \fIzmq_version()\fR function shall fill in the integer variables pointed to by the \fImajor\fR, \fIminor\fR and \fIpatch\fR arguments with the major, minor and patch level components of the 0MQ library version\&.
.sp
This functionality is intended for applications or language bindings dynamically linking to the 0MQ library that wish to determine the actual version of the 0MQ library they are using\&.
.SH "RETURN VALUE"
@@ -64,7 +64,7 @@ printf ("Current 0MQ version is %d\&.%d\&.%d\en", major, minor, patch);
\fBzmq\fR(7)
.SH "AUTHORS"
.sp
-The 0MQ documentation 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 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
diff --git a/doc/zmq_version.html b/doc/zmq_version.html
deleted file mode 100644
index 841a7d2..0000000
--- a/doc/zmq_version.html
+++ /dev/null
@@ -1,632 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
-<title>zmq_version(3)</title>
-<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
-}
-
-body {
- margin: 1em 5% 1em 5%;
-}
-
-a {
- color: blue;
- text-decoration: underline;
-}
-a:visited {
- color: fuchsia;
-}
-
-em {
- font-style: italic;
- color: navy;
-}
-
-strong {
- font-weight: bold;
- color: #083194;
-}
-
-tt {
- color: navy;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color: #527bbd;
- font-family: sans-serif;
- margin-top: 1.2em;
- margin-bottom: 0.5em;
- line-height: 1.3;
-}
-
-h1, h2, h3 {
- border-bottom: 2px solid silver;
-}
-h2 {
- padding-top: 0.5em;
-}
-h3 {
- float: left;
-}
-h3 + * {
- clear: left;
-}
-
-div.sectionbody {
- font-family: serif;
- margin-left: 0;
-}
-
-hr {
- border: 1px solid silver;
-}
-
-p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
-}
-
-ul, ol, li > p {
- margin-top: 0;
-}
-
-pre {
- padding: 0;
- margin: 0;
-}
-
-span#author {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- font-size: 1.1em;
-}
-span#email {
-}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
-}
-
-div#footer {
- font-family: sans-serif;
- font-size: small;
- border-top: 2px solid silver;
- padding-top: 0.5em;
- margin-top: 4.0em;
-}
-div#footer-text {
- float: left;
- padding-bottom: 0.5em;
-}
-div#footer-badges {
- float: right;
- padding-bottom: 0.5em;
-}
-
-div#preamble {
- margin-top: 1.5em;
- margin-bottom: 1.5em;
-}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
-div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
-div.admonitionblock {
- margin-top: 1.0em;
- margin-bottom: 1.5em;
-}
-div.admonitionblock {
- margin-top: 2.0em;
- margin-bottom: 2.0em;
- margin-right: 10%;
- color: #606060;
-}
-
-div.content { /* Block element content. */
- padding: 0;
-}
-
-/* Block element titles. */
-div.title, caption.title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- text-align: left;
- margin-top: 1.0em;
- margin-bottom: 0.5em;
-}
-div.title + * {
- margin-top: 0;
-}
-
-td div.title:first-child {
- margin-top: 0.0em;
-}
-div.content div.title:first-child {
- margin-top: 0.0em;
-}
-div.content + div.title {
- margin-top: 0.0em;
-}
-
-div.sidebarblock > div.content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-
-div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock, div.verseblock {
- padding-left: 1.0em;
- margin-left: 1.0em;
- margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
-}
-
-div.quoteblock > div.attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock > div.content {
- white-space: pre;
-}
-div.verseblock > div.attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
-div.verseblock + div.attribution {
- text-align: left;
-}
-
-div.admonitionblock .icon {
- vertical-align: top;
- font-size: 1.1em;
- font-weight: bold;
- text-decoration: underline;
- color: #527bbd;
- padding-right: 0.5em;
-}
-div.admonitionblock td.content {
- padding-left: 0.5em;
- border-left: 3px solid #dddddd;
-}
-
-div.exampleblock > div.content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
-a.image:visited { color: white; }
-
-dl {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-dt {
- margin-top: 0.5em;
- margin-bottom: 0;
- font-style: normal;
- color: navy;
-}
-dd > *:first-child {
- margin-top: 0.1em;
-}
-
-ul, ol {
- list-style-position: outside;
-}
-ol.arabic {
- list-style-type: decimal;
-}
-ol.loweralpha {
- list-style-type: lower-alpha;
-}
-ol.upperalpha {
- list-style-type: upper-alpha;
-}
-ol.lowerroman {
- list-style-type: lower-roman;
-}
-ol.upperroman {
- list-style-type: upper-roman;
-}
-
-div.compact ul, div.compact ol,
-div.compact p, div.compact p,
-div.compact div, div.compact div {
- margin-top: 0.1em;
- margin-bottom: 0.1em;
-}
-
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
-tfoot {
- font-weight: bold;
-}
-td > div.verse {
- white-space: pre;
-}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
-
-div.hdlist {
- margin-top: 0.8em;
- margin-bottom: 0.8em;
-}
-div.hdlist tr {
- padding-bottom: 15px;
-}
-dt.hdlist1.strong, td.hdlist1.strong {
- font-weight: bold;
-}
-td.hdlist1 {
- vertical-align: top;
- font-style: normal;
- padding-right: 0.8em;
- color: navy;
-}
-td.hdlist2 {
- vertical-align: top;
-}
-div.hdlist.compact tr {
- margin: 0;
- padding-bottom: 0;
-}
-
-.comment {
- background: yellow;
-}
-
-.footnote, .footnoteref {
- font-size: 0.8em;
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
-}
-
-#footnotes {
- margin: 20px 0 20px 0;
- padding: 7px 0 0 0;
-}
-
-#footnotes div.footnote {
- margin: 0 0 5px 0;
-}
-
-#footnotes hr {
- border: none;
- border-top: 1px solid silver;
- height: 1px;
- text-align: left;
- margin-left: 0;
- width: 20%;
- min-width: 100px;
-}
-
-
-@media print {
- div#footer-badges { display: none; }
-}
-
-div#toc {
- margin-bottom: 2.5em;
-}
-
-div#toctitle {
- color: #527bbd;
- font-family: sans-serif;
- font-size: 1.1em;
- font-weight: bold;
- margin-top: 1.0em;
- margin-bottom: 0.1em;
-}
-
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
- margin-top: 0;
- margin-bottom: 0;
-}
-div.toclevel2 {
- margin-left: 2em;
- font-size: 0.9em;
-}
-div.toclevel3 {
- margin-left: 4em;
- font-size: 0.9em;
-}
-div.toclevel4 {
- margin-left: 6em;
- font-size: 0.9em;
-}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
-}
-h2 {
- border-style: none;
-}
-div.sectionbody {
- margin-left: 5%;
-}
-
-@media print {
- div#toc { display: none; }
-}
-
-/* Workarounds for IE6's broken and incomplete CSS2. */
-
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
-}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
- font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
-}
-
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
-}
-
-div.quoteblock-attribution {
- padding-top: 0.5em;
- text-align: right;
-}
-
-div.verseblock-content {
- white-space: pre;
-}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
-}
-
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
-}
-
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
-</style>
-<script type="text/javascript">
-/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
-var asciidoc = { // Namespace.
-
-/////////////////////////////////////////////////////////////////////
-// Table Of Contents generator
-/////////////////////////////////////////////////////////////////////
-
-/* Author: Mihai Bazon, September 2002
- * http://students.infoiasi.ro/~mishoo
- *
- * Table Of Content generator
- * Version: 0.4
- *
- * Feel free to use this script under the terms of the GNU General Public
- * License, as long as you do not remove or alter this notice.
- */
-
- /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, 2006, 2009. License: GPL */
-
-// toclevels = 1..4.
-toc: function (toclevels) {
-
- function getText(el) {
- var text = "";
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
- text += i.data;
- else if (i.firstChild != null)
- text += getText(i);
- }
- return text;
- }
-
- function TocEntry(el, text, toclevel) {
- this.element = el;
- this.text = text;
- this.toclevel = toclevel;
- }
-
- function tocEntries(el, toclevels) {
- var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
- // Function that scans the DOM tree for header elements (the DOM2
- // nodeIterator API would be a better technique but not supported by all
- // browsers).
- var iterate = function (el) {
- for (var i = el.firstChild; i != null; i = i.nextSibling) {
- if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
- var mo = re.exec(i.tagName);
- if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
- result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
- }
- iterate(i);
- }
- }
- }
- iterate(el);
- return result;
- }
-
- var toc = document.getElementById("toc");
- var entries = tocEntries(document.getElementById("content"), toclevels);
- for (var i = 0; i < entries.length; ++i) {
- var entry = entries[i];
- if (entry.element.id == "")
- entry.element.id = "_toc_" + i;
- var a = document.createElement("a");
- a.href = "#" + entry.element.id;
- a.appendChild(document.createTextNode(entry.text));
- var div = document.createElement("div");
- div.appendChild(a);
- div.className = "toclevel" + entry.toclevel;
- toc.appendChild(div);
- }
- if (entries.length == 0)
- toc.parentNode.removeChild(toc);
-},
-
-
-/////////////////////////////////////////////////////////////////////
-// Footnotes generator
-/////////////////////////////////////////////////////////////////////
-
-/* Based on footnote generation code from:
- * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
- */
-
-footnotes: function () {
- var cont = document.getElementById("content");
- var noteholder = document.getElementById("footnotes");
- var spans = cont.getElementsByTagName("span");
- var refs = {};
- var n = 0;
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnote") {
- n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
- noteholder.innerHTML +=
- "<div class='footnote' id='_footnote_" + n + "'>" +
- "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
- n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- var id =spans[i].getAttribute("id");
- if (id != null) refs["#"+id] = n;
- }
- }
- if (n == 0)
- noteholder.parentNode.removeChild(noteholder);
- else {
- // Process footnoterefs.
- for (i=0; i<spans.length; i++) {
- if (spans[i].className == "footnoteref") {
- var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
- href = href.match(/#.*/)[0]; // Because IE return full URL.
- n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
- }
- }
- }
-}
-
-}
-/*]]>*/
-</script>
-</head>
-<body>
-<div id="header">
-<h1>
-zmq_version(3) Manual Page
-</h1>
-<h2>NAME</h2>
-<div class="sectionbody">
-<p>zmq_version -
- report 0MQ library version
-</p>
-</div>
-</div>
-<div id="content">
-<h2 id="_synopsis">SYNOPSIS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><strong>void zmq_version (int <em>*major</em>, int <em>*minor</em>, int <em>*patch</em>);</strong></p></div>
-</div>
-<h2 id="_description">DESCRIPTION</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>zmq_version()</em> function shall fill in the integer variables pointed to by
-the <em>major</em>, <em>minor</em> and <em>patch</em> arguments with the major, minor and patchlevel
-components of the ØMQ library version.</p></div>
-<div class="paragraph"><p>This functionality is intended for applications or language bindings
-dynamically linking to the ØMQ library that wish to determine the actual
-version of the ØMQ library they are using.</p></div>
-</div>
-<h2 id="_return_value">RETURN VALUE</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>There is no return value.</p></div>
-</div>
-<h2 id="_errors">ERRORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>No errors are defined.</p></div>
-</div>
-<h2 id="_example">EXAMPLE</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Printing out the version of the ØMQ library</div>
-<div class="content">
-<pre><tt>int major, minor, patch;
-zmq_version (&amp;major, &amp;minor, &amp;patch);
-printf ("Current 0MQ version is %d.%d.%d\n", major, minor, patch);</tt></pre>
-</div></div>
-</div>
-<h2 id="_see_also">SEE ALSO</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="zmq.html">zmq(7)</a></p></div>
-</div>
-<h2 id="_authors">AUTHORS</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The ØMQ documentation was written by Martin Sustrik &lt;<a href="mailto:sustrik@250bpm.com">sustrik@250bpm.com</a>&gt; and
-Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p></div>
-</div>
-</div>
-<div id="footnotes"><hr /></div>
-<div id="footer">
-<div id="footer-text">
-ØMQ 2.0.10<br />
-Last updated 2010-10-15 19:26:37 CEST
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/zmq_version.txt b/doc/zmq_version.txt
index 0ad3a55..eeb0b40 100644
--- a/doc/zmq_version.txt
+++ b/doc/zmq_version.txt
@@ -15,7 +15,7 @@ SYNOPSIS
DESCRIPTION
-----------
The _zmq_version()_ function shall fill in the integer variables pointed to by
-the 'major', 'minor' and 'patch' arguments with the major, minor and patchlevel
+the 'major', 'minor' and 'patch' arguments with the major, minor and patch level
components of the 0MQ library version.
This functionality is intended for applications or language bindings
@@ -49,5 +49,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
diff --git a/foreign/openpgm/libpgm-2-1-28~dfsg.tar.gz b/foreign/openpgm/libpgm-2-1-28~dfsg.tar.gz
deleted file mode 100644
index 5e2bfc1..0000000
--- a/foreign/openpgm/libpgm-2-1-28~dfsg.tar.gz
+++ /dev/null
Binary files differ
diff --git a/foreign/openpgm/libpgm-5.1.114~dfsg.tar.gz b/foreign/openpgm/libpgm-5.1.114~dfsg.tar.gz
new file mode 100644
index 0000000..80b1f65
--- /dev/null
+++ b/foreign/openpgm/libpgm-5.1.114~dfsg.tar.gz
Binary files differ
diff --git a/include/zmq.h b/include/zmq.h
index 1cb6c03..6cdb085 100644
--- a/include/zmq.h
+++ b/include/zmq.h
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -30,7 +31,7 @@ extern "C" {
#include "winsock2.h"
#endif
-/* Win32 needs special handling for DLL exports */
+/* Handle DSO symbol visibility */
#if defined _WIN32
# if defined DLL_EXPORT
# define ZMQ_EXPORT __declspec(dllexport)
@@ -38,7 +39,13 @@ extern "C" {
# define ZMQ_EXPORT __declspec(dllimport)
# endif
#else
-# define ZMQ_EXPORT
+# if defined __SUNPRO_C || defined __SUNPRO_CC
+# define ZMQ_EXPORT __global
+# elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER
+# define ZMQ_EXPORT __attribute__ ((visibility("default")))
+# else
+# define ZMQ_EXPORT
+# endif
#endif
/******************************************************************************/
@@ -47,8 +54,8 @@ extern "C" {
/* Version macros for compile-time API version detection */
#define ZMQ_VERSION_MAJOR 2
-#define ZMQ_VERSION_MINOR 0
-#define ZMQ_VERSION_PATCH 10
+#define ZMQ_VERSION_MINOR 1
+#define ZMQ_VERSION_PATCH 3
#define ZMQ_MAKE_VERSION(major, minor, patch) \
((major) * 10000 + (minor) * 100 + (patch))
@@ -62,7 +69,7 @@ ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch);
/* 0MQ errors. */
/******************************************************************************/
-/* A number random anough not to collide with different errno ranges on */
+/* A number random enough not to collide with different errno ranges on */
/* different OSes. The assumption is that error_t is at least 32-bit type. */
#define ZMQ_HAUSNUMERO 156384712
@@ -93,16 +100,16 @@ ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch);
#endif
/* Native 0MQ error codes. */
-#define EMTHREAD (ZMQ_HAUSNUMERO + 50)
#define EFSM (ZMQ_HAUSNUMERO + 51)
#define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 52)
#define ETERM (ZMQ_HAUSNUMERO + 53)
+#define EMTHREAD (ZMQ_HAUSNUMERO + 54)
/* This function retrieves the errno as it is known to 0MQ library. The goal */
/* of this function is to make the code 100% portable, including where 0MQ */
/* compiled with certain CRT library (on Windows) is linked to an */
/* application that uses different CRT library. */
-ZMQ_EXPORT int zmq_errno ();
+ZMQ_EXPORT int zmq_errno (void);
/* Resolves system errors and 0MQ errors to human-readable string. */
ZMQ_EXPORT const char *zmq_strerror (int errnum);
@@ -168,10 +175,14 @@ ZMQ_EXPORT int zmq_term (void *context);
#define ZMQ_SUB 2
#define ZMQ_REQ 3
#define ZMQ_REP 4
-#define ZMQ_XREQ 5
-#define ZMQ_XREP 6
+#define ZMQ_DEALER 5
+#define ZMQ_ROUTER 6
#define ZMQ_PULL 7
#define ZMQ_PUSH 8
+#define ZMQ_XPUB 9
+#define ZMQ_XSUB 10
+#define ZMQ_XREQ ZMQ_DEALER /* Old alias, remove in 3.x */
+#define ZMQ_XREP ZMQ_ROUTER /* Old alias, remove in 3.x */
#define ZMQ_UPSTREAM ZMQ_PULL /* Old alias, remove in 3.x */
#define ZMQ_DOWNSTREAM ZMQ_PUSH /* Old alias, remove in 3.x */
@@ -188,7 +199,15 @@ ZMQ_EXPORT int zmq_term (void *context);
#define ZMQ_SNDBUF 11
#define ZMQ_RCVBUF 12
#define ZMQ_RCVMORE 13
-
+#define ZMQ_FD 14
+#define ZMQ_EVENTS 15
+#define ZMQ_TYPE 16
+#define ZMQ_LINGER 17
+#define ZMQ_RECONNECT_IVL 18
+#define ZMQ_BACKLOG 19
+#define ZMQ_RECOVERY_IVL_MSEC 20 /* opt. recovery time, reconcile in 3.x */
+#define ZMQ_RECONNECT_IVL_MAX 21
+
/* Send/recv options. */
#define ZMQ_NOBLOCK 1
#define ZMQ_SNDMORE 2
@@ -227,7 +246,7 @@ typedef struct
ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);
/******************************************************************************/
-/* Devices - Experimental. */
+/* Built-in devices */
/******************************************************************************/
#define ZMQ_STREAMER 1
diff --git a/include/zmq.hpp b/include/zmq.hpp
index 86ffff6..d73c672 100644
--- a/include/zmq.hpp
+++ b/include/zmq.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,8 +23,8 @@
#include "zmq.h"
-#include <assert.h>
-#include <string.h>
+#include <cassert>
+#include <cstring>
#include <exception>
namespace zmq
@@ -43,6 +44,11 @@ namespace zmq
return zmq_strerror (errnum);
}
+ int num () const
+ {
+ return errnum;
+ }
+
private:
int errnum;
@@ -63,6 +69,11 @@ namespace zmq
throw error_t ();
}
+ inline void version (int *major_, int *minor_, int *patch_)
+ {
+ zmq_version (major_, minor_, patch_);
+ }
+
class message_t : private zmq_msg_t
{
friend class socket_t;
@@ -94,8 +105,7 @@ namespace zmq
inline ~message_t ()
{
int rc = zmq_msg_close (this);
- if (rc != 0)
- throw error_t ();
+ assert (rc == 0);
}
inline void rebuild ()
@@ -180,6 +190,14 @@ namespace zmq
assert (rc == 0);
}
+ // Be careful with this, it's probably only useful for
+ // using the C api together with an existing C++ api.
+ // Normally you should never need to use this.
+ inline operator void* ()
+ {
+ return ptr;
+ }
+
private:
void *ptr;
@@ -201,9 +219,7 @@ namespace zmq
inline ~socket_t ()
{
- int rc = zmq_close (ptr);
- if (rc != 0)
- throw error_t ();
+ close();
}
inline operator void* ()
@@ -211,6 +227,17 @@ namespace zmq
return ptr;
}
+ inline void close()
+ {
+ if(ptr == NULL)
+ // already closed
+ return ;
+ int rc = zmq_close (ptr);
+ if (rc != 0)
+ throw error_t ();
+ ptr = 0 ;
+ }
+
inline void setsockopt (int option_, const void *optval_,
size_t optvallen_)
{
diff --git a/include/zmq_utils.h b/include/zmq_utils.h
index 5b78e10..6d8a458 100644
--- a/include/zmq_utils.h
+++ b/include/zmq_utils.h
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -24,7 +25,7 @@
extern "C" {
#endif
-/* Win32 needs special handling for DLL exports */
+/* Handle DSO symbol visibility */
#if defined _WIN32
# if defined DLL_EXPORT
# define ZMQ_EXPORT __declspec(dllexport)
@@ -32,14 +33,20 @@ extern "C" {
# define ZMQ_EXPORT __declspec(dllimport)
# endif
#else
-# define ZMQ_EXPORT
+# if defined __SUNPRO_C || defined __SUNPRO_CC
+# define ZMQ_EXPORT __global
+# elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER
+# define ZMQ_EXPORT __attribute__ ((visibility("default")))
+# else
+# define ZMQ_EXPORT
+# endif
#endif
/* Helper functions are used by perf tests so that they don't have to care */
/* about minutiae of time-related functions on different OS platforms. */
/* Starts the stopwatch. Returns the handle to the watch. */
-ZMQ_EXPORT void *zmq_stopwatch_start ();
+ZMQ_EXPORT void *zmq_stopwatch_start (void);
/* Stops the stopwatch. Returns the number of microseconds elapsed since */
/* the stopwatch was started. */
diff --git a/perf/Makefile.in b/perf/Makefile.in
index 1a9e82c..85b45cc 100644
--- a/perf/Makefile.in
+++ b/perf/Makefile.in
@@ -43,7 +43,8 @@ am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
$(top_srcdir)/config/ltoptions.m4 \
$(top_srcdir)/config/ltsugar.m4 \
$(top_srcdir)/config/ltversion.m4 \
- $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.in
+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -54,6 +55,9 @@ PROGRAMS = $(noinst_PROGRAMS)
am_local_lat_OBJECTS = local_lat.$(OBJEXT)
local_lat_OBJECTS = $(am_local_lat_OBJECTS)
local_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
am_local_thr_OBJECTS = local_thr.$(OBJEXT)
local_thr_OBJECTS = $(am_local_thr_OBJECTS)
local_thr_DEPENDENCIES = $(top_builddir)/src/libzmq.la
@@ -69,13 +73,26 @@ am__depfiles_maybe = depfiles
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(local_lat_SOURCES) $(local_thr_SOURCES) \
$(remote_lat_SOURCES) $(remote_thr_SOURCES)
DIST_SOURCES = $(local_lat_SOURCES) $(local_thr_SOURCES) \
@@ -85,8 +102,10 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
+ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -112,8 +131,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -125,6 +142,7 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@
LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
LIPO = @LIPO@
@@ -147,13 +165,13 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
+XMLTO = @XMLTO@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -161,6 +179,8 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@
+ac_zmq_have_xmlto = @ac_zmq_have_xmlto@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -178,12 +198,6 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
-have_asciidoc = @have_asciidoc@
-have_gzip = @have_gzip@
-have_perl = @have_perl@
-have_pkg_config = @have_pkg_config@
-have_python = @have_python@
-have_xmlto = @have_xmlto@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -193,7 +207,6 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-inttypes = @inttypes@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
@@ -204,13 +217,14 @@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pgm_basename = @pgm_basename@
+pgm_srcdir = @pgm_srcdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
-stdint = @stdint@
+subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
@@ -270,16 +284,16 @@ clean-noinstPROGRAMS:
rm -f $$list
local_lat$(EXEEXT): $(local_lat_OBJECTS) $(local_lat_DEPENDENCIES)
@rm -f local_lat$(EXEEXT)
- $(CXXLINK) $(local_lat_OBJECTS) $(local_lat_LDADD) $(LIBS)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_lat_OBJECTS) $(local_lat_LDADD) $(LIBS)
local_thr$(EXEEXT): $(local_thr_OBJECTS) $(local_thr_DEPENDENCIES)
@rm -f local_thr$(EXEEXT)
- $(CXXLINK) $(local_thr_OBJECTS) $(local_thr_LDADD) $(LIBS)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_thr_OBJECTS) $(local_thr_LDADD) $(LIBS)
remote_lat$(EXEEXT): $(remote_lat_OBJECTS) $(remote_lat_DEPENDENCIES)
@rm -f remote_lat$(EXEEXT)
- $(CXXLINK) $(remote_lat_OBJECTS) $(remote_lat_LDADD) $(LIBS)
+ $(AM_V_CXXLD)$(CXXLINK) $(remote_lat_OBJECTS) $(remote_lat_LDADD) $(LIBS)
remote_thr$(EXEEXT): $(remote_thr_OBJECTS) $(remote_thr_DEPENDENCIES)
@rm -f remote_thr$(EXEEXT)
- $(CXXLINK) $(remote_thr_OBJECTS) $(remote_thr_LDADD) $(LIBS)
+ $(AM_V_CXXLD)$(CXXLINK) $(remote_thr_OBJECTS) $(remote_thr_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -293,22 +307,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_thr.Po@am__quote@
.cpp.o:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
diff --git a/perf/local_lat.cpp b/perf/local_lat.cpp
index 4db756d..8d51662 100644
--- a/perf/local_lat.cpp
+++ b/perf/local_lat.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/perf/local_thr.cpp b/perf/local_thr.cpp
index 016826b..0dea8c6 100644
--- a/perf/local_thr.cpp
+++ b/perf/local_thr.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/perf/remote_lat.cpp b/perf/remote_lat.cpp
index 37535e6..f353ed6 100644
--- a/perf/remote_lat.cpp
+++ b/perf/remote_lat.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/perf/remote_thr.cpp b/perf/remote_thr.cpp
index 1e69601..78b8f72 100644
--- a/perf/remote_thr.cpp
+++ b/perf/remote_thr.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -21,6 +22,7 @@
#include "../include/zmq_utils.h"
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
int main (int argc, char *argv [])
{
@@ -64,11 +66,16 @@ int main (int argc, char *argv [])
}
for (i = 0; i != message_count; i++) {
+
rc = zmq_msg_init_size (&msg, message_size);
if (rc != 0) {
printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno));
return -1;
}
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (zmq_msg_data (&msg), 0, message_size);
+#endif
+
rc = zmq_send (s, &msg, 0);
if (rc != 0) {
printf ("error in zmq_send: %s\n", zmq_strerror (errno));
@@ -81,8 +88,6 @@ int main (int argc, char *argv [])
}
}
- zmq_sleep (10);
-
rc = zmq_close (s);
if (rc != 0) {
printf ("error in zmq_close: %s\n", zmq_strerror (errno));
diff --git a/src/Makefile.am b/src/Makefile.am
index 19a80d0..ce20225 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,82 +5,41 @@ pkgconfig_DATA = libzmq.pc
include_HEADERS = ../include/zmq.h ../include/zmq.hpp ../include/zmq_utils.h
-if BUILD_PGM
-pgm_sources = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/time.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getifaddrs.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnodeaddr.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoaddr.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoname.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/nametoindex.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/inet_network.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/md5.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/gsi.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/tsi.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/signal.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/txwi.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/rxwi.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/transport.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/source.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/receiver.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/recv.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/pgm.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/net.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/rate_control.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/async.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/checksum.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/reed_solomon.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/glib-compat.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/backtrace.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/log.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/sockaddr.c \
- ../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c
-
-../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/version_generator.py
- python ../foreign/openpgm/@pgm_basename@/openpgm/pgm/version_generator.py > $@
-
-../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_generator.pl
- perl ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_generator.pl > $@
-endif
-
-nodist_libzmq_la_SOURCES = $(pgm_sources)
-
-libzmq_la_SOURCES = app_thread.hpp \
+libzmq_la_SOURCES = \
+ array.hpp \
atomic_counter.hpp \
atomic_ptr.hpp \
blob.hpp \
+ clock.hpp \
command.hpp \
config.hpp \
+ connect_session.hpp \
ctx.hpp \
decoder.hpp \
+ device.hpp \
devpoll.hpp \
- push.hpp \
+ dist.hpp \
encoder.hpp \
epoll.hpp \
err.hpp \
fd.hpp \
- forwarder.hpp \
fq.hpp \
i_inout.hpp \
io_object.hpp \
io_thread.hpp \
ip.hpp \
- i_endpoint.hpp \
i_engine.hpp \
i_poll_events.hpp \
kqueue.hpp \
lb.hpp \
likely.hpp \
+ mailbox.hpp \
msg_content.hpp \
- msg_store.hpp \
mutex.hpp \
+ named_session.hpp \
object.hpp \
options.hpp \
- owned.hpp \
+ own.hpp \
pgm_receiver.hpp \
pgm_sender.hpp \
pgm_socket.hpp \
@@ -88,86 +47,93 @@ libzmq_la_SOURCES = app_thread.hpp \
platform.hpp \
poll.hpp \
poller.hpp \
+ poller_base.hpp \
pair.hpp \
- prefix_tree.hpp \
pub.hpp \
- queue.hpp \
+ pull.hpp \
+ push.hpp \
+ reaper.hpp \
rep.hpp \
req.hpp \
select.hpp \
+ semaphore.hpp \
session.hpp \
- signaler.hpp \
socket_base.hpp \
stdint.hpp \
- streamer.hpp \
sub.hpp \
+ swap.hpp \
tcp_connecter.hpp \
tcp_listener.hpp \
tcp_socket.hpp \
thread.hpp \
- pull.hpp \
+ transient_session.hpp \
+ trie.hpp \
uuid.hpp \
windows.hpp \
wire.hpp \
+ xpub.hpp \
xrep.hpp \
xreq.hpp \
- yarray.hpp \
- yarray_item.hpp \
+ xsub.hpp \
ypipe.hpp \
yqueue.hpp \
zmq_connecter.hpp \
- zmq_decoder.hpp \
- zmq_encoder.hpp \
zmq_engine.hpp \
zmq_init.hpp \
zmq_listener.hpp \
- app_thread.cpp \
+ clock.cpp \
command.cpp \
ctx.cpp \
+ connect_session.cpp \
+ decoder.cpp \
+ device.cpp \
devpoll.cpp \
- push.cpp \
+ dist.cpp \
+ encoder.cpp \
epoll.cpp \
err.cpp \
- forwarder.cpp \
fq.cpp \
io_object.cpp \
io_thread.cpp \
ip.cpp \
kqueue.cpp \
lb.cpp \
- msg_store.cpp \
+ mailbox.cpp \
+ named_session.cpp \
object.cpp \
options.cpp \
- owned.cpp \
+ own.cpp \
+ pair.cpp \
pgm_receiver.cpp \
pgm_sender.cpp \
pgm_socket.cpp \
- pair.cpp \
- prefix_tree.cpp \
pipe.cpp \
poll.cpp \
+ poller_base.cpp \
+ pull.cpp \
+ push.cpp \
+ reaper.cpp \
pub.cpp \
- queue.cpp \
rep.cpp \
req.cpp \
select.cpp \
session.cpp \
- signaler.cpp \
socket_base.cpp \
- streamer.cpp \
sub.cpp \
+ swap.cpp \
tcp_connecter.cpp \
tcp_listener.cpp \
tcp_socket.cpp \
thread.cpp \
- pull.cpp \
+ transient_session.cpp \
+ trie.cpp \
uuid.cpp \
+ xpub.cpp \
xrep.cpp \
xreq.cpp \
+ xsub.cpp \
zmq.cpp \
zmq_connecter.cpp \
- zmq_decoder.cpp \
- zmq_encoder.cpp \
zmq_engine.cpp \
zmq_init.cpp \
zmq_listener.cpp
@@ -178,69 +144,12 @@ else
libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
endif
-if BUILD_PGM
-
-if ON_MINGW
-libpgm_diff_flags = \
- -D_WIN32_WINNT=0x0501 \
- -DCONFIG_16BIT_CHECKSUM \
- -DCONFIG_HAVE_IFR_NETMASK \
- -DCONFIG_BIND_INADDR_ANY \
- -DCONFIG_GALOIS_MUL_LUT \
- -DIF_NAMESIZE=256 \
- -DPGM_GNUC_INTERNAL=G_GNUC_INTERNAL \
- -DCONFIG_HAVE_WSACMSGHDR \
- -DGETTEXT_PACKAGE='"pgm"' \
- -DG_LOG_DOMAIN='"Pgm"'
-
-else
-libpgm_diff_flags = \
- -D__need_IOV_MAX \
- -DCONFIG_16BIT_CHECKSUM \
- -DCONFIG_HAVE_PSELECT \
- -DCONFIG_HAVE_POLL \
- -DCONFIG_HAVE_PPOLL \
- -DCONFIG_HAVE_EPOLL \
- -DCONFIG_HAVE_CLOCK_GETTIME \
- -DCONFIG_HAVE_CLOCK_NANOSLEEP \
- -DCONFIG_HAVE_NANOSLEEP \
- -DCONFIG_HAVE_USLEEP \
- -DCONFIG_HAVE_RTC \
- -DCONFIG_HAVE_TSC \
- -DCONFIG_HAVE_IFR_NETMASK \
- -DCONFIG_HAVE_GETIFADDRS \
- -DCONFIG_HAVE_GETHOSTBYNAME2 \
- -DCONFIG_HAVE_GETPROTOBYNAME_R \
- -DCONFIG_BIND_INADDR_ANY \
- -DCONFIG_GALOIS_MUL_LUT \
- -DCONFIG_HAVE_MCAST_JOIN \
- -DCONFIG_HAVE_IP_MREQN \
- -DCONFIG_HAVE_SPRINTF_GROUPING \
- -DCONFIG_HAVE_HPET \
- -DPGM_GNUC_INTERNAL=G_GNUC_INTERNAL \
- -DGETTEXT_PACKAGE='"pgm"' \
- -DG_LOG_DOMAIN='"Pgm"'
-endif
-
-libzmq_la_CFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/include/ @LIBZMQ_EXTRA_CXXFLAGS@ \
- -Wall \
- -pedantic \
- -std=gnu99 \
- -fno-strict-aliasing \
- --param max-inline-insns-single=600 \
- -D_REENTRANT \
- -D_GNU_SOURCE \
- ${libpgm_diff_flags}
-
-libzmq_la_CXXFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/include/ \
- @LIBZMQ_EXTRA_CXXFLAGS@
-endif
-
-if BUILD_NO_PGM
libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
+
+if BUILD_PGM
+libzmq_la_CPPFLAGS = -I$(top_srcdir)/@pgm_srcdir@/include/
+libzmq_la_LIBADD = $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la
endif
dist-hook:
-rm $(distdir)/platform.hpp
-
-
diff --git a/src/Makefile.in b/src/Makefile.in
index 943e178..4202973 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -45,7 +45,8 @@ am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
$(top_srcdir)/config/ltoptions.m4 \
$(top_srcdir)/config/ltsugar.m4 \
$(top_srcdir)/config/ltversion.m4 \
- $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.in
+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -76,78 +77,80 @@ am__base_list = \
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
"$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
-libzmq_la_LIBADD =
-am_libzmq_la_OBJECTS = libzmq_la-app_thread.lo libzmq_la-command.lo \
- libzmq_la-ctx.lo libzmq_la-devpoll.lo libzmq_la-push.lo \
- libzmq_la-epoll.lo libzmq_la-err.lo libzmq_la-forwarder.lo \
- libzmq_la-fq.lo libzmq_la-io_object.lo libzmq_la-io_thread.lo \
- libzmq_la-ip.lo libzmq_la-kqueue.lo libzmq_la-lb.lo \
- libzmq_la-msg_store.lo libzmq_la-object.lo \
- libzmq_la-options.lo libzmq_la-owned.lo \
+@BUILD_PGM_TRUE@libzmq_la_DEPENDENCIES = \
+@BUILD_PGM_TRUE@ $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la
+am_libzmq_la_OBJECTS = libzmq_la-clock.lo libzmq_la-command.lo \
+ libzmq_la-ctx.lo libzmq_la-connect_session.lo \
+ libzmq_la-decoder.lo libzmq_la-device.lo libzmq_la-devpoll.lo \
+ libzmq_la-dist.lo libzmq_la-encoder.lo libzmq_la-epoll.lo \
+ libzmq_la-err.lo libzmq_la-fq.lo libzmq_la-io_object.lo \
+ libzmq_la-io_thread.lo libzmq_la-ip.lo libzmq_la-kqueue.lo \
+ libzmq_la-lb.lo libzmq_la-mailbox.lo \
+ libzmq_la-named_session.lo libzmq_la-object.lo \
+ libzmq_la-options.lo libzmq_la-own.lo libzmq_la-pair.lo \
libzmq_la-pgm_receiver.lo libzmq_la-pgm_sender.lo \
- libzmq_la-pgm_socket.lo libzmq_la-pair.lo \
- libzmq_la-prefix_tree.lo libzmq_la-pipe.lo libzmq_la-poll.lo \
- libzmq_la-pub.lo libzmq_la-queue.lo libzmq_la-rep.lo \
+ libzmq_la-pgm_socket.lo libzmq_la-pipe.lo libzmq_la-poll.lo \
+ libzmq_la-poller_base.lo libzmq_la-pull.lo libzmq_la-push.lo \
+ libzmq_la-reaper.lo libzmq_la-pub.lo libzmq_la-rep.lo \
libzmq_la-req.lo libzmq_la-select.lo libzmq_la-session.lo \
- libzmq_la-signaler.lo libzmq_la-socket_base.lo \
- libzmq_la-streamer.lo libzmq_la-sub.lo \
+ libzmq_la-socket_base.lo libzmq_la-sub.lo libzmq_la-swap.lo \
libzmq_la-tcp_connecter.lo libzmq_la-tcp_listener.lo \
- libzmq_la-tcp_socket.lo libzmq_la-thread.lo libzmq_la-pull.lo \
- libzmq_la-uuid.lo libzmq_la-xrep.lo libzmq_la-xreq.lo \
- libzmq_la-zmq.lo libzmq_la-zmq_connecter.lo \
- libzmq_la-zmq_decoder.lo libzmq_la-zmq_encoder.lo \
- libzmq_la-zmq_engine.lo libzmq_la-zmq_init.lo \
- libzmq_la-zmq_listener.lo
-@BUILD_PGM_TRUE@am__objects_1 = libzmq_la-packet.lo libzmq_la-time.lo \
-@BUILD_PGM_TRUE@ libzmq_la-if.lo libzmq_la-getifaddrs.lo \
-@BUILD_PGM_TRUE@ libzmq_la-getnodeaddr.lo \
-@BUILD_PGM_TRUE@ libzmq_la-indextoaddr.lo \
-@BUILD_PGM_TRUE@ libzmq_la-indextoname.lo \
-@BUILD_PGM_TRUE@ libzmq_la-nametoindex.lo \
-@BUILD_PGM_TRUE@ libzmq_la-inet_network.lo libzmq_la-md5.lo \
-@BUILD_PGM_TRUE@ libzmq_la-gsi.lo libzmq_la-tsi.lo \
-@BUILD_PGM_TRUE@ libzmq_la-signal.lo libzmq_la-txwi.lo \
-@BUILD_PGM_TRUE@ libzmq_la-rxwi.lo libzmq_la-transport.lo \
-@BUILD_PGM_TRUE@ libzmq_la-source.lo libzmq_la-receiver.lo \
-@BUILD_PGM_TRUE@ libzmq_la-recv.lo libzmq_la-pgm.lo \
-@BUILD_PGM_TRUE@ libzmq_la-timer.lo libzmq_la-net.lo \
-@BUILD_PGM_TRUE@ libzmq_la-rate_control.lo libzmq_la-async.lo \
-@BUILD_PGM_TRUE@ libzmq_la-checksum.lo \
-@BUILD_PGM_TRUE@ libzmq_la-reed_solomon.lo \
-@BUILD_PGM_TRUE@ libzmq_la-galois_tables.lo \
-@BUILD_PGM_TRUE@ libzmq_la-wsastrerror.lo \
-@BUILD_PGM_TRUE@ libzmq_la-glib-compat.lo \
-@BUILD_PGM_TRUE@ libzmq_la-backtrace.lo libzmq_la-log.lo \
-@BUILD_PGM_TRUE@ libzmq_la-sockaddr.lo libzmq_la-version.lo
-nodist_libzmq_la_OBJECTS = $(am__objects_1)
-libzmq_la_OBJECTS = $(am_libzmq_la_OBJECTS) \
- $(nodist_libzmq_la_OBJECTS)
-libzmq_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ libzmq_la-tcp_socket.lo libzmq_la-thread.lo \
+ libzmq_la-transient_session.lo libzmq_la-trie.lo \
+ libzmq_la-uuid.lo libzmq_la-xpub.lo libzmq_la-xrep.lo \
+ libzmq_la-xreq.lo libzmq_la-xsub.lo libzmq_la-zmq.lo \
+ libzmq_la-zmq_connecter.lo libzmq_la-zmq_engine.lo \
+ libzmq_la-zmq_init.lo libzmq_la-zmq_listener.lo
+libzmq_la_OBJECTS = $(am_libzmq_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libzmq_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libzmq_la_CXXFLAGS) \
$(CXXFLAGS) $(libzmq_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = $(libzmq_la_SOURCES) $(nodist_libzmq_la_SOURCES)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libzmq_la_SOURCES)
DIST_SOURCES = $(libzmq_la_SOURCES)
DATA = $(pkgconfig_DATA)
HEADERS = $(include_HEADERS)
@@ -156,8 +159,10 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
+ASCIIDOC = @ASCIIDOC@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -183,8 +188,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -196,6 +199,7 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@
LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
LIPO = @LIPO@
@@ -218,13 +222,13 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
+XMLTO = @XMLTO@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -232,6 +236,8 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@
+ac_zmq_have_xmlto = @ac_zmq_have_xmlto@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -249,12 +255,6 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
-have_asciidoc = @have_asciidoc@
-have_gzip = @have_gzip@
-have_perl = @have_perl@
-have_pkg_config = @have_pkg_config@
-have_python = @have_python@
-have_xmlto = @have_xmlto@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -264,7 +264,6 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-inttypes = @inttypes@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
@@ -275,13 +274,14 @@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pgm_basename = @pgm_basename@
+pgm_srcdir = @pgm_srcdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
-stdint = @stdint@
+subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
@@ -291,73 +291,41 @@ lib_LTLIBRARIES = libzmq.la
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libzmq.pc
include_HEADERS = ../include/zmq.h ../include/zmq.hpp ../include/zmq_utils.h
-@BUILD_PGM_TRUE@pgm_sources = ../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/time.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getifaddrs.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnodeaddr.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoaddr.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoname.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/nametoindex.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/inet_network.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/md5.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/gsi.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/tsi.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/signal.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/txwi.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/rxwi.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/transport.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/source.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/receiver.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/recv.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/pgm.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/net.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/rate_control.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/async.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/checksum.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/reed_solomon.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/glib-compat.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/backtrace.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/log.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/sockaddr.c \
-@BUILD_PGM_TRUE@ ../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c
-
-nodist_libzmq_la_SOURCES = $(pgm_sources)
-libzmq_la_SOURCES = app_thread.hpp \
+libzmq_la_SOURCES = \
+ array.hpp \
atomic_counter.hpp \
atomic_ptr.hpp \
blob.hpp \
+ clock.hpp \
command.hpp \
config.hpp \
+ connect_session.hpp \
ctx.hpp \
decoder.hpp \
+ device.hpp \
devpoll.hpp \
- push.hpp \
+ dist.hpp \
encoder.hpp \
epoll.hpp \
err.hpp \
fd.hpp \
- forwarder.hpp \
fq.hpp \
i_inout.hpp \
io_object.hpp \
io_thread.hpp \
ip.hpp \
- i_endpoint.hpp \
i_engine.hpp \
i_poll_events.hpp \
kqueue.hpp \
lb.hpp \
likely.hpp \
+ mailbox.hpp \
msg_content.hpp \
- msg_store.hpp \
mutex.hpp \
+ named_session.hpp \
object.hpp \
options.hpp \
- owned.hpp \
+ own.hpp \
pgm_receiver.hpp \
pgm_sender.hpp \
pgm_socket.hpp \
@@ -365,150 +333,107 @@ libzmq_la_SOURCES = app_thread.hpp \
platform.hpp \
poll.hpp \
poller.hpp \
+ poller_base.hpp \
pair.hpp \
- prefix_tree.hpp \
pub.hpp \
- queue.hpp \
+ pull.hpp \
+ push.hpp \
+ reaper.hpp \
rep.hpp \
req.hpp \
select.hpp \
+ semaphore.hpp \
session.hpp \
- signaler.hpp \
socket_base.hpp \
stdint.hpp \
- streamer.hpp \
sub.hpp \
+ swap.hpp \
tcp_connecter.hpp \
tcp_listener.hpp \
tcp_socket.hpp \
thread.hpp \
- pull.hpp \
+ transient_session.hpp \
+ trie.hpp \
uuid.hpp \
windows.hpp \
wire.hpp \
+ xpub.hpp \
xrep.hpp \
xreq.hpp \
- yarray.hpp \
- yarray_item.hpp \
+ xsub.hpp \
ypipe.hpp \
yqueue.hpp \
zmq_connecter.hpp \
- zmq_decoder.hpp \
- zmq_encoder.hpp \
zmq_engine.hpp \
zmq_init.hpp \
zmq_listener.hpp \
- app_thread.cpp \
+ clock.cpp \
command.cpp \
ctx.cpp \
+ connect_session.cpp \
+ decoder.cpp \
+ device.cpp \
devpoll.cpp \
- push.cpp \
+ dist.cpp \
+ encoder.cpp \
epoll.cpp \
err.cpp \
- forwarder.cpp \
fq.cpp \
io_object.cpp \
io_thread.cpp \
ip.cpp \
kqueue.cpp \
lb.cpp \
- msg_store.cpp \
+ mailbox.cpp \
+ named_session.cpp \
object.cpp \
options.cpp \
- owned.cpp \
+ own.cpp \
+ pair.cpp \
pgm_receiver.cpp \
pgm_sender.cpp \
pgm_socket.cpp \
- pair.cpp \
- prefix_tree.cpp \
pipe.cpp \
poll.cpp \
+ poller_base.cpp \
+ pull.cpp \
+ push.cpp \
+ reaper.cpp \
pub.cpp \
- queue.cpp \
rep.cpp \
req.cpp \
select.cpp \
session.cpp \
- signaler.cpp \
socket_base.cpp \
- streamer.cpp \
sub.cpp \
+ swap.cpp \
tcp_connecter.cpp \
tcp_listener.cpp \
tcp_socket.cpp \
thread.cpp \
- pull.cpp \
+ transient_session.cpp \
+ trie.cpp \
uuid.cpp \
+ xpub.cpp \
xrep.cpp \
xreq.cpp \
+ xsub.cpp \
zmq.cpp \
zmq_connecter.cpp \
- zmq_decoder.cpp \
- zmq_encoder.cpp \
zmq_engine.cpp \
zmq_init.cpp \
zmq_listener.cpp
@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
@ON_MINGW_TRUE@libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@libpgm_diff_flags = \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -D__need_IOV_MAX \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_16BIT_CHECKSUM \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_PSELECT \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_POLL \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_PPOLL \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_EPOLL \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_CLOCK_GETTIME \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_CLOCK_NANOSLEEP \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_NANOSLEEP \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_USLEEP \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_RTC \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_TSC \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_IFR_NETMASK \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_GETIFADDRS \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_GETHOSTBYNAME2 \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_GETPROTOBYNAME_R \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_BIND_INADDR_ANY \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_GALOIS_MUL_LUT \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_MCAST_JOIN \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_IP_MREQN \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_SPRINTF_GROUPING \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DCONFIG_HAVE_HPET \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DPGM_GNUC_INTERNAL=G_GNUC_INTERNAL \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DGETTEXT_PACKAGE='"pgm"' \
-@BUILD_PGM_TRUE@@ON_MINGW_FALSE@ -DG_LOG_DOMAIN='"Pgm"'
-
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@libpgm_diff_flags = \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -D_WIN32_WINNT=0x0501 \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -DCONFIG_16BIT_CHECKSUM \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -DCONFIG_HAVE_IFR_NETMASK \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -DCONFIG_BIND_INADDR_ANY \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -DCONFIG_GALOIS_MUL_LUT \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -DIF_NAMESIZE=256 \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -DPGM_GNUC_INTERNAL=G_GNUC_INTERNAL \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -DCONFIG_HAVE_WSACMSGHDR \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -DGETTEXT_PACKAGE='"pgm"' \
-@BUILD_PGM_TRUE@@ON_MINGW_TRUE@ -DG_LOG_DOMAIN='"Pgm"'
-
-@BUILD_PGM_TRUE@libzmq_la_CFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/include/ @LIBZMQ_EXTRA_CXXFLAGS@ \
-@BUILD_PGM_TRUE@ -Wall \
-@BUILD_PGM_TRUE@ -pedantic \
-@BUILD_PGM_TRUE@ -std=gnu99 \
-@BUILD_PGM_TRUE@ -fno-strict-aliasing \
-@BUILD_PGM_TRUE@ --param max-inline-insns-single=600 \
-@BUILD_PGM_TRUE@ -D_REENTRANT \
-@BUILD_PGM_TRUE@ -D_GNU_SOURCE \
-@BUILD_PGM_TRUE@ ${libpgm_diff_flags}
-
-@BUILD_NO_PGM_TRUE@libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
-@BUILD_PGM_TRUE@libzmq_la_CXXFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/include/ \
-@BUILD_PGM_TRUE@ @LIBZMQ_EXTRA_CXXFLAGS@
-
+libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
+@BUILD_PGM_TRUE@libzmq_la_CPPFLAGS = -I$(top_srcdir)/@pgm_srcdir@/include/
+@BUILD_PGM_TRUE@libzmq_la_LIBADD = $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la
all: platform.hpp
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
-.SUFFIXES: .c .cpp .lo .o .obj
+.SUFFIXES: .cpp .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -590,7 +515,7 @@ clean-libLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
libzmq.la: $(libzmq_la_OBJECTS) $(libzmq_la_DEPENDENCIES)
- $(libzmq_la_LINK) -rpath $(libdir) $(libzmq_la_OBJECTS) $(libzmq_la_LIBADD) $(LIBS)
+ $(AM_V_CXXLD)$(libzmq_la_LINK) -rpath $(libdir) $(libzmq_la_OBJECTS) $(libzmq_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -598,712 +523,534 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-app_thread.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-async.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-backtrace.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-checksum.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-clock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-command.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-connect_session.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-ctx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-decoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-device.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-devpoll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-dist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-encoder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-epoll.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-err.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-forwarder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-fq.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-galois_tables.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-getifaddrs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-getnodeaddr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-glib-compat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-gsi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-if.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-indextoaddr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-indextoname.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-inet_network.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-io_object.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-io_thread.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-ip.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-kqueue.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-lb.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-log.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-md5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-msg_store.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-nametoindex.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-net.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-mailbox.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-named_session.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-object.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-options.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-owned.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-packet.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-own.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pair.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm_receiver.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm_sender.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm_socket.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pipe.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-poll.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-prefix_tree.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-poller_base.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pub.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pull.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-push.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-queue.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-rate_control.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-receiver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-recv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-reed_solomon.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-reaper.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-rep.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-req.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-rxwi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-select.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-session.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-signal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-signaler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-sockaddr.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-socket_base.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-source.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-streamer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-sub.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-swap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp_connecter.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp_listener.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp_socket.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-thread.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-time.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-timer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-transport.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tsi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-txwi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-transient_session.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-trie.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-uuid.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-version.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-wsastrerror.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xpub.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xrep.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xreq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xsub.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_connecter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_decoder.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_encoder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_engine.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_listener.Plo@am__quote@
-.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-libzmq_la-packet.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-packet.lo -MD -MP -MF $(DEPDIR)/libzmq_la-packet.Tpo -c -o libzmq_la-packet.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-packet.Tpo $(DEPDIR)/libzmq_la-packet.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c' object='libzmq_la-packet.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-packet.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/packet.c
-
-libzmq_la-time.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/time.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-time.lo -MD -MP -MF $(DEPDIR)/libzmq_la-time.Tpo -c -o libzmq_la-time.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/time.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/time.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-time.Tpo $(DEPDIR)/libzmq_la-time.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/time.c' object='libzmq_la-time.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-time.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/time.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/time.c
-
-libzmq_la-if.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-if.lo -MD -MP -MF $(DEPDIR)/libzmq_la-if.Tpo -c -o libzmq_la-if.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-if.Tpo $(DEPDIR)/libzmq_la-if.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c' object='libzmq_la-if.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-if.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/if.c
-
-libzmq_la-getifaddrs.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getifaddrs.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-getifaddrs.lo -MD -MP -MF $(DEPDIR)/libzmq_la-getifaddrs.Tpo -c -o libzmq_la-getifaddrs.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/getifaddrs.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/getifaddrs.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-getifaddrs.Tpo $(DEPDIR)/libzmq_la-getifaddrs.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/getifaddrs.c' object='libzmq_la-getifaddrs.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-getifaddrs.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/getifaddrs.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/getifaddrs.c
-
-libzmq_la-getnodeaddr.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnodeaddr.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-getnodeaddr.lo -MD -MP -MF $(DEPDIR)/libzmq_la-getnodeaddr.Tpo -c -o libzmq_la-getnodeaddr.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnodeaddr.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnodeaddr.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-getnodeaddr.Tpo $(DEPDIR)/libzmq_la-getnodeaddr.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnodeaddr.c' object='libzmq_la-getnodeaddr.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-getnodeaddr.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnodeaddr.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/getnodeaddr.c
-
-libzmq_la-indextoaddr.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoaddr.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-indextoaddr.lo -MD -MP -MF $(DEPDIR)/libzmq_la-indextoaddr.Tpo -c -o libzmq_la-indextoaddr.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoaddr.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoaddr.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-indextoaddr.Tpo $(DEPDIR)/libzmq_la-indextoaddr.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoaddr.c' object='libzmq_la-indextoaddr.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-indextoaddr.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoaddr.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoaddr.c
-
-libzmq_la-indextoname.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoname.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-indextoname.lo -MD -MP -MF $(DEPDIR)/libzmq_la-indextoname.Tpo -c -o libzmq_la-indextoname.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoname.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoname.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-indextoname.Tpo $(DEPDIR)/libzmq_la-indextoname.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoname.c' object='libzmq_la-indextoname.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-indextoname.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoname.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/indextoname.c
-
-libzmq_la-nametoindex.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/nametoindex.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-nametoindex.lo -MD -MP -MF $(DEPDIR)/libzmq_la-nametoindex.Tpo -c -o libzmq_la-nametoindex.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/nametoindex.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/nametoindex.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-nametoindex.Tpo $(DEPDIR)/libzmq_la-nametoindex.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/nametoindex.c' object='libzmq_la-nametoindex.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-nametoindex.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/nametoindex.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/nametoindex.c
-
-libzmq_la-inet_network.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/inet_network.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-inet_network.lo -MD -MP -MF $(DEPDIR)/libzmq_la-inet_network.Tpo -c -o libzmq_la-inet_network.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/inet_network.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/inet_network.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-inet_network.Tpo $(DEPDIR)/libzmq_la-inet_network.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/inet_network.c' object='libzmq_la-inet_network.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-inet_network.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/inet_network.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/inet_network.c
-
-libzmq_la-md5.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/md5.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-md5.lo -MD -MP -MF $(DEPDIR)/libzmq_la-md5.Tpo -c -o libzmq_la-md5.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/md5.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/md5.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-md5.Tpo $(DEPDIR)/libzmq_la-md5.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/md5.c' object='libzmq_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-md5.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/md5.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/md5.c
-
-libzmq_la-gsi.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/gsi.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-gsi.lo -MD -MP -MF $(DEPDIR)/libzmq_la-gsi.Tpo -c -o libzmq_la-gsi.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/gsi.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/gsi.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-gsi.Tpo $(DEPDIR)/libzmq_la-gsi.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/gsi.c' object='libzmq_la-gsi.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-gsi.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/gsi.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/gsi.c
-
-libzmq_la-tsi.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/tsi.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-tsi.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tsi.Tpo -c -o libzmq_la-tsi.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/tsi.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/tsi.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-tsi.Tpo $(DEPDIR)/libzmq_la-tsi.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/tsi.c' object='libzmq_la-tsi.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-tsi.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/tsi.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/tsi.c
-
-libzmq_la-signal.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/signal.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-signal.lo -MD -MP -MF $(DEPDIR)/libzmq_la-signal.Tpo -c -o libzmq_la-signal.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/signal.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/signal.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-signal.Tpo $(DEPDIR)/libzmq_la-signal.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/signal.c' object='libzmq_la-signal.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-signal.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/signal.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/signal.c
-
-libzmq_la-txwi.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/txwi.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-txwi.lo -MD -MP -MF $(DEPDIR)/libzmq_la-txwi.Tpo -c -o libzmq_la-txwi.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/txwi.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/txwi.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-txwi.Tpo $(DEPDIR)/libzmq_la-txwi.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/txwi.c' object='libzmq_la-txwi.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-txwi.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/txwi.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/txwi.c
-
-libzmq_la-rxwi.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/rxwi.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-rxwi.lo -MD -MP -MF $(DEPDIR)/libzmq_la-rxwi.Tpo -c -o libzmq_la-rxwi.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/rxwi.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/rxwi.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-rxwi.Tpo $(DEPDIR)/libzmq_la-rxwi.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/rxwi.c' object='libzmq_la-rxwi.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-rxwi.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/rxwi.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/rxwi.c
-
-libzmq_la-transport.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/transport.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-transport.lo -MD -MP -MF $(DEPDIR)/libzmq_la-transport.Tpo -c -o libzmq_la-transport.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/transport.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/transport.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-transport.Tpo $(DEPDIR)/libzmq_la-transport.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/transport.c' object='libzmq_la-transport.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-transport.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/transport.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/transport.c
-
-libzmq_la-source.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/source.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-source.lo -MD -MP -MF $(DEPDIR)/libzmq_la-source.Tpo -c -o libzmq_la-source.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/source.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/source.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-source.Tpo $(DEPDIR)/libzmq_la-source.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/source.c' object='libzmq_la-source.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-source.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/source.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/source.c
-
-libzmq_la-receiver.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/receiver.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-receiver.lo -MD -MP -MF $(DEPDIR)/libzmq_la-receiver.Tpo -c -o libzmq_la-receiver.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/receiver.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/receiver.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-receiver.Tpo $(DEPDIR)/libzmq_la-receiver.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/receiver.c' object='libzmq_la-receiver.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-receiver.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/receiver.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/receiver.c
-
-libzmq_la-recv.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/recv.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-recv.lo -MD -MP -MF $(DEPDIR)/libzmq_la-recv.Tpo -c -o libzmq_la-recv.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/recv.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/recv.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-recv.Tpo $(DEPDIR)/libzmq_la-recv.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/recv.c' object='libzmq_la-recv.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-recv.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/recv.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/recv.c
-
-libzmq_la-pgm.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/pgm.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-pgm.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm.Tpo -c -o libzmq_la-pgm.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/pgm.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/pgm.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-pgm.Tpo $(DEPDIR)/libzmq_la-pgm.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/pgm.c' object='libzmq_la-pgm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-pgm.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/pgm.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/pgm.c
-
-libzmq_la-timer.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-timer.lo -MD -MP -MF $(DEPDIR)/libzmq_la-timer.Tpo -c -o libzmq_la-timer.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-timer.Tpo $(DEPDIR)/libzmq_la-timer.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c' object='libzmq_la-timer.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-timer.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/timer.c
-
-libzmq_la-net.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/net.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-net.lo -MD -MP -MF $(DEPDIR)/libzmq_la-net.Tpo -c -o libzmq_la-net.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/net.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/net.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-net.Tpo $(DEPDIR)/libzmq_la-net.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/net.c' object='libzmq_la-net.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-net.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/net.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/net.c
-
-libzmq_la-rate_control.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/rate_control.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-rate_control.lo -MD -MP -MF $(DEPDIR)/libzmq_la-rate_control.Tpo -c -o libzmq_la-rate_control.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/rate_control.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/rate_control.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-rate_control.Tpo $(DEPDIR)/libzmq_la-rate_control.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/rate_control.c' object='libzmq_la-rate_control.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-rate_control.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/rate_control.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/rate_control.c
-
-libzmq_la-async.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/async.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-async.lo -MD -MP -MF $(DEPDIR)/libzmq_la-async.Tpo -c -o libzmq_la-async.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/async.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/async.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-async.Tpo $(DEPDIR)/libzmq_la-async.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/async.c' object='libzmq_la-async.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-async.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/async.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/async.c
-
-libzmq_la-checksum.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/checksum.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-checksum.lo -MD -MP -MF $(DEPDIR)/libzmq_la-checksum.Tpo -c -o libzmq_la-checksum.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/checksum.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/checksum.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-checksum.Tpo $(DEPDIR)/libzmq_la-checksum.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/checksum.c' object='libzmq_la-checksum.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-checksum.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/checksum.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/checksum.c
-
-libzmq_la-reed_solomon.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/reed_solomon.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-reed_solomon.lo -MD -MP -MF $(DEPDIR)/libzmq_la-reed_solomon.Tpo -c -o libzmq_la-reed_solomon.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/reed_solomon.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/reed_solomon.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-reed_solomon.Tpo $(DEPDIR)/libzmq_la-reed_solomon.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/reed_solomon.c' object='libzmq_la-reed_solomon.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-reed_solomon.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/reed_solomon.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/reed_solomon.c
-
-libzmq_la-galois_tables.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-galois_tables.lo -MD -MP -MF $(DEPDIR)/libzmq_la-galois_tables.Tpo -c -o libzmq_la-galois_tables.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-galois_tables.Tpo $(DEPDIR)/libzmq_la-galois_tables.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c' object='libzmq_la-galois_tables.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-galois_tables.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c
-
-libzmq_la-wsastrerror.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-wsastrerror.lo -MD -MP -MF $(DEPDIR)/libzmq_la-wsastrerror.Tpo -c -o libzmq_la-wsastrerror.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-wsastrerror.Tpo $(DEPDIR)/libzmq_la-wsastrerror.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c' object='libzmq_la-wsastrerror.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-wsastrerror.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/wsastrerror.c
-
-libzmq_la-glib-compat.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/glib-compat.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-glib-compat.lo -MD -MP -MF $(DEPDIR)/libzmq_la-glib-compat.Tpo -c -o libzmq_la-glib-compat.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/glib-compat.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/glib-compat.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-glib-compat.Tpo $(DEPDIR)/libzmq_la-glib-compat.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/glib-compat.c' object='libzmq_la-glib-compat.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-glib-compat.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/glib-compat.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/glib-compat.c
-
-libzmq_la-backtrace.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/backtrace.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-backtrace.lo -MD -MP -MF $(DEPDIR)/libzmq_la-backtrace.Tpo -c -o libzmq_la-backtrace.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/backtrace.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/backtrace.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-backtrace.Tpo $(DEPDIR)/libzmq_la-backtrace.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/backtrace.c' object='libzmq_la-backtrace.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-backtrace.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/backtrace.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/backtrace.c
-
-libzmq_la-log.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/log.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-log.lo -MD -MP -MF $(DEPDIR)/libzmq_la-log.Tpo -c -o libzmq_la-log.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/log.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/log.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-log.Tpo $(DEPDIR)/libzmq_la-log.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/log.c' object='libzmq_la-log.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-log.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/log.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/log.c
-
-libzmq_la-sockaddr.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/sockaddr.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-sockaddr.lo -MD -MP -MF $(DEPDIR)/libzmq_la-sockaddr.Tpo -c -o libzmq_la-sockaddr.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/sockaddr.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/sockaddr.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-sockaddr.Tpo $(DEPDIR)/libzmq_la-sockaddr.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/sockaddr.c' object='libzmq_la-sockaddr.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-sockaddr.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/sockaddr.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/sockaddr.c
-
-libzmq_la-version.lo: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -MT libzmq_la-version.lo -MD -MP -MF $(DEPDIR)/libzmq_la-version.Tpo -c -o libzmq_la-version.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-version.Tpo $(DEPDIR)/libzmq_la-version.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c' object='libzmq_la-version.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CFLAGS) $(CFLAGS) -c -o libzmq_la-version.lo `test -f '../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c' || echo '$(srcdir)/'`../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c
-
.cpp.o:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
-libzmq_la-app_thread.lo: app_thread.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-app_thread.lo -MD -MP -MF $(DEPDIR)/libzmq_la-app_thread.Tpo -c -o libzmq_la-app_thread.lo `test -f 'app_thread.cpp' || echo '$(srcdir)/'`app_thread.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-app_thread.Tpo $(DEPDIR)/libzmq_la-app_thread.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='app_thread.cpp' object='libzmq_la-app_thread.lo' libtool=yes @AMDEPBACKSLASH@
+libzmq_la-clock.lo: clock.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-clock.lo -MD -MP -MF $(DEPDIR)/libzmq_la-clock.Tpo -c -o libzmq_la-clock.lo `test -f 'clock.cpp' || echo '$(srcdir)/'`clock.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-clock.Tpo $(DEPDIR)/libzmq_la-clock.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='clock.cpp' object='libzmq_la-clock.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-app_thread.lo `test -f 'app_thread.cpp' || echo '$(srcdir)/'`app_thread.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-clock.lo `test -f 'clock.cpp' || echo '$(srcdir)/'`clock.cpp
libzmq_la-command.lo: command.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-command.lo -MD -MP -MF $(DEPDIR)/libzmq_la-command.Tpo -c -o libzmq_la-command.lo `test -f 'command.cpp' || echo '$(srcdir)/'`command.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-command.Tpo $(DEPDIR)/libzmq_la-command.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-command.lo -MD -MP -MF $(DEPDIR)/libzmq_la-command.Tpo -c -o libzmq_la-command.lo `test -f 'command.cpp' || echo '$(srcdir)/'`command.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-command.Tpo $(DEPDIR)/libzmq_la-command.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='command.cpp' object='libzmq_la-command.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-command.lo `test -f 'command.cpp' || echo '$(srcdir)/'`command.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-command.lo `test -f 'command.cpp' || echo '$(srcdir)/'`command.cpp
libzmq_la-ctx.lo: ctx.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ctx.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ctx.Tpo -c -o libzmq_la-ctx.lo `test -f 'ctx.cpp' || echo '$(srcdir)/'`ctx.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-ctx.Tpo $(DEPDIR)/libzmq_la-ctx.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ctx.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ctx.Tpo -c -o libzmq_la-ctx.lo `test -f 'ctx.cpp' || echo '$(srcdir)/'`ctx.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-ctx.Tpo $(DEPDIR)/libzmq_la-ctx.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ctx.cpp' object='libzmq_la-ctx.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ctx.lo `test -f 'ctx.cpp' || echo '$(srcdir)/'`ctx.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ctx.lo `test -f 'ctx.cpp' || echo '$(srcdir)/'`ctx.cpp
+
+libzmq_la-connect_session.lo: connect_session.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-connect_session.lo -MD -MP -MF $(DEPDIR)/libzmq_la-connect_session.Tpo -c -o libzmq_la-connect_session.lo `test -f 'connect_session.cpp' || echo '$(srcdir)/'`connect_session.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-connect_session.Tpo $(DEPDIR)/libzmq_la-connect_session.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='connect_session.cpp' object='libzmq_la-connect_session.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-connect_session.lo `test -f 'connect_session.cpp' || echo '$(srcdir)/'`connect_session.cpp
+
+libzmq_la-decoder.lo: decoder.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-decoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-decoder.Tpo -c -o libzmq_la-decoder.lo `test -f 'decoder.cpp' || echo '$(srcdir)/'`decoder.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-decoder.Tpo $(DEPDIR)/libzmq_la-decoder.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='decoder.cpp' object='libzmq_la-decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-decoder.lo `test -f 'decoder.cpp' || echo '$(srcdir)/'`decoder.cpp
+
+libzmq_la-device.lo: device.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-device.lo -MD -MP -MF $(DEPDIR)/libzmq_la-device.Tpo -c -o libzmq_la-device.lo `test -f 'device.cpp' || echo '$(srcdir)/'`device.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-device.Tpo $(DEPDIR)/libzmq_la-device.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='device.cpp' object='libzmq_la-device.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-device.lo `test -f 'device.cpp' || echo '$(srcdir)/'`device.cpp
libzmq_la-devpoll.lo: devpoll.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-devpoll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-devpoll.Tpo -c -o libzmq_la-devpoll.lo `test -f 'devpoll.cpp' || echo '$(srcdir)/'`devpoll.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-devpoll.Tpo $(DEPDIR)/libzmq_la-devpoll.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-devpoll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-devpoll.Tpo -c -o libzmq_la-devpoll.lo `test -f 'devpoll.cpp' || echo '$(srcdir)/'`devpoll.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-devpoll.Tpo $(DEPDIR)/libzmq_la-devpoll.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='devpoll.cpp' object='libzmq_la-devpoll.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-devpoll.lo `test -f 'devpoll.cpp' || echo '$(srcdir)/'`devpoll.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-devpoll.lo `test -f 'devpoll.cpp' || echo '$(srcdir)/'`devpoll.cpp
-libzmq_la-push.lo: push.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-push.lo -MD -MP -MF $(DEPDIR)/libzmq_la-push.Tpo -c -o libzmq_la-push.lo `test -f 'push.cpp' || echo '$(srcdir)/'`push.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-push.Tpo $(DEPDIR)/libzmq_la-push.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='push.cpp' object='libzmq_la-push.lo' libtool=yes @AMDEPBACKSLASH@
+libzmq_la-dist.lo: dist.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-dist.lo -MD -MP -MF $(DEPDIR)/libzmq_la-dist.Tpo -c -o libzmq_la-dist.lo `test -f 'dist.cpp' || echo '$(srcdir)/'`dist.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-dist.Tpo $(DEPDIR)/libzmq_la-dist.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dist.cpp' object='libzmq_la-dist.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-push.lo `test -f 'push.cpp' || echo '$(srcdir)/'`push.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-dist.lo `test -f 'dist.cpp' || echo '$(srcdir)/'`dist.cpp
+
+libzmq_la-encoder.lo: encoder.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-encoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-encoder.Tpo -c -o libzmq_la-encoder.lo `test -f 'encoder.cpp' || echo '$(srcdir)/'`encoder.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-encoder.Tpo $(DEPDIR)/libzmq_la-encoder.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='encoder.cpp' object='libzmq_la-encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-encoder.lo `test -f 'encoder.cpp' || echo '$(srcdir)/'`encoder.cpp
libzmq_la-epoll.lo: epoll.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-epoll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-epoll.Tpo -c -o libzmq_la-epoll.lo `test -f 'epoll.cpp' || echo '$(srcdir)/'`epoll.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-epoll.Tpo $(DEPDIR)/libzmq_la-epoll.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-epoll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-epoll.Tpo -c -o libzmq_la-epoll.lo `test -f 'epoll.cpp' || echo '$(srcdir)/'`epoll.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-epoll.Tpo $(DEPDIR)/libzmq_la-epoll.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='epoll.cpp' object='libzmq_la-epoll.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-epoll.lo `test -f 'epoll.cpp' || echo '$(srcdir)/'`epoll.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-epoll.lo `test -f 'epoll.cpp' || echo '$(srcdir)/'`epoll.cpp
libzmq_la-err.lo: err.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-err.lo -MD -MP -MF $(DEPDIR)/libzmq_la-err.Tpo -c -o libzmq_la-err.lo `test -f 'err.cpp' || echo '$(srcdir)/'`err.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-err.Tpo $(DEPDIR)/libzmq_la-err.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-err.lo -MD -MP -MF $(DEPDIR)/libzmq_la-err.Tpo -c -o libzmq_la-err.lo `test -f 'err.cpp' || echo '$(srcdir)/'`err.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-err.Tpo $(DEPDIR)/libzmq_la-err.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='err.cpp' object='libzmq_la-err.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-err.lo `test -f 'err.cpp' || echo '$(srcdir)/'`err.cpp
-
-libzmq_la-forwarder.lo: forwarder.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-forwarder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-forwarder.Tpo -c -o libzmq_la-forwarder.lo `test -f 'forwarder.cpp' || echo '$(srcdir)/'`forwarder.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-forwarder.Tpo $(DEPDIR)/libzmq_la-forwarder.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='forwarder.cpp' object='libzmq_la-forwarder.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-forwarder.lo `test -f 'forwarder.cpp' || echo '$(srcdir)/'`forwarder.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-err.lo `test -f 'err.cpp' || echo '$(srcdir)/'`err.cpp
libzmq_la-fq.lo: fq.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-fq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-fq.Tpo -c -o libzmq_la-fq.lo `test -f 'fq.cpp' || echo '$(srcdir)/'`fq.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-fq.Tpo $(DEPDIR)/libzmq_la-fq.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-fq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-fq.Tpo -c -o libzmq_la-fq.lo `test -f 'fq.cpp' || echo '$(srcdir)/'`fq.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-fq.Tpo $(DEPDIR)/libzmq_la-fq.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fq.cpp' object='libzmq_la-fq.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-fq.lo `test -f 'fq.cpp' || echo '$(srcdir)/'`fq.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-fq.lo `test -f 'fq.cpp' || echo '$(srcdir)/'`fq.cpp
libzmq_la-io_object.lo: io_object.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-io_object.lo -MD -MP -MF $(DEPDIR)/libzmq_la-io_object.Tpo -c -o libzmq_la-io_object.lo `test -f 'io_object.cpp' || echo '$(srcdir)/'`io_object.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-io_object.Tpo $(DEPDIR)/libzmq_la-io_object.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-io_object.lo -MD -MP -MF $(DEPDIR)/libzmq_la-io_object.Tpo -c -o libzmq_la-io_object.lo `test -f 'io_object.cpp' || echo '$(srcdir)/'`io_object.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-io_object.Tpo $(DEPDIR)/libzmq_la-io_object.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io_object.cpp' object='libzmq_la-io_object.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-io_object.lo `test -f 'io_object.cpp' || echo '$(srcdir)/'`io_object.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-io_object.lo `test -f 'io_object.cpp' || echo '$(srcdir)/'`io_object.cpp
libzmq_la-io_thread.lo: io_thread.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-io_thread.lo -MD -MP -MF $(DEPDIR)/libzmq_la-io_thread.Tpo -c -o libzmq_la-io_thread.lo `test -f 'io_thread.cpp' || echo '$(srcdir)/'`io_thread.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-io_thread.Tpo $(DEPDIR)/libzmq_la-io_thread.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-io_thread.lo -MD -MP -MF $(DEPDIR)/libzmq_la-io_thread.Tpo -c -o libzmq_la-io_thread.lo `test -f 'io_thread.cpp' || echo '$(srcdir)/'`io_thread.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-io_thread.Tpo $(DEPDIR)/libzmq_la-io_thread.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io_thread.cpp' object='libzmq_la-io_thread.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-io_thread.lo `test -f 'io_thread.cpp' || echo '$(srcdir)/'`io_thread.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-io_thread.lo `test -f 'io_thread.cpp' || echo '$(srcdir)/'`io_thread.cpp
libzmq_la-ip.lo: ip.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ip.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ip.Tpo -c -o libzmq_la-ip.lo `test -f 'ip.cpp' || echo '$(srcdir)/'`ip.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-ip.Tpo $(DEPDIR)/libzmq_la-ip.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ip.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ip.Tpo -c -o libzmq_la-ip.lo `test -f 'ip.cpp' || echo '$(srcdir)/'`ip.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-ip.Tpo $(DEPDIR)/libzmq_la-ip.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ip.cpp' object='libzmq_la-ip.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ip.lo `test -f 'ip.cpp' || echo '$(srcdir)/'`ip.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ip.lo `test -f 'ip.cpp' || echo '$(srcdir)/'`ip.cpp
libzmq_la-kqueue.lo: kqueue.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-kqueue.lo -MD -MP -MF $(DEPDIR)/libzmq_la-kqueue.Tpo -c -o libzmq_la-kqueue.lo `test -f 'kqueue.cpp' || echo '$(srcdir)/'`kqueue.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-kqueue.Tpo $(DEPDIR)/libzmq_la-kqueue.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-kqueue.lo -MD -MP -MF $(DEPDIR)/libzmq_la-kqueue.Tpo -c -o libzmq_la-kqueue.lo `test -f 'kqueue.cpp' || echo '$(srcdir)/'`kqueue.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-kqueue.Tpo $(DEPDIR)/libzmq_la-kqueue.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='kqueue.cpp' object='libzmq_la-kqueue.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-kqueue.lo `test -f 'kqueue.cpp' || echo '$(srcdir)/'`kqueue.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-kqueue.lo `test -f 'kqueue.cpp' || echo '$(srcdir)/'`kqueue.cpp
libzmq_la-lb.lo: lb.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-lb.lo -MD -MP -MF $(DEPDIR)/libzmq_la-lb.Tpo -c -o libzmq_la-lb.lo `test -f 'lb.cpp' || echo '$(srcdir)/'`lb.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-lb.Tpo $(DEPDIR)/libzmq_la-lb.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-lb.lo -MD -MP -MF $(DEPDIR)/libzmq_la-lb.Tpo -c -o libzmq_la-lb.lo `test -f 'lb.cpp' || echo '$(srcdir)/'`lb.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-lb.Tpo $(DEPDIR)/libzmq_la-lb.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lb.cpp' object='libzmq_la-lb.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-lb.lo `test -f 'lb.cpp' || echo '$(srcdir)/'`lb.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-lb.lo `test -f 'lb.cpp' || echo '$(srcdir)/'`lb.cpp
+
+libzmq_la-mailbox.lo: mailbox.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-mailbox.lo -MD -MP -MF $(DEPDIR)/libzmq_la-mailbox.Tpo -c -o libzmq_la-mailbox.lo `test -f 'mailbox.cpp' || echo '$(srcdir)/'`mailbox.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-mailbox.Tpo $(DEPDIR)/libzmq_la-mailbox.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mailbox.cpp' object='libzmq_la-mailbox.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-mailbox.lo `test -f 'mailbox.cpp' || echo '$(srcdir)/'`mailbox.cpp
-libzmq_la-msg_store.lo: msg_store.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-msg_store.lo -MD -MP -MF $(DEPDIR)/libzmq_la-msg_store.Tpo -c -o libzmq_la-msg_store.lo `test -f 'msg_store.cpp' || echo '$(srcdir)/'`msg_store.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-msg_store.Tpo $(DEPDIR)/libzmq_la-msg_store.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='msg_store.cpp' object='libzmq_la-msg_store.lo' libtool=yes @AMDEPBACKSLASH@
+libzmq_la-named_session.lo: named_session.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-named_session.lo -MD -MP -MF $(DEPDIR)/libzmq_la-named_session.Tpo -c -o libzmq_la-named_session.lo `test -f 'named_session.cpp' || echo '$(srcdir)/'`named_session.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-named_session.Tpo $(DEPDIR)/libzmq_la-named_session.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='named_session.cpp' object='libzmq_la-named_session.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-msg_store.lo `test -f 'msg_store.cpp' || echo '$(srcdir)/'`msg_store.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-named_session.lo `test -f 'named_session.cpp' || echo '$(srcdir)/'`named_session.cpp
libzmq_la-object.lo: object.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-object.lo -MD -MP -MF $(DEPDIR)/libzmq_la-object.Tpo -c -o libzmq_la-object.lo `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-object.Tpo $(DEPDIR)/libzmq_la-object.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-object.lo -MD -MP -MF $(DEPDIR)/libzmq_la-object.Tpo -c -o libzmq_la-object.lo `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-object.Tpo $(DEPDIR)/libzmq_la-object.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='object.cpp' object='libzmq_la-object.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-object.lo `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-object.lo `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp
libzmq_la-options.lo: options.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-options.lo -MD -MP -MF $(DEPDIR)/libzmq_la-options.Tpo -c -o libzmq_la-options.lo `test -f 'options.cpp' || echo '$(srcdir)/'`options.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-options.Tpo $(DEPDIR)/libzmq_la-options.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-options.lo -MD -MP -MF $(DEPDIR)/libzmq_la-options.Tpo -c -o libzmq_la-options.lo `test -f 'options.cpp' || echo '$(srcdir)/'`options.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-options.Tpo $(DEPDIR)/libzmq_la-options.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='options.cpp' object='libzmq_la-options.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-options.lo `test -f 'options.cpp' || echo '$(srcdir)/'`options.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-options.lo `test -f 'options.cpp' || echo '$(srcdir)/'`options.cpp
-libzmq_la-owned.lo: owned.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-owned.lo -MD -MP -MF $(DEPDIR)/libzmq_la-owned.Tpo -c -o libzmq_la-owned.lo `test -f 'owned.cpp' || echo '$(srcdir)/'`owned.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-owned.Tpo $(DEPDIR)/libzmq_la-owned.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='owned.cpp' object='libzmq_la-owned.lo' libtool=yes @AMDEPBACKSLASH@
+libzmq_la-own.lo: own.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-own.lo -MD -MP -MF $(DEPDIR)/libzmq_la-own.Tpo -c -o libzmq_la-own.lo `test -f 'own.cpp' || echo '$(srcdir)/'`own.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-own.Tpo $(DEPDIR)/libzmq_la-own.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='own.cpp' object='libzmq_la-own.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-owned.lo `test -f 'owned.cpp' || echo '$(srcdir)/'`owned.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-own.lo `test -f 'own.cpp' || echo '$(srcdir)/'`own.cpp
+
+libzmq_la-pair.lo: pair.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pair.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pair.Tpo -c -o libzmq_la-pair.lo `test -f 'pair.cpp' || echo '$(srcdir)/'`pair.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pair.Tpo $(DEPDIR)/libzmq_la-pair.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pair.cpp' object='libzmq_la-pair.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pair.lo `test -f 'pair.cpp' || echo '$(srcdir)/'`pair.cpp
libzmq_la-pgm_receiver.lo: pgm_receiver.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_receiver.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_receiver.Tpo -c -o libzmq_la-pgm_receiver.lo `test -f 'pgm_receiver.cpp' || echo '$(srcdir)/'`pgm_receiver.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-pgm_receiver.Tpo $(DEPDIR)/libzmq_la-pgm_receiver.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_receiver.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_receiver.Tpo -c -o libzmq_la-pgm_receiver.lo `test -f 'pgm_receiver.cpp' || echo '$(srcdir)/'`pgm_receiver.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pgm_receiver.Tpo $(DEPDIR)/libzmq_la-pgm_receiver.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pgm_receiver.cpp' object='libzmq_la-pgm_receiver.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_receiver.lo `test -f 'pgm_receiver.cpp' || echo '$(srcdir)/'`pgm_receiver.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_receiver.lo `test -f 'pgm_receiver.cpp' || echo '$(srcdir)/'`pgm_receiver.cpp
libzmq_la-pgm_sender.lo: pgm_sender.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_sender.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_sender.Tpo -c -o libzmq_la-pgm_sender.lo `test -f 'pgm_sender.cpp' || echo '$(srcdir)/'`pgm_sender.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-pgm_sender.Tpo $(DEPDIR)/libzmq_la-pgm_sender.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_sender.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_sender.Tpo -c -o libzmq_la-pgm_sender.lo `test -f 'pgm_sender.cpp' || echo '$(srcdir)/'`pgm_sender.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pgm_sender.Tpo $(DEPDIR)/libzmq_la-pgm_sender.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pgm_sender.cpp' object='libzmq_la-pgm_sender.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_sender.lo `test -f 'pgm_sender.cpp' || echo '$(srcdir)/'`pgm_sender.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_sender.lo `test -f 'pgm_sender.cpp' || echo '$(srcdir)/'`pgm_sender.cpp
libzmq_la-pgm_socket.lo: pgm_socket.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_socket.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_socket.Tpo -c -o libzmq_la-pgm_socket.lo `test -f 'pgm_socket.cpp' || echo '$(srcdir)/'`pgm_socket.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-pgm_socket.Tpo $(DEPDIR)/libzmq_la-pgm_socket.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_socket.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_socket.Tpo -c -o libzmq_la-pgm_socket.lo `test -f 'pgm_socket.cpp' || echo '$(srcdir)/'`pgm_socket.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pgm_socket.Tpo $(DEPDIR)/libzmq_la-pgm_socket.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pgm_socket.cpp' object='libzmq_la-pgm_socket.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_socket.lo `test -f 'pgm_socket.cpp' || echo '$(srcdir)/'`pgm_socket.cpp
-
-libzmq_la-pair.lo: pair.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pair.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pair.Tpo -c -o libzmq_la-pair.lo `test -f 'pair.cpp' || echo '$(srcdir)/'`pair.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-pair.Tpo $(DEPDIR)/libzmq_la-pair.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pair.cpp' object='libzmq_la-pair.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pair.lo `test -f 'pair.cpp' || echo '$(srcdir)/'`pair.cpp
-
-libzmq_la-prefix_tree.lo: prefix_tree.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-prefix_tree.lo -MD -MP -MF $(DEPDIR)/libzmq_la-prefix_tree.Tpo -c -o libzmq_la-prefix_tree.lo `test -f 'prefix_tree.cpp' || echo '$(srcdir)/'`prefix_tree.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-prefix_tree.Tpo $(DEPDIR)/libzmq_la-prefix_tree.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='prefix_tree.cpp' object='libzmq_la-prefix_tree.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-prefix_tree.lo `test -f 'prefix_tree.cpp' || echo '$(srcdir)/'`prefix_tree.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_socket.lo `test -f 'pgm_socket.cpp' || echo '$(srcdir)/'`pgm_socket.cpp
libzmq_la-pipe.lo: pipe.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pipe.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pipe.Tpo -c -o libzmq_la-pipe.lo `test -f 'pipe.cpp' || echo '$(srcdir)/'`pipe.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-pipe.Tpo $(DEPDIR)/libzmq_la-pipe.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pipe.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pipe.Tpo -c -o libzmq_la-pipe.lo `test -f 'pipe.cpp' || echo '$(srcdir)/'`pipe.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pipe.Tpo $(DEPDIR)/libzmq_la-pipe.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pipe.cpp' object='libzmq_la-pipe.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pipe.lo `test -f 'pipe.cpp' || echo '$(srcdir)/'`pipe.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pipe.lo `test -f 'pipe.cpp' || echo '$(srcdir)/'`pipe.cpp
libzmq_la-poll.lo: poll.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-poll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-poll.Tpo -c -o libzmq_la-poll.lo `test -f 'poll.cpp' || echo '$(srcdir)/'`poll.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-poll.Tpo $(DEPDIR)/libzmq_la-poll.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-poll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-poll.Tpo -c -o libzmq_la-poll.lo `test -f 'poll.cpp' || echo '$(srcdir)/'`poll.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-poll.Tpo $(DEPDIR)/libzmq_la-poll.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poll.cpp' object='libzmq_la-poll.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-poll.lo `test -f 'poll.cpp' || echo '$(srcdir)/'`poll.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-poll.lo `test -f 'poll.cpp' || echo '$(srcdir)/'`poll.cpp
-libzmq_la-pub.lo: pub.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pub.Tpo -c -o libzmq_la-pub.lo `test -f 'pub.cpp' || echo '$(srcdir)/'`pub.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-pub.Tpo $(DEPDIR)/libzmq_la-pub.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pub.cpp' object='libzmq_la-pub.lo' libtool=yes @AMDEPBACKSLASH@
+libzmq_la-poller_base.lo: poller_base.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-poller_base.lo -MD -MP -MF $(DEPDIR)/libzmq_la-poller_base.Tpo -c -o libzmq_la-poller_base.lo `test -f 'poller_base.cpp' || echo '$(srcdir)/'`poller_base.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-poller_base.Tpo $(DEPDIR)/libzmq_la-poller_base.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poller_base.cpp' object='libzmq_la-poller_base.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pub.lo `test -f 'pub.cpp' || echo '$(srcdir)/'`pub.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-poller_base.lo `test -f 'poller_base.cpp' || echo '$(srcdir)/'`poller_base.cpp
-libzmq_la-queue.lo: queue.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-queue.lo -MD -MP -MF $(DEPDIR)/libzmq_la-queue.Tpo -c -o libzmq_la-queue.lo `test -f 'queue.cpp' || echo '$(srcdir)/'`queue.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-queue.Tpo $(DEPDIR)/libzmq_la-queue.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='queue.cpp' object='libzmq_la-queue.lo' libtool=yes @AMDEPBACKSLASH@
+libzmq_la-pull.lo: pull.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pull.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pull.Tpo -c -o libzmq_la-pull.lo `test -f 'pull.cpp' || echo '$(srcdir)/'`pull.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pull.Tpo $(DEPDIR)/libzmq_la-pull.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pull.cpp' object='libzmq_la-pull.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-queue.lo `test -f 'queue.cpp' || echo '$(srcdir)/'`queue.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pull.lo `test -f 'pull.cpp' || echo '$(srcdir)/'`pull.cpp
+
+libzmq_la-push.lo: push.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-push.lo -MD -MP -MF $(DEPDIR)/libzmq_la-push.Tpo -c -o libzmq_la-push.lo `test -f 'push.cpp' || echo '$(srcdir)/'`push.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-push.Tpo $(DEPDIR)/libzmq_la-push.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='push.cpp' object='libzmq_la-push.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-push.lo `test -f 'push.cpp' || echo '$(srcdir)/'`push.cpp
+
+libzmq_la-reaper.lo: reaper.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-reaper.lo -MD -MP -MF $(DEPDIR)/libzmq_la-reaper.Tpo -c -o libzmq_la-reaper.lo `test -f 'reaper.cpp' || echo '$(srcdir)/'`reaper.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-reaper.Tpo $(DEPDIR)/libzmq_la-reaper.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='reaper.cpp' object='libzmq_la-reaper.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-reaper.lo `test -f 'reaper.cpp' || echo '$(srcdir)/'`reaper.cpp
+
+libzmq_la-pub.lo: pub.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pub.Tpo -c -o libzmq_la-pub.lo `test -f 'pub.cpp' || echo '$(srcdir)/'`pub.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pub.Tpo $(DEPDIR)/libzmq_la-pub.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pub.cpp' object='libzmq_la-pub.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pub.lo `test -f 'pub.cpp' || echo '$(srcdir)/'`pub.cpp
libzmq_la-rep.lo: rep.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-rep.lo -MD -MP -MF $(DEPDIR)/libzmq_la-rep.Tpo -c -o libzmq_la-rep.lo `test -f 'rep.cpp' || echo '$(srcdir)/'`rep.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-rep.Tpo $(DEPDIR)/libzmq_la-rep.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-rep.lo -MD -MP -MF $(DEPDIR)/libzmq_la-rep.Tpo -c -o libzmq_la-rep.lo `test -f 'rep.cpp' || echo '$(srcdir)/'`rep.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-rep.Tpo $(DEPDIR)/libzmq_la-rep.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rep.cpp' object='libzmq_la-rep.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-rep.lo `test -f 'rep.cpp' || echo '$(srcdir)/'`rep.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-rep.lo `test -f 'rep.cpp' || echo '$(srcdir)/'`rep.cpp
libzmq_la-req.lo: req.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-req.lo -MD -MP -MF $(DEPDIR)/libzmq_la-req.Tpo -c -o libzmq_la-req.lo `test -f 'req.cpp' || echo '$(srcdir)/'`req.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-req.Tpo $(DEPDIR)/libzmq_la-req.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-req.lo -MD -MP -MF $(DEPDIR)/libzmq_la-req.Tpo -c -o libzmq_la-req.lo `test -f 'req.cpp' || echo '$(srcdir)/'`req.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-req.Tpo $(DEPDIR)/libzmq_la-req.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='req.cpp' object='libzmq_la-req.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-req.lo `test -f 'req.cpp' || echo '$(srcdir)/'`req.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-req.lo `test -f 'req.cpp' || echo '$(srcdir)/'`req.cpp
libzmq_la-select.lo: select.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-select.lo -MD -MP -MF $(DEPDIR)/libzmq_la-select.Tpo -c -o libzmq_la-select.lo `test -f 'select.cpp' || echo '$(srcdir)/'`select.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-select.Tpo $(DEPDIR)/libzmq_la-select.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-select.lo -MD -MP -MF $(DEPDIR)/libzmq_la-select.Tpo -c -o libzmq_la-select.lo `test -f 'select.cpp' || echo '$(srcdir)/'`select.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-select.Tpo $(DEPDIR)/libzmq_la-select.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='select.cpp' object='libzmq_la-select.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-select.lo `test -f 'select.cpp' || echo '$(srcdir)/'`select.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-select.lo `test -f 'select.cpp' || echo '$(srcdir)/'`select.cpp
libzmq_la-session.lo: session.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-session.lo -MD -MP -MF $(DEPDIR)/libzmq_la-session.Tpo -c -o libzmq_la-session.lo `test -f 'session.cpp' || echo '$(srcdir)/'`session.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-session.Tpo $(DEPDIR)/libzmq_la-session.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-session.lo -MD -MP -MF $(DEPDIR)/libzmq_la-session.Tpo -c -o libzmq_la-session.lo `test -f 'session.cpp' || echo '$(srcdir)/'`session.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-session.Tpo $(DEPDIR)/libzmq_la-session.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='session.cpp' object='libzmq_la-session.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-session.lo `test -f 'session.cpp' || echo '$(srcdir)/'`session.cpp
-
-libzmq_la-signaler.lo: signaler.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-signaler.lo -MD -MP -MF $(DEPDIR)/libzmq_la-signaler.Tpo -c -o libzmq_la-signaler.lo `test -f 'signaler.cpp' || echo '$(srcdir)/'`signaler.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-signaler.Tpo $(DEPDIR)/libzmq_la-signaler.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='signaler.cpp' object='libzmq_la-signaler.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-signaler.lo `test -f 'signaler.cpp' || echo '$(srcdir)/'`signaler.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-session.lo `test -f 'session.cpp' || echo '$(srcdir)/'`session.cpp
libzmq_la-socket_base.lo: socket_base.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-socket_base.lo -MD -MP -MF $(DEPDIR)/libzmq_la-socket_base.Tpo -c -o libzmq_la-socket_base.lo `test -f 'socket_base.cpp' || echo '$(srcdir)/'`socket_base.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-socket_base.Tpo $(DEPDIR)/libzmq_la-socket_base.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-socket_base.lo -MD -MP -MF $(DEPDIR)/libzmq_la-socket_base.Tpo -c -o libzmq_la-socket_base.lo `test -f 'socket_base.cpp' || echo '$(srcdir)/'`socket_base.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-socket_base.Tpo $(DEPDIR)/libzmq_la-socket_base.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='socket_base.cpp' object='libzmq_la-socket_base.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-socket_base.lo `test -f 'socket_base.cpp' || echo '$(srcdir)/'`socket_base.cpp
-
-libzmq_la-streamer.lo: streamer.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-streamer.lo -MD -MP -MF $(DEPDIR)/libzmq_la-streamer.Tpo -c -o libzmq_la-streamer.lo `test -f 'streamer.cpp' || echo '$(srcdir)/'`streamer.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-streamer.Tpo $(DEPDIR)/libzmq_la-streamer.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='streamer.cpp' object='libzmq_la-streamer.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-streamer.lo `test -f 'streamer.cpp' || echo '$(srcdir)/'`streamer.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-socket_base.lo `test -f 'socket_base.cpp' || echo '$(srcdir)/'`socket_base.cpp
libzmq_la-sub.lo: sub.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-sub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-sub.Tpo -c -o libzmq_la-sub.lo `test -f 'sub.cpp' || echo '$(srcdir)/'`sub.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-sub.Tpo $(DEPDIR)/libzmq_la-sub.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-sub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-sub.Tpo -c -o libzmq_la-sub.lo `test -f 'sub.cpp' || echo '$(srcdir)/'`sub.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-sub.Tpo $(DEPDIR)/libzmq_la-sub.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='sub.cpp' object='libzmq_la-sub.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-sub.lo `test -f 'sub.cpp' || echo '$(srcdir)/'`sub.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-sub.lo `test -f 'sub.cpp' || echo '$(srcdir)/'`sub.cpp
+
+libzmq_la-swap.lo: swap.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-swap.lo -MD -MP -MF $(DEPDIR)/libzmq_la-swap.Tpo -c -o libzmq_la-swap.lo `test -f 'swap.cpp' || echo '$(srcdir)/'`swap.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-swap.Tpo $(DEPDIR)/libzmq_la-swap.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='swap.cpp' object='libzmq_la-swap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-swap.lo `test -f 'swap.cpp' || echo '$(srcdir)/'`swap.cpp
libzmq_la-tcp_connecter.lo: tcp_connecter.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_connecter.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_connecter.Tpo -c -o libzmq_la-tcp_connecter.lo `test -f 'tcp_connecter.cpp' || echo '$(srcdir)/'`tcp_connecter.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-tcp_connecter.Tpo $(DEPDIR)/libzmq_la-tcp_connecter.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_connecter.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_connecter.Tpo -c -o libzmq_la-tcp_connecter.lo `test -f 'tcp_connecter.cpp' || echo '$(srcdir)/'`tcp_connecter.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp_connecter.Tpo $(DEPDIR)/libzmq_la-tcp_connecter.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tcp_connecter.cpp' object='libzmq_la-tcp_connecter.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_connecter.lo `test -f 'tcp_connecter.cpp' || echo '$(srcdir)/'`tcp_connecter.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_connecter.lo `test -f 'tcp_connecter.cpp' || echo '$(srcdir)/'`tcp_connecter.cpp
libzmq_la-tcp_listener.lo: tcp_listener.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_listener.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_listener.Tpo -c -o libzmq_la-tcp_listener.lo `test -f 'tcp_listener.cpp' || echo '$(srcdir)/'`tcp_listener.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-tcp_listener.Tpo $(DEPDIR)/libzmq_la-tcp_listener.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_listener.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_listener.Tpo -c -o libzmq_la-tcp_listener.lo `test -f 'tcp_listener.cpp' || echo '$(srcdir)/'`tcp_listener.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp_listener.Tpo $(DEPDIR)/libzmq_la-tcp_listener.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tcp_listener.cpp' object='libzmq_la-tcp_listener.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_listener.lo `test -f 'tcp_listener.cpp' || echo '$(srcdir)/'`tcp_listener.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_listener.lo `test -f 'tcp_listener.cpp' || echo '$(srcdir)/'`tcp_listener.cpp
libzmq_la-tcp_socket.lo: tcp_socket.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_socket.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_socket.Tpo -c -o libzmq_la-tcp_socket.lo `test -f 'tcp_socket.cpp' || echo '$(srcdir)/'`tcp_socket.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-tcp_socket.Tpo $(DEPDIR)/libzmq_la-tcp_socket.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_socket.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_socket.Tpo -c -o libzmq_la-tcp_socket.lo `test -f 'tcp_socket.cpp' || echo '$(srcdir)/'`tcp_socket.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp_socket.Tpo $(DEPDIR)/libzmq_la-tcp_socket.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tcp_socket.cpp' object='libzmq_la-tcp_socket.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_socket.lo `test -f 'tcp_socket.cpp' || echo '$(srcdir)/'`tcp_socket.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_socket.lo `test -f 'tcp_socket.cpp' || echo '$(srcdir)/'`tcp_socket.cpp
libzmq_la-thread.lo: thread.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-thread.lo -MD -MP -MF $(DEPDIR)/libzmq_la-thread.Tpo -c -o libzmq_la-thread.lo `test -f 'thread.cpp' || echo '$(srcdir)/'`thread.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-thread.Tpo $(DEPDIR)/libzmq_la-thread.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-thread.lo -MD -MP -MF $(DEPDIR)/libzmq_la-thread.Tpo -c -o libzmq_la-thread.lo `test -f 'thread.cpp' || echo '$(srcdir)/'`thread.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-thread.Tpo $(DEPDIR)/libzmq_la-thread.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='thread.cpp' object='libzmq_la-thread.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-thread.lo `test -f 'thread.cpp' || echo '$(srcdir)/'`thread.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-thread.lo `test -f 'thread.cpp' || echo '$(srcdir)/'`thread.cpp
-libzmq_la-pull.lo: pull.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pull.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pull.Tpo -c -o libzmq_la-pull.lo `test -f 'pull.cpp' || echo '$(srcdir)/'`pull.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-pull.Tpo $(DEPDIR)/libzmq_la-pull.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pull.cpp' object='libzmq_la-pull.lo' libtool=yes @AMDEPBACKSLASH@
+libzmq_la-transient_session.lo: transient_session.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-transient_session.lo -MD -MP -MF $(DEPDIR)/libzmq_la-transient_session.Tpo -c -o libzmq_la-transient_session.lo `test -f 'transient_session.cpp' || echo '$(srcdir)/'`transient_session.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-transient_session.Tpo $(DEPDIR)/libzmq_la-transient_session.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='transient_session.cpp' object='libzmq_la-transient_session.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pull.lo `test -f 'pull.cpp' || echo '$(srcdir)/'`pull.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-transient_session.lo `test -f 'transient_session.cpp' || echo '$(srcdir)/'`transient_session.cpp
+
+libzmq_la-trie.lo: trie.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-trie.lo -MD -MP -MF $(DEPDIR)/libzmq_la-trie.Tpo -c -o libzmq_la-trie.lo `test -f 'trie.cpp' || echo '$(srcdir)/'`trie.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-trie.Tpo $(DEPDIR)/libzmq_la-trie.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='trie.cpp' object='libzmq_la-trie.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-trie.lo `test -f 'trie.cpp' || echo '$(srcdir)/'`trie.cpp
libzmq_la-uuid.lo: uuid.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-uuid.lo -MD -MP -MF $(DEPDIR)/libzmq_la-uuid.Tpo -c -o libzmq_la-uuid.lo `test -f 'uuid.cpp' || echo '$(srcdir)/'`uuid.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-uuid.Tpo $(DEPDIR)/libzmq_la-uuid.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-uuid.lo -MD -MP -MF $(DEPDIR)/libzmq_la-uuid.Tpo -c -o libzmq_la-uuid.lo `test -f 'uuid.cpp' || echo '$(srcdir)/'`uuid.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-uuid.Tpo $(DEPDIR)/libzmq_la-uuid.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='uuid.cpp' object='libzmq_la-uuid.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-uuid.lo `test -f 'uuid.cpp' || echo '$(srcdir)/'`uuid.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-uuid.lo `test -f 'uuid.cpp' || echo '$(srcdir)/'`uuid.cpp
+
+libzmq_la-xpub.lo: xpub.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xpub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xpub.Tpo -c -o libzmq_la-xpub.lo `test -f 'xpub.cpp' || echo '$(srcdir)/'`xpub.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xpub.Tpo $(DEPDIR)/libzmq_la-xpub.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xpub.cpp' object='libzmq_la-xpub.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xpub.lo `test -f 'xpub.cpp' || echo '$(srcdir)/'`xpub.cpp
libzmq_la-xrep.lo: xrep.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xrep.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xrep.Tpo -c -o libzmq_la-xrep.lo `test -f 'xrep.cpp' || echo '$(srcdir)/'`xrep.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-xrep.Tpo $(DEPDIR)/libzmq_la-xrep.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xrep.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xrep.Tpo -c -o libzmq_la-xrep.lo `test -f 'xrep.cpp' || echo '$(srcdir)/'`xrep.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xrep.Tpo $(DEPDIR)/libzmq_la-xrep.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xrep.cpp' object='libzmq_la-xrep.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xrep.lo `test -f 'xrep.cpp' || echo '$(srcdir)/'`xrep.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xrep.lo `test -f 'xrep.cpp' || echo '$(srcdir)/'`xrep.cpp
libzmq_la-xreq.lo: xreq.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xreq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xreq.Tpo -c -o libzmq_la-xreq.lo `test -f 'xreq.cpp' || echo '$(srcdir)/'`xreq.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-xreq.Tpo $(DEPDIR)/libzmq_la-xreq.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xreq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xreq.Tpo -c -o libzmq_la-xreq.lo `test -f 'xreq.cpp' || echo '$(srcdir)/'`xreq.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xreq.Tpo $(DEPDIR)/libzmq_la-xreq.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xreq.cpp' object='libzmq_la-xreq.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xreq.lo `test -f 'xreq.cpp' || echo '$(srcdir)/'`xreq.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xreq.lo `test -f 'xreq.cpp' || echo '$(srcdir)/'`xreq.cpp
+
+libzmq_la-xsub.lo: xsub.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xsub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xsub.Tpo -c -o libzmq_la-xsub.lo `test -f 'xsub.cpp' || echo '$(srcdir)/'`xsub.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xsub.Tpo $(DEPDIR)/libzmq_la-xsub.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xsub.cpp' object='libzmq_la-xsub.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xsub.lo `test -f 'xsub.cpp' || echo '$(srcdir)/'`xsub.cpp
libzmq_la-zmq.lo: zmq.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq.Tpo -c -o libzmq_la-zmq.lo `test -f 'zmq.cpp' || echo '$(srcdir)/'`zmq.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-zmq.Tpo $(DEPDIR)/libzmq_la-zmq.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq.Tpo -c -o libzmq_la-zmq.lo `test -f 'zmq.cpp' || echo '$(srcdir)/'`zmq.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq.Tpo $(DEPDIR)/libzmq_la-zmq.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq.cpp' object='libzmq_la-zmq.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq.lo `test -f 'zmq.cpp' || echo '$(srcdir)/'`zmq.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq.lo `test -f 'zmq.cpp' || echo '$(srcdir)/'`zmq.cpp
libzmq_la-zmq_connecter.lo: zmq_connecter.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_connecter.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_connecter.Tpo -c -o libzmq_la-zmq_connecter.lo `test -f 'zmq_connecter.cpp' || echo '$(srcdir)/'`zmq_connecter.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-zmq_connecter.Tpo $(DEPDIR)/libzmq_la-zmq_connecter.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_connecter.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_connecter.Tpo -c -o libzmq_la-zmq_connecter.lo `test -f 'zmq_connecter.cpp' || echo '$(srcdir)/'`zmq_connecter.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq_connecter.Tpo $(DEPDIR)/libzmq_la-zmq_connecter.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_connecter.cpp' object='libzmq_la-zmq_connecter.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_connecter.lo `test -f 'zmq_connecter.cpp' || echo '$(srcdir)/'`zmq_connecter.cpp
-
-libzmq_la-zmq_decoder.lo: zmq_decoder.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_decoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_decoder.Tpo -c -o libzmq_la-zmq_decoder.lo `test -f 'zmq_decoder.cpp' || echo '$(srcdir)/'`zmq_decoder.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-zmq_decoder.Tpo $(DEPDIR)/libzmq_la-zmq_decoder.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_decoder.cpp' object='libzmq_la-zmq_decoder.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_decoder.lo `test -f 'zmq_decoder.cpp' || echo '$(srcdir)/'`zmq_decoder.cpp
-
-libzmq_la-zmq_encoder.lo: zmq_encoder.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_encoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_encoder.Tpo -c -o libzmq_la-zmq_encoder.lo `test -f 'zmq_encoder.cpp' || echo '$(srcdir)/'`zmq_encoder.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-zmq_encoder.Tpo $(DEPDIR)/libzmq_la-zmq_encoder.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_encoder.cpp' object='libzmq_la-zmq_encoder.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_encoder.lo `test -f 'zmq_encoder.cpp' || echo '$(srcdir)/'`zmq_encoder.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_connecter.lo `test -f 'zmq_connecter.cpp' || echo '$(srcdir)/'`zmq_connecter.cpp
libzmq_la-zmq_engine.lo: zmq_engine.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_engine.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_engine.Tpo -c -o libzmq_la-zmq_engine.lo `test -f 'zmq_engine.cpp' || echo '$(srcdir)/'`zmq_engine.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-zmq_engine.Tpo $(DEPDIR)/libzmq_la-zmq_engine.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_engine.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_engine.Tpo -c -o libzmq_la-zmq_engine.lo `test -f 'zmq_engine.cpp' || echo '$(srcdir)/'`zmq_engine.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq_engine.Tpo $(DEPDIR)/libzmq_la-zmq_engine.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_engine.cpp' object='libzmq_la-zmq_engine.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_engine.lo `test -f 'zmq_engine.cpp' || echo '$(srcdir)/'`zmq_engine.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_engine.lo `test -f 'zmq_engine.cpp' || echo '$(srcdir)/'`zmq_engine.cpp
libzmq_la-zmq_init.lo: zmq_init.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_init.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_init.Tpo -c -o libzmq_la-zmq_init.lo `test -f 'zmq_init.cpp' || echo '$(srcdir)/'`zmq_init.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-zmq_init.Tpo $(DEPDIR)/libzmq_la-zmq_init.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_init.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_init.Tpo -c -o libzmq_la-zmq_init.lo `test -f 'zmq_init.cpp' || echo '$(srcdir)/'`zmq_init.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq_init.Tpo $(DEPDIR)/libzmq_la-zmq_init.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_init.cpp' object='libzmq_la-zmq_init.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_init.lo `test -f 'zmq_init.cpp' || echo '$(srcdir)/'`zmq_init.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_init.lo `test -f 'zmq_init.cpp' || echo '$(srcdir)/'`zmq_init.cpp
libzmq_la-zmq_listener.lo: zmq_listener.cpp
-@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_listener.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_listener.Tpo -c -o libzmq_la-zmq_listener.lo `test -f 'zmq_listener.cpp' || echo '$(srcdir)/'`zmq_listener.cpp
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libzmq_la-zmq_listener.Tpo $(DEPDIR)/libzmq_la-zmq_listener.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_listener.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_listener.Tpo -c -o libzmq_la-zmq_listener.lo `test -f 'zmq_listener.cpp' || echo '$(srcdir)/'`zmq_listener.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq_listener.Tpo $(DEPDIR)/libzmq_la-zmq_listener.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_listener.cpp' object='libzmq_la-zmq_listener.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_listener.lo `test -f 'zmq_listener.cpp' || echo '$(srcdir)/'`zmq_listener.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_listener.lo `test -f 'zmq_listener.cpp' || echo '$(srcdir)/'`zmq_listener.cpp
mostlyclean-libtool:
-rm -f *.lo
@@ -1559,12 +1306,6 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
-@BUILD_PGM_TRUE@../foreign/openpgm/@pgm_basename@/openpgm/pgm/version.c: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/version_generator.py
-@BUILD_PGM_TRUE@ python ../foreign/openpgm/@pgm_basename@/openpgm/pgm/version_generator.py > $@
-
-@BUILD_PGM_TRUE@../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_tables.c: ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_generator.pl
-@BUILD_PGM_TRUE@ perl ../foreign/openpgm/@pgm_basename@/openpgm/pgm/galois_generator.pl > $@
-
dist-hook:
-rm $(distdir)/platform.hpp
diff --git a/src/app_thread.cpp b/src/app_thread.cpp
deleted file mode 100644
index fc9bc1f..0000000
--- a/src/app_thread.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <new>
-#include <algorithm>
-
-#include "../include/zmq.h"
-
-#include "platform.hpp"
-
-#if defined ZMQ_HAVE_WINDOWS
-#include "windows.hpp"
-#if defined _MSC_VER
-#include <intrin.h>
-#endif
-#else
-#include <unistd.h>
-#endif
-
-#include "app_thread.hpp"
-#include "ctx.hpp"
-#include "err.hpp"
-#include "pipe.hpp"
-#include "config.hpp"
-#include "socket_base.hpp"
-#include "pair.hpp"
-#include "pub.hpp"
-#include "sub.hpp"
-#include "req.hpp"
-#include "rep.hpp"
-#include "xreq.hpp"
-#include "xrep.hpp"
-#include "pull.hpp"
-#include "push.hpp"
-
-// If the RDTSC is available we use it to prevent excessive
-// polling for commands. The nice thing here is that it will work on any
-// system with x86 architecture and gcc or MSVC compiler.
-#if (defined __GNUC__ && (defined __i386__ || defined __x86_64__)) ||\
- (defined _MSC_VER && (defined _M_IX86 || defined _M_X64))
-#define ZMQ_DELAY_COMMANDS
-#endif
-
-zmq::app_thread_t::app_thread_t (ctx_t *ctx_,
- uint32_t thread_slot_) :
- object_t (ctx_, thread_slot_),
- last_processing_time (0),
- terminated (false)
-{
-}
-
-zmq::app_thread_t::~app_thread_t ()
-{
- zmq_assert (sockets.empty ());
-}
-
-void zmq::app_thread_t::stop ()
-{
- send_stop ();
-}
-
-zmq::signaler_t *zmq::app_thread_t::get_signaler ()
-{
- return &signaler;
-}
-
-bool zmq::app_thread_t::process_commands (bool block_, bool throttle_)
-{
- bool received;
- command_t cmd;
- if (block_) {
- received = signaler.recv (&cmd, true);
- zmq_assert (received);
- }
- else {
-
-#if defined ZMQ_DELAY_COMMANDS
- // Optimised version of command processing - it doesn't have to check
- // for incoming commands each time. It does so only if certain time
- // elapsed since last command processing. Command delay varies
- // depending on CPU speed: It's ~1ms on 3GHz CPU, ~2ms on 1.5GHz CPU
- // etc. The optimisation makes sense only on platforms where getting
- // a timestamp is a very cheap operation (tens of nanoseconds).
- if (throttle_) {
-
- // Get timestamp counter.
-#if defined __GNUC__
- uint32_t low;
- uint32_t high;
- __asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
- uint64_t current_time = (uint64_t) high << 32 | low;
-#elif defined _MSC_VER
- uint64_t current_time = __rdtsc ();
-#else
-#error
-#endif
-
- // Check whether TSC haven't jumped backwards (in case of migration
- // between CPU cores) and whether certain time have elapsed since
- // last command processing. If it didn't do nothing.
- if (current_time >= last_processing_time &&
- current_time - last_processing_time <= max_command_delay)
- return !terminated;
- last_processing_time = current_time;
- }
-#endif
-
- // Check whether there are any commands pending for this thread.
- received = signaler.recv (&cmd, false);
- }
-
- // Process all the commands available at the moment.
- while (received) {
- cmd.destination->process_command (cmd);
- received = signaler.recv (&cmd, false);
- }
-
- return !terminated;
-}
-
-zmq::socket_base_t *zmq::app_thread_t::create_socket (int type_)
-{
- socket_base_t *s = NULL;
- switch (type_) {
- case ZMQ_PAIR:
- s = new (std::nothrow) pair_t (this);
- break;
- case ZMQ_PUB:
- s = new (std::nothrow) pub_t (this);
- break;
- case ZMQ_SUB:
- s = new (std::nothrow) sub_t (this);
- break;
- case ZMQ_REQ:
- s = new (std::nothrow) req_t (this);
- break;
- case ZMQ_REP:
- s = new (std::nothrow) rep_t (this);
- break;
- case ZMQ_XREQ:
- s = new (std::nothrow) xreq_t (this);
- break;
- case ZMQ_XREP:
- s = new (std::nothrow) xrep_t (this);
- break;
- case ZMQ_PULL:
- s = new (std::nothrow) pull_t (this);
- break;
- case ZMQ_PUSH:
- s = new (std::nothrow) push_t (this);
- break;
- default:
- if (sockets.empty ())
- get_ctx ()->no_sockets (this);
- errno = EINVAL;
- return NULL;
- }
- zmq_assert (s);
-
- sockets.push_back (s);
-
- return s;
-}
-
-void zmq::app_thread_t::remove_socket (socket_base_t *socket_)
-{
- sockets.erase (socket_);
- if (sockets.empty ())
- get_ctx ()->no_sockets (this);
-}
-
-void zmq::app_thread_t::process_stop ()
-{
- terminated = true;
-}
-
-bool zmq::app_thread_t::is_terminated ()
-{
- return terminated;
-}
-
diff --git a/src/app_thread.hpp b/src/app_thread.hpp
deleted file mode 100644
index f0deaab..0000000
--- a/src/app_thread.hpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __ZMQ_APP_THREAD_HPP_INCLUDED__
-#define __ZMQ_APP_THREAD_HPP_INCLUDED__
-
-#include <vector>
-
-#include "stdint.hpp"
-#include "object.hpp"
-#include "yarray.hpp"
-#include "signaler.hpp"
-
-namespace zmq
-{
-
- class app_thread_t : public object_t
- {
- public:
-
- app_thread_t (class ctx_t *ctx_, uint32_t thread_slot_);
-
- ~app_thread_t ();
-
- // Interrupt blocking call if the app thread is stuck in one.
- // This function is is called from a different thread!
- void stop ();
-
- // Returns signaler associated with this application thread.
- signaler_t *get_signaler ();
-
- // Processes commands sent to this thread (if any). If 'block' is
- // set to true, returns only after at least one command was processed.
- // If throttle argument is true, commands are processed at most once
- // in a predefined time period. The function returns false is the
- // associated context was terminated, true otherwise.
- bool process_commands (bool block_, bool throttle_);
-
- // Create a socket of a specified type.
- class socket_base_t *create_socket (int type_);
-
- // Unregister the socket from the app_thread (called by socket itself).
- void remove_socket (class socket_base_t *socket_);
-
- // Returns true is the associated context was already terminated.
- bool is_terminated ();
-
- private:
-
- // Command handlers.
- void process_stop ();
-
- // All the sockets created from this application thread.
- typedef yarray_t <socket_base_t> sockets_t;
- sockets_t sockets;
-
- // App thread's signaler object.
- signaler_t signaler;
-
- // Timestamp of when commands were processed the last time.
- uint64_t last_processing_time;
-
- // If true, 'stop' command was already received.
- bool terminated;
-
- app_thread_t (const app_thread_t&);
- void operator = (const app_thread_t&);
- };
-
-}
-
-#endif
diff --git a/src/yarray.hpp b/src/array.hpp
index 8c79b99..b9f7f78 100644
--- a/src/yarray.hpp
+++ b/src/array.hpp
@@ -1,24 +1,25 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __ZMQ_YARRAY_INCLUDED__
-#define __ZMQ_YARRAY_INCLUDED__
+#ifndef __ZMQ_ARRAY_INCLUDED__
+#define __ZMQ_ARRAY_INCLUDED__
#include <vector>
#include <algorithm>
@@ -26,21 +27,57 @@
namespace zmq
{
+ // Base class for objects stored in the array. Note that each object can
+ // be stored in at most one array.
+
+ class array_item_t
+ {
+ public:
+
+ inline array_item_t () :
+ array_index (-1)
+ {
+ }
+
+ // The destructor doesn't have to be virtual. It is mad virtual
+ // just to keep ICC and code checking tools from complaining.
+ inline virtual ~array_item_t ()
+ {
+ }
+
+ inline void set_array_index (int index_)
+ {
+ array_index = index_;
+ }
+
+ inline int get_array_index ()
+ {
+ return array_index;
+ }
+
+ private:
+
+ int array_index;
+
+ array_item_t (const array_item_t&);
+ const array_item_t &operator = (const array_item_t&);
+ };
+
// Fast array implementation with O(1) access to item, insertion and
- // removal. Yarray stores pointers rather than objects. The objects have
- // to be derived from yarray_item_t class.
+ // removal. Array stores pointers rather than objects. The objects have
+ // to be derived from array_item_t class.
- template <typename T> class yarray_t
+ template <typename T> class array_t
{
public:
typedef typename std::vector <T*>::size_type size_type;
- inline yarray_t ()
+ inline array_t ()
{
}
- inline ~yarray_t ()
+ inline ~array_t ()
{
}
@@ -62,17 +99,17 @@ namespace zmq
inline void push_back (T *item_)
{
if (item_)
- item_->set_yarray_index (items.size ());
+ item_->set_array_index (items.size ());
items.push_back (item_);
}
inline void erase (T *item_) {
- erase (item_->get_yarray_index ());
+ erase (item_->get_array_index ());
}
inline void erase (size_type index_) {
if (items.back ())
- items.back ()->set_yarray_index (index_);
+ items.back ()->set_array_index (index_);
items [index_] = items.back ();
items.pop_back ();
}
@@ -80,9 +117,9 @@ namespace zmq
inline void swap (size_type index1_, size_type index2_)
{
if (items [index1_])
- items [index1_]->set_yarray_index (index2_);
+ items [index1_]->set_array_index (index2_);
if (items [index2_])
- items [index2_]->set_yarray_index (index1_);
+ items [index2_]->set_array_index (index1_);
std::swap (items [index1_], items [index2_]);
}
@@ -93,7 +130,7 @@ namespace zmq
inline size_type index (T *item_)
{
- return (size_type) item_->get_yarray_index ();
+ return (size_type) item_->get_array_index ();
}
private:
@@ -101,8 +138,8 @@ namespace zmq
typedef std::vector <T*> items_t;
items_t items;
- yarray_t (const yarray_t&);
- void operator = (const yarray_t&);
+ array_t (const array_t&);
+ const array_t &operator = (const array_t&);
};
}
diff --git a/src/atomic_counter.hpp b/src/atomic_counter.hpp
index b446627..d7116d8 100644
--- a/src/atomic_counter.hpp
+++ b/src/atomic_counter.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -140,7 +141,7 @@ namespace zmq
#endif
atomic_counter_t (const atomic_counter_t&);
- void operator = (const atomic_counter_t&);
+ const atomic_counter_t& operator = (const atomic_counter_t&);
};
}
diff --git a/src/atomic_ptr.hpp b/src/atomic_ptr.hpp
index 54db64f..c106cd5 100644
--- a/src/atomic_ptr.hpp
+++ b/src/atomic_ptr.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -135,7 +136,7 @@ namespace zmq
#endif
atomic_ptr_t (const atomic_ptr_t&);
- void operator = (const atomic_ptr_t&);
+ const atomic_ptr_t &operator = (const atomic_ptr_t&);
};
}
diff --git a/src/blob.hpp b/src/blob.hpp
index a4fa8cd..3c54ac3 100644
--- a/src/blob.hpp
+++ b/src/blob.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/clock.cpp b/src/clock.cpp
new file mode 100644
index 0000000..f98a2f4
--- /dev/null
+++ b/src/clock.cpp
@@ -0,0 +1,118 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "clock.hpp"
+#include "platform.hpp"
+#include "likely.hpp"
+#include "config.hpp"
+#include "err.hpp"
+
+#include <stddef.h>
+
+#if defined _MSC_VER
+#include <intrin.h>
+#endif
+
+#if !defined ZMQ_HAVE_WINDOWS
+#include <sys/time.h>
+#endif
+
+zmq::clock_t::clock_t () :
+ last_tsc (rdtsc ()),
+ last_time (now_us () / 1000)
+{
+}
+
+zmq::clock_t::~clock_t ()
+{
+}
+
+uint64_t zmq::clock_t::now_us ()
+{
+#if defined ZMQ_HAVE_WINDOWS
+
+ // Get the high resolution counter's accuracy.
+ LARGE_INTEGER ticksPerSecond;
+ QueryPerformanceFrequency (&ticksPerSecond);
+
+ // What time is it?
+ LARGE_INTEGER tick;
+ QueryPerformanceCounter (&tick);
+
+ // Convert the tick number into the number of seconds
+ // since the system was started.
+ double ticks_div = (double) (ticksPerSecond.QuadPart / 1000000);
+ return (uint64_t) (tick.QuadPart / ticks_div);
+
+#else
+
+ // 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);
+
+#endif
+}
+
+uint64_t zmq::clock_t::now_ms ()
+{
+ uint64_t tsc = rdtsc ();
+
+ // If TSC is not supported, get precise time and chop off the microseconds.
+ if (!tsc)
+ return now_us () / 1000;
+
+ // If TSC haven't jumped back (in case of migration to a different
+ // CPU core) and if not too much time elapsed since last measurement,
+ // we can return cached time value.
+ if (likely (tsc - last_tsc <= (clock_precision / 2) && tsc >= last_tsc))
+ return last_time;
+
+ last_tsc = tsc;
+ last_time = now_us () / 1000;
+ return last_time;
+}
+
+uint64_t zmq::clock_t::rdtsc ()
+{
+#if (defined _MSC_VER && (defined _M_IX86 || defined _M_X64))
+ return __rdtsc ();
+#elif (defined __GNUC__ && (defined __i386__ || defined __x86_64__))
+ uint32_t low, high;
+ __asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
+ return (uint64_t) high << 32 | low;
+#elif (defined __SUNPRO_CC && (__SUNPRO_CC >= 0x5100) && (defined __i386 || \
+ defined __amd64 || defined __x86_64))
+ union {
+ uint64_t u64val;
+ uint32_t u32val [2];
+ } tsc;
+ asm("rdtsc" : "=a" (tsc.u32val [0]), "=d" (tsc.u32val [1]));
+ return tsc.u64val;
+#elif defined(__s390__)
+ uint64_t tsc;
+ asm("\tstck\t%0\n" : "=Q" (tsc) : : "cc");
+ tsc >>= 12; /* convert to microseconds just to be consistent */
+ return(tsc);
+#else
+ return 0;
+#endif
+}
diff --git a/src/clock.hpp b/src/clock.hpp
new file mode 100644
index 0000000..1b34989
--- /dev/null
+++ b/src/clock.hpp
@@ -0,0 +1,60 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_CLOCK_HPP_INCLUDED__
+#define __ZMQ_CLOCK_HPP_INCLUDED__
+
+#include "stdint.hpp"
+
+namespace zmq
+{
+
+ class clock_t
+ {
+ public:
+
+ clock_t ();
+ ~clock_t ();
+
+ // CPU's timestamp counter. Returns 0 if it's not available.
+ static uint64_t rdtsc ();
+
+ // High precision timestamp.
+ static uint64_t now_us ();
+
+ // Low precision timestamp. In tight loops generating it can be
+ // 10 to 100 times faster than the high precision timestamp.
+ uint64_t now_ms ();
+
+ private:
+
+ // TSC timestamp of when last time measurement was made.
+ uint64_t last_tsc;
+
+ // Physical time corresponding to the TSC above (in milliseconds).
+ uint64_t last_time;
+
+ clock_t (const clock_t&);
+ const clock_t &operator = (const clock_t&);
+ };
+
+}
+
+#endif
diff --git a/src/command.cpp b/src/command.cpp
index 8bf7ea2..e3f3d59 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/command.hpp b/src/command.hpp
index 3d00cd7..35aed0f 100644
--- a/src/command.hpp
+++ b/src/command.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -39,13 +40,16 @@ namespace zmq
own,
attach,
bind,
- revive,
- reader_info,
+ activate_reader,
+ activate_writer,
pipe_term,
pipe_term_ack,
term_req,
term,
- term_ack
+ term_ack,
+ reap,
+ reaped,
+ done
} type;
union {
@@ -61,10 +65,11 @@ namespace zmq
// Sent to socket to let it know about the newly created object.
struct {
- class owned_t *object;
+ class own_t *object;
} own;
- // Attach the engine to the session.
+ // Attach the engine to the session. If engine is NULL, it informs
+ // session that the connection have failed.
struct {
struct i_engine *engine;
unsigned char peer_identity_size;
@@ -83,14 +88,13 @@ namespace zmq
// Sent by pipe writer to inform dormant pipe reader that there
// are messages in the pipe.
struct {
- } revive;
+ } activate_reader;
- // Sent by pipe reader to inform pipe writer
- // about how many messages it has read so far.
- // Used to implement the flow control.
+ // Sent by pipe reader to inform pipe writer about how many
+ // messages it has read so far.
struct {
uint64_t msgs_read;
- } reader_info;
+ } activate_writer;
// Sent by pipe reader to pipe writer to ask it to terminate
// its end of the pipe.
@@ -104,11 +108,12 @@ namespace zmq
// Sent by I/O object ot the socket to request the shutdown of
// the I/O object.
struct {
- class owned_t *object;
+ class own_t *object;
} term_req;
// Sent by socket to I/O object to start its shutdown.
struct {
+ int linger;
} term;
// Sent by I/O object to the socket to acknowledge it has
@@ -116,6 +121,21 @@ namespace zmq
struct {
} term_ack;
+ // Transfers the ownership of the closed socket
+ // to the reaper thread.
+ struct {
+ class socket_base_t *socket;
+ } reap;
+
+ // Closed socket notifies the reaper that it's already deallocated.
+ struct {
+ } reaped;
+
+ // Sent by reaper thread to the term thread when all the sockets
+ // are successfully deallocated.
+ struct {
+ } done;
+
} args;
};
diff --git a/src/config.hpp b/src/config.hpp
index 2c0ac2d..f144512 100644
--- a/src/config.hpp
+++ b/src/config.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,19 +28,14 @@ namespace zmq
enum
{
- // Maximal number of OS threads that can own 0MQ sockets
- // at the same time.
- max_app_threads = 512,
+ // Maximum number of sockets that can be opened at the same time.
+ max_sockets = 512,
// Number of new messages in message pipe needed to trigger new memory
// allocation. Setting this parameter to 256 decreases the impact of
// memory allocation by approximately 99.6%
message_pipe_granularity = 256,
- // Number of signals that can be read by the signaler
- // using a single system call.
- signal_buffer_size = 8,
-
// Determines how often does socket poll for new commands when it
// still has unprocessed messages to handle. Thus, if it is set to 100,
// socket will process 100 inbound messages before doing the poll.
@@ -63,19 +59,25 @@ namespace zmq
// Maximal delta between high and low watermark.
max_wm_delta = 1024,
+ // Swap inteligently batches data for writing to disk. The size of
+ // the batch in bytes is specified by this option.
+ swap_block_size = 8192,
+
// Maximum number of events the I/O thread can process in one go.
max_io_events = 256,
- // Maximal wait time for a timer (milliseconds).
- max_timer_period = 100,
-
// Maximal delay to process command in API thread (in CPU ticks).
// 3,000,000 ticks equals to 1 - 2 milliseconds on current CPUs.
+ // Note that delay is only applied when there is continuous stream of
+ // messages to process. If not so, commands are processed immediately.
max_command_delay = 3000000,
- // Maximal number of non-accepted connections that can be held by
- // TCP listener object.
- tcp_connection_backlog = 10,
+ // Low-precision clock precision in CPU ticks. 1ms. Value of 1000000
+ // should be OK for CPU frequencies above 1GHz. If should work
+ // reasonably well for CPU frequencies above 500MHz. For lower CPU
+ // frequencies you may consider lowering this value to get best
+ // possible latencies.
+ clock_precision = 1000000,
// Maximum transport data unit size for PGM (TPDU).
pgm_max_tpdu = 1500
diff --git a/src/connect_session.cpp b/src/connect_session.cpp
new file mode 100644
index 0000000..0df9854
--- /dev/null
+++ b/src/connect_session.cpp
@@ -0,0 +1,119 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "connect_session.hpp"
+#include "zmq_connecter.hpp"
+#include "pgm_sender.hpp"
+#include "pgm_receiver.hpp"
+
+zmq::connect_session_t::connect_session_t (class io_thread_t *io_thread_,
+ class socket_base_t *socket_, const options_t &options_,
+ const char *protocol_, const char *address_) :
+ session_t (io_thread_, socket_, options_),
+ protocol (protocol_),
+ address (address_)
+{
+}
+
+zmq::connect_session_t::~connect_session_t ()
+{
+}
+
+void zmq::connect_session_t::process_plug ()
+{
+ // Start connection process immediately.
+ start_connecting (false);
+}
+
+void zmq::connect_session_t::start_connecting (bool wait_)
+{
+ // Choose I/O thread to run connecter in. Given that we are already
+ // running in an I/O thread, there must be at least one available.
+ io_thread_t *io_thread = choose_io_thread (options.affinity);
+ zmq_assert (io_thread);
+
+ // Create the connecter object.
+
+ // Both TCP and IPC transports are using the same infrastructure.
+ if (protocol == "tcp" || protocol == "ipc") {
+
+ zmq_connecter_t *connecter = new (std::nothrow) zmq_connecter_t (
+ io_thread, this, options, protocol.c_str (), address.c_str (),
+ wait_);
+ alloc_assert (connecter);
+ launch_child (connecter);
+ return;
+ }
+
+#if defined ZMQ_HAVE_OPENPGM
+
+ // Both PGM and EPGM transports are using the same infrastructure.
+ if (protocol == "pgm" || protocol == "epgm") {
+
+ // For EPGM transport with UDP encapsulation of PGM is used.
+ bool udp_encapsulation = (protocol == "epgm");
+
+ // At this point we'll create message pipes to the session straight
+ // away. There's no point in delaying it as no concept of 'connect'
+ // exists with PGM anyway.
+ if (options.type == ZMQ_PUB || options.type == ZMQ_XPUB) {
+
+ // PGM sender.
+ pgm_sender_t *pgm_sender = new (std::nothrow) pgm_sender_t (
+ io_thread, options);
+ alloc_assert (pgm_sender);
+
+ int rc = pgm_sender->init (udp_encapsulation, address.c_str ());
+ zmq_assert (rc == 0);
+
+ send_attach (this, pgm_sender, blob_t ());
+ }
+ else if (options.type == ZMQ_SUB || options.type == ZMQ_XSUB) {
+
+ // PGM receiver.
+ pgm_receiver_t *pgm_receiver = new (std::nothrow) pgm_receiver_t (
+ io_thread, options);
+ alloc_assert (pgm_receiver);
+
+ int rc = pgm_receiver->init (udp_encapsulation, address.c_str ());
+ zmq_assert (rc == 0);
+
+ send_attach (this, pgm_receiver, blob_t ());
+ }
+ else
+ zmq_assert (false);
+
+ return;
+ }
+#endif
+
+ zmq_assert (false);
+}
+
+void zmq::connect_session_t::attached (const blob_t &peer_identity_)
+{
+}
+
+void zmq::connect_session_t::detached ()
+{
+ // Reconnect.
+ start_connecting (true);
+}
+
diff --git a/src/connect_session.hpp b/src/connect_session.hpp
new file mode 100644
index 0000000..327ad2d
--- /dev/null
+++ b/src/connect_session.hpp
@@ -0,0 +1,65 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_CONNECT_SESSION_HPP_INCLUDED__
+#define __ZMQ_CONNECT_SESSION_HPP_INCLUDED__
+
+#include <string>
+
+#include "session.hpp"
+
+namespace zmq
+{
+
+ // Connect session contains an address to connect to. On disconnect it
+ // attempts to reconnect.
+
+ class connect_session_t : public session_t
+ {
+ public:
+
+ connect_session_t (class io_thread_t *io_thread_,
+ class socket_base_t *socket_, const options_t &options_,
+ const char *protocol_, const char *address_);
+ ~connect_session_t ();
+
+ private:
+
+ // Handlers for events from session base class.
+ void attached (const blob_t &peer_identity_);
+ void detached ();
+
+ // Start the connection process.
+ void start_connecting (bool wait_);
+
+ // Command handlers.
+ void process_plug ();
+
+ // Address to connect to.
+ std::string protocol;
+ std::string address;
+
+ connect_session_t (const connect_session_t&);
+ const connect_session_t &operator = (const connect_session_t&);
+ };
+
+}
+
+#endif
diff --git a/src/ctx.cpp b/src/ctx.cpp
index 397f692..9cbb9de 100644
--- a/src/ctx.cpp
+++ b/src/ctx.cpp
@@ -1,93 +1,88 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <new>
#include <string.h>
-#include "../include/zmq.h"
-
#include "ctx.hpp"
#include "socket_base.hpp"
-#include "app_thread.hpp"
#include "io_thread.hpp"
#include "platform.hpp"
+#include "reaper.hpp"
#include "err.hpp"
#include "pipe.hpp"
#if defined ZMQ_HAVE_WINDOWS
#include "windows.h"
+#else
+#include "unistd.h"
#endif
zmq::ctx_t::ctx_t (uint32_t io_threads_) :
- sockets (0),
- terminated (false)
+ terminating (false)
{
-#ifdef ZMQ_HAVE_WINDOWS
- // Intialise Windows sockets. Note that WSAStartup can be called multiple
- // times given that WSACleanup will be called for each WSAStartup.
- WORD version_requested = MAKEWORD (2, 2);
- WSADATA wsa_data;
- int rc = WSAStartup (version_requested, &wsa_data);
- zmq_assert (rc == 0);
- zmq_assert (LOBYTE (wsa_data.wVersion) == 2 &&
- HIBYTE (wsa_data.wVersion) == 2);
-#endif
+ int rc;
- // Initialise the array of signalers.
- signalers_count = max_app_threads + io_threads_;
- signalers = (signaler_t**) malloc (sizeof (signaler_t*) * signalers_count);
- zmq_assert (signalers);
- memset (signalers, 0, sizeof (signaler_t*) * signalers_count);
+ // Initialise the array of mailboxes. Additional three slots are for
+ // internal log socket and the zmq_term thread the reaper thread.
+ slot_count = max_sockets + io_threads_ + 3;
+ slots = (mailbox_t**) malloc (sizeof (mailbox_t*) * slot_count);
+ alloc_assert (slots);
+
+ // Initialise the infrastructure for zmq_term thread.
+ slots [term_tid] = &term_mailbox;
+
+ // Create the reaper thread.
+ reaper = new (std::nothrow) reaper_t (this, reaper_tid);
+ alloc_assert (reaper);
+ slots [reaper_tid] = reaper->get_mailbox ();
+ reaper->start ();
// Create I/O thread objects and launch them.
- for (uint32_t i = 0; i != io_threads_; i++) {
+ for (uint32_t i = 2; i != io_threads_ + 2; i++) {
io_thread_t *io_thread = new (std::nothrow) io_thread_t (this, i);
- zmq_assert (io_thread);
+ alloc_assert (io_thread);
io_threads.push_back (io_thread);
- signalers [i] = io_thread->get_signaler ();
+ slots [i] = io_thread->get_mailbox ();
io_thread->start ();
}
-}
-int zmq::ctx_t::term ()
-{
- // First send stop command to application threads so that any
- // blocking calls are interrupted.
- for (app_threads_t::size_type i = 0; i != app_threads.size (); i++)
- app_threads [i].app_thread->stop ();
-
- // Then mark context as terminated.
- term_sync.lock ();
- zmq_assert (!terminated);
- terminated = true;
- bool destroy = (sockets == 0);
- term_sync.unlock ();
-
- // If there are no sockets open, destroy the context immediately.
- if (destroy)
- delete this;
+ // In the unused part of the slot array, create a list of empty slots.
+ for (int32_t i = (int32_t) slot_count - 1;
+ i >= (int32_t) io_threads_ + 2; i--) {
+ empty_slots.push_back (i);
+ slots [i] = NULL;
+ }
- return 0;
+ // Create the logging infrastructure.
+ log_socket = create_socket (ZMQ_PUB);
+ zmq_assert (log_socket);
+ rc = log_socket->bind ("sys://log");
+ zmq_assert (rc == 0);
}
zmq::ctx_t::~ctx_t ()
{
+ // Check that there are no remaining sockets.
+ zmq_assert (sockets.empty ());
+
// Ask I/O threads to terminate. If stop signal wasn't sent to I/O
// thread subsequent invocation of destructor would hang-up.
for (io_threads_t::size_type i = 0; i != io_threads.size (); i++)
@@ -97,136 +92,134 @@ zmq::ctx_t::~ctx_t ()
for (io_threads_t::size_type i = 0; i != io_threads.size (); i++)
delete io_threads [i];
- // Close all application theads, sockets, io_objects etc.
- for (app_threads_t::size_type i = 0; i != app_threads.size (); i++)
- delete app_threads [i].app_thread;
-
- // Deallocate all the orphaned pipes.
- while (!pipes.empty ())
- delete *pipes.begin ();
-
- // Deallocate the array of pointers to signalers. No special work is
- // needed as signalers themselves were deallocated with their
- // corresponding (app_/io_) thread objects.
- free (signalers);
-
-#ifdef ZMQ_HAVE_WINDOWS
- // On Windows, uninitialise socket layer.
- int rc = WSACleanup ();
- wsa_assert (rc != SOCKET_ERROR);
-#endif
+ // Deallocate the reaper thread object.
+ delete reaper;
+
+ // Deallocate the array of mailboxes. No special work is
+ // needed as mailboxes themselves were deallocated with their
+ // corresponding io_thread/socket objects.
+ free (slots);
}
-zmq::socket_base_t *zmq::ctx_t::create_socket (int type_)
+int zmq::ctx_t::terminate ()
{
- app_threads_sync.lock ();
-
- // Find whether the calling thread has app_thread_t object associated
- // already. At the same time find an unused app_thread_t so that it can
- // be used if there's no associated object for the calling thread.
- // Check whether thread ID is already assigned. If so, return it.
- app_threads_t::size_type unused = app_threads.size ();
- app_threads_t::size_type current;
- for (current = 0; current != app_threads.size (); current++) {
- if (app_threads [current].associated &&
- thread_t::equal (thread_t::id (), app_threads [current].tid))
- break;
- if (!app_threads [current].associated)
- unused = current;
+ // Check whether termination was already underway, but interrupted and now
+ // restarted.
+ slot_sync.lock ();
+ bool restarted = terminating;
+ slot_sync.unlock ();
+
+ // First attempt to terminate the context.
+ if (!restarted) {
+
+ // Close the logging infrastructure.
+ log_sync.lock ();
+ int rc = log_socket->close ();
+ zmq_assert (rc == 0);
+ log_socket = NULL;
+ log_sync.unlock ();
+
+ // First send stop command to sockets so that any blocking calls can be
+ // interrupted. If there are no sockets we can ask reaper thread to stop.
+ slot_sync.lock ();
+ terminating = true;
+ for (sockets_t::size_type i = 0; i != sockets.size (); i++)
+ sockets [i]->stop ();
+ if (sockets.empty ())
+ reaper->stop ();
+ slot_sync.unlock ();
}
- // If no app_thread_t is associated with the calling thread,
- // associate it with one of the unused app_thread_t objects.
- if (current == app_threads.size ()) {
+ // Wait till reaper thread closes all the sockets.
+ command_t cmd;
+ int rc = term_mailbox.recv (&cmd, true);
+ if (rc == -1 && errno == EINTR)
+ return -1;
+ zmq_assert (rc == 0);
+ zmq_assert (cmd.type == command_t::done);
+ slot_sync.lock ();
+ zmq_assert (sockets.empty ());
+ slot_sync.unlock ();
- // If all the existing app_threads are already used, create one more.
- if (unused == app_threads.size ()) {
+ // Deallocate the resources.
+ delete this;
- // If max_app_threads limit was reached, return error.
- if (app_threads.size () == max_app_threads) {
- app_threads_sync.unlock ();
- errno = EMTHREAD;
- return NULL;
- }
+ return 0;
+}
- // Create the new application thread proxy object.
- app_thread_info_t info;
- memset (&info, 0, sizeof (info));
- info.associated = false;
- info.app_thread = new (std::nothrow) app_thread_t (this,
- io_threads.size () + app_threads.size ());
- zmq_assert (info.app_thread);
- signalers [io_threads.size () + app_threads.size ()] =
- info.app_thread->get_signaler ();
- app_threads.push_back (info);
- }
+zmq::socket_base_t *zmq::ctx_t::create_socket (int type_)
+{
+ slot_sync.lock ();
- // Incidentally, this works both when there is an unused app_thread
- // and when a new one is created.
- current = unused;
+ // Once zmq_term() was called, we can't create new sockets.
+ if (terminating) {
+ slot_sync.unlock ();
+ errno = ETERM;
+ return NULL;
+ }
- // Associate the selected app_thread with the OS thread.
- app_threads [current].associated = true;
- app_threads [current].tid = thread_t::id ();
+ // If max_sockets limit was reached, return error.
+ if (empty_slots.empty ()) {
+ slot_sync.unlock ();
+ errno = EMFILE;
+ return NULL;
}
- app_thread_t *thread = app_threads [current].app_thread;
- app_threads_sync.unlock ();
+ // Choose a slot for the socket.
+ uint32_t slot = empty_slots.back ();
+ empty_slots.pop_back ();
- socket_base_t *s = thread->create_socket (type_);
- if (!s)
+ // Create the socket and register its mailbox.
+ socket_base_t *s = socket_base_t::create (type_, this, slot);
+ if (!s) {
+ empty_slots.push_back (slot);
+ slot_sync.unlock ();
return NULL;
+ }
+ sockets.push_back (s);
+ slots [slot] = s->get_mailbox ();
- term_sync.lock ();
- sockets++;
- term_sync.unlock ();
+ slot_sync.unlock ();
return s;
}
-void zmq::ctx_t::destroy_socket ()
+void zmq::ctx_t::destroy_socket (class socket_base_t *socket_)
{
- // If zmq_term was already called and there are no more sockets,
- // terminate the whole 0MQ infrastructure.
- term_sync.lock ();
- zmq_assert (sockets > 0);
- sockets--;
- bool destroy = (sockets == 0 && terminated);
- term_sync.unlock ();
-
- if (destroy)
- delete this;
-}
+ slot_sync.lock ();
-void zmq::ctx_t::no_sockets (app_thread_t *thread_)
-{
- app_threads_sync.lock ();
- app_threads_t::size_type i;
- for (i = 0; i != app_threads.size (); i++)
- if (app_threads [i].app_thread == thread_) {
- app_threads [i].associated = false;
- break;
- }
- zmq_assert (i != app_threads.size ());
- app_threads_sync.unlock ();
+ // Free the associared thread slot.
+ uint32_t tid = socket_->get_tid ();
+ empty_slots.push_back (tid);
+ slots [tid] = NULL;
+
+ // Remove the socket from the list of sockets.
+ sockets.erase (socket_);
+
+ // If zmq_term() was already called and there are no more socket
+ // we can ask reaper thread to terminate.
+ if (terminating && sockets.empty ())
+ reaper->stop ();
+
+ slot_sync.unlock ();
}
-void zmq::ctx_t::send_command (uint32_t destination_,
- const command_t &command_)
+zmq::object_t *zmq::ctx_t::get_reaper ()
{
- signalers [destination_]->send (command_);
+ return reaper;
}
-bool zmq::ctx_t::recv_command (uint32_t thread_slot_,
- command_t *command_, bool block_)
+void zmq::ctx_t::send_command (uint32_t tid_, const command_t &command_)
{
- return signalers [thread_slot_]->recv (command_, block_);
+ slots [tid_]->send (command_);
}
zmq::io_thread_t *zmq::ctx_t::choose_io_thread (uint64_t affinity_)
{
+ if (io_threads.empty ())
+ return NULL;
+
// Find the I/O thread with minimum load.
- zmq_assert (io_threads.size () > 0);
int min_load = -1;
io_threads_t::size_type result = 0;
for (io_threads_t::size_type i = 0; i != io_threads.size (); i++) {
@@ -242,29 +235,12 @@ zmq::io_thread_t *zmq::ctx_t::choose_io_thread (uint64_t affinity_)
return io_threads [result];
}
-void zmq::ctx_t::register_pipe (class pipe_t *pipe_)
-{
- pipes_sync.lock ();
- bool inserted = pipes.insert (pipe_).second;
- zmq_assert (inserted);
- pipes_sync.unlock ();
-}
-
-void zmq::ctx_t::unregister_pipe (class pipe_t *pipe_)
-{
- pipes_sync.lock ();
- pipes_t::size_type erased = pipes.erase (pipe_);
- zmq_assert (erased == 1);
- pipes_sync.unlock ();
-}
-
-int zmq::ctx_t::register_endpoint (const char *addr_,
- socket_base_t *socket_)
+int zmq::ctx_t::register_endpoint (const char *addr_, endpoint_t &endpoint_)
{
endpoints_sync.lock ();
- bool inserted = endpoints.insert (std::make_pair (std::string (addr_),
- socket_)).second;
+ bool inserted = endpoints.insert (endpoints_t::value_type (
+ std::string (addr_), endpoint_)).second;
if (!inserted) {
errno = EADDRINUSE;
endpoints_sync.unlock ();
@@ -281,19 +257,19 @@ void zmq::ctx_t::unregister_endpoints (socket_base_t *socket_)
endpoints_t::iterator it = endpoints.begin ();
while (it != endpoints.end ()) {
- if (it->second == socket_) {
+ if (it->second.socket == socket_) {
endpoints_t::iterator to_erase = it;
- it++;
+ ++it;
endpoints.erase (to_erase);
continue;
}
- it++;
+ ++it;
}
endpoints_sync.unlock ();
}
-zmq::socket_base_t *zmq::ctx_t::find_endpoint (const char *addr_)
+zmq::endpoint_t zmq::ctx_t::find_endpoint (const char *addr_)
{
endpoints_sync.lock ();
@@ -301,17 +277,37 @@ zmq::socket_base_t *zmq::ctx_t::find_endpoint (const char *addr_)
if (it == endpoints.end ()) {
endpoints_sync.unlock ();
errno = ECONNREFUSED;
- return NULL;
+ endpoint_t empty = {NULL, options_t()};
+ return empty;
}
- socket_base_t *endpoint = it->second;
+ endpoint_t *endpoint = &it->second;
// Increment the command sequence number of the peer so that it won't
// get deallocated until "bind" command is issued by the caller.
// The subsequent 'bind' has to be called with inc_seqnum parameter
// set to false, so that the seqnum isn't incremented twice.
- endpoint->inc_seqnum ();
+ endpoint->socket->inc_seqnum ();
endpoints_sync.unlock ();
- return endpoint;
+ return *endpoint;
}
+void zmq::ctx_t::log (const char *format_, va_list args_)
+{
+ // Create the log message.
+ zmq_msg_t msg;
+ int rc = zmq_msg_init_size (&msg, strlen (format_) + 1);
+ zmq_assert (rc == 0);
+ memcpy (zmq_msg_data (&msg), format_, zmq_msg_size (&msg));
+
+ // At this point we migrate the log socket to the current thread.
+ // We rely on mutex for executing the memory barrier.
+ log_sync.lock ();
+ if (log_socket)
+ log_socket->send (&msg, 0);
+ log_sync.unlock ();
+
+ zmq_msg_close (&msg);
+}
+
+
diff --git a/src/ctx.hpp b/src/ctx.hpp
index c96a923..c6ea4ce 100644
--- a/src/ctx.hpp
+++ b/src/ctx.hpp
@@ -1,39 +1,53 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_CTX_HPP_INCLUDED__
#define __ZMQ_CTX_HPP_INCLUDED__
-#include <vector>
-#include <set>
#include <map>
+#include <vector>
#include <string>
+#include <stdarg.h>
+
+#include "../include/zmq.h"
-#include "signaler.hpp"
+#include "mailbox.hpp"
+#include "semaphore.hpp"
#include "ypipe.hpp"
+#include "array.hpp"
#include "config.hpp"
#include "mutex.hpp"
#include "stdint.hpp"
#include "thread.hpp"
+#include "options.hpp"
namespace zmq
{
+ // Information associated with inproc endpoint. Note that endpoint options
+ // are registered as well so that the peer can access them without a need
+ // for synchronisation, handshaking or similar.
+ struct endpoint_t
+ {
+ class socket_base_t *socket;
+ options_t options;
+ };
// Context object encapsulates all the global state associated with
// the library.
@@ -50,104 +64,87 @@ namespace zmq
// no more sockets open it'll cause all the infrastructure to be shut
// down. If there are open sockets still, the deallocation happens
// after the last one is closed.
- int term ();
+ int terminate ();
- // Create a socket.
+ // Create and destroy a socket.
class socket_base_t *create_socket (int type_);
-
- // Destroy a socket.
- void destroy_socket ();
-
- // Called by app_thread_t when it has no more sockets. The function
- // should disassociate the object from the current OS thread.
- void no_sockets (class app_thread_t *thread_);
+ void destroy_socket (class socket_base_t *socket_);
// Send command to the destination thread.
- void send_command (uint32_t destination_, const command_t &command_);
-
- // Receive command from another thread.
- bool recv_command (uint32_t thread_slot_, command_t *command_,
- bool block_);
+ void send_command (uint32_t tid_, const command_t &command_);
// Returns the I/O thread that is the least busy at the moment.
- // Taskset specifies which I/O threads are eligible (0 = all).
- class io_thread_t *choose_io_thread (uint64_t taskset_);
+ // Affinity specifies which I/O threads are eligible (0 = all).
+ // Returns NULL is no I/O thread is available.
+ class io_thread_t *choose_io_thread (uint64_t affinity_);
- // All pipes are registered with the context so that even the
- // orphaned pipes can be deallocated on the terminal shutdown.
- void register_pipe (class pipe_t *pipe_);
- void unregister_pipe (class pipe_t *pipe_);
+ // Returns reaper thread object.
+ class object_t *get_reaper ();
// Management of inproc endpoints.
- int register_endpoint (const char *addr_, class socket_base_t *socket_);
+ int register_endpoint (const char *addr_, endpoint_t &endpoint_);
void unregister_endpoints (class socket_base_t *socket_);
- class socket_base_t *find_endpoint (const char *addr_);
+ endpoint_t find_endpoint (const char *addr_);
+
+ // Logging.
+ void log (const char *format_, va_list args_);
+
+ enum {
+ term_tid = 0,
+ reaper_tid = 1
+ };
private:
~ctx_t ();
- struct app_thread_info_t
- {
- // If false, 0MQ application thread is free, there's no associated
- // OS thread.
- bool associated;
+ // Sockets belonging to this context. We need the list so that
+ // we can notify the sockets when zmq_term() is called. The sockets
+ // will return ETERM then.
+ typedef array_t <socket_base_t> sockets_t;
+ sockets_t sockets;
- // ID of the associated OS thread. If 'associated' is false,
- // this field contains bogus data.
- thread_t::id_t tid;
+ // List of unused thread slots.
+ typedef std::vector <uint32_t> emtpy_slots_t;
+ emtpy_slots_t empty_slots;
- // Pointer to the 0MQ application thread object.
- class app_thread_t *app_thread;
- };
+ // If true, zmq_term was already called.
+ bool terminating;
- // Application threads.
- typedef std::vector <app_thread_info_t> app_threads_t;
- app_threads_t app_threads;
+ // Synchronisation of accesses to global slot-related data:
+ // sockets, empty_slots, terminating. It also synchronises
+ // access to zombie sockets as such (as oposed to slots) and provides
+ // a memory barrier to ensure that all CPU cores see the same data.
+ mutex_t slot_sync;
- // Synchronisation of accesses to shared application thread data.
- mutex_t app_threads_sync;
+ // The reaper thread.
+ class reaper_t *reaper;
// I/O threads.
typedef std::vector <class io_thread_t*> io_threads_t;
io_threads_t io_threads;
- // Array of pointers to signalers for both application and I/O threads.
- int signalers_count;
- signaler_t **signalers;
-
- // As pipes may reside in orphaned state in particular moments
- // of the pipe shutdown process, i.e. neither pipe reader nor
- // pipe writer hold reference to the pipe, we have to hold references
- // to all pipes in context so that we can deallocate them
- // during terminal shutdown even though it conincides with the
- // pipe being in the orphaned state.
- typedef std::set <class pipe_t*> pipes_t;
- pipes_t pipes;
+ // Array of pointers to mailboxes for both application and I/O threads.
+ uint32_t slot_count;
+ mailbox_t **slots;
- // Synchronisation of access to the pipes repository.
- mutex_t pipes_sync;
-
- // Number of sockets alive.
- int sockets;
-
- // If true, zmq_term was already called. When last socket is closed
- // the whole 0MQ infrastructure should be deallocated.
- bool terminated;
-
- // Synchronisation of access to the termination data (socket count
- // and 'terminated' flag).
- mutex_t term_sync;
+ // Mailbox for zmq_term thread.
+ mailbox_t term_mailbox;
// List of inproc endpoints within this context.
- typedef std::map <std::string, class socket_base_t*> endpoints_t;
+ typedef std::map <std::string, endpoint_t> endpoints_t;
endpoints_t endpoints;
// Synchronisation of access to the list of inproc endpoints.
mutex_t endpoints_sync;
+ // PUB socket for logging. The socket is shared among all the threads,
+ // thus it is synchronised by a mutex.
+ class socket_base_t *log_socket;
+ mutex_t log_sync;
+
ctx_t (const ctx_t&);
- void operator = (const ctx_t&);
+ const ctx_t &operator = (const ctx_t&);
};
}
diff --git a/src/zmq_decoder.cpp b/src/decoder.cpp
index dcf8e76..c9a7dc9 100644
--- a/src/zmq_decoder.cpp
+++ b/src/decoder.cpp
@@ -1,114 +1,129 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>
-#include "zmq_decoder.hpp"
+#include "decoder.hpp"
#include "i_inout.hpp"
#include "wire.hpp"
#include "err.hpp"
-zmq::zmq_decoder_t::zmq_decoder_t (size_t bufsize_) :
- decoder_t <zmq_decoder_t> (bufsize_),
+zmq::decoder_t::decoder_t (size_t bufsize_) :
+ decoder_base_t <decoder_t> (bufsize_),
destination (NULL)
{
zmq_msg_init (&in_progress);
// At the beginning, read one byte and go to one_byte_size_ready state.
- next_step (tmpbuf, 1, &zmq_decoder_t::one_byte_size_ready);
+ next_step (tmpbuf, 1, &decoder_t::one_byte_size_ready);
}
-zmq::zmq_decoder_t::~zmq_decoder_t ()
+zmq::decoder_t::~decoder_t ()
{
zmq_msg_close (&in_progress);
}
-void zmq::zmq_decoder_t::set_inout (i_inout *destination_)
+void zmq::decoder_t::set_inout (i_inout *destination_)
{
destination = destination_;
}
-bool zmq::zmq_decoder_t::one_byte_size_ready ()
+bool zmq::decoder_t::one_byte_size_ready ()
{
// First byte of size is read. If it is 0xff read 8-byte size.
// Otherwise allocate the buffer for message data and read the
// message data into it.
if (*tmpbuf == 0xff)
- next_step (tmpbuf, 8, &zmq_decoder_t::eight_byte_size_ready);
+ next_step (tmpbuf, 8, &decoder_t::eight_byte_size_ready);
else {
- // TODO: Handle over-sized message decently.
-
// There has to be at least one byte (the flags) in the message).
- zmq_assert (*tmpbuf > 0);
+ if (!*tmpbuf) {
+ decoding_error ();
+ return false;
+ }
// in_progress is initialised at this point so in theory we should
// close it before calling zmq_msg_init_size, however, it's a 0-byte
// message and thus we can treat it as uninitialised...
int rc = zmq_msg_init_size (&in_progress, *tmpbuf - 1);
+ if (rc != 0 && errno == ENOMEM) {
+ rc = zmq_msg_init (&in_progress);
+ errno_assert (rc == 0);
+ decoding_error ();
+ return false;
+ }
errno_assert (rc == 0);
- next_step (tmpbuf, 1, &zmq_decoder_t::flags_ready);
+
+ next_step (tmpbuf, 1, &decoder_t::flags_ready);
}
return true;
}
-bool zmq::zmq_decoder_t::eight_byte_size_ready ()
+bool zmq::decoder_t::eight_byte_size_ready ()
{
// 8-byte size is read. Allocate the buffer for message body and
// read the message data into it.
size_t size = (size_t) get_uint64 (tmpbuf);
- // TODO: Handle over-sized message decently.
-
// There has to be at least one byte (the flags) in the message).
- zmq_assert (size > 0);
-
+ if (!size) {
+ decoding_error ();
+ return false;
+ }
// in_progress is initialised at this point so in theory we should
// close it before calling zmq_msg_init_size, however, it's a 0-byte
// message and thus we can treat it as uninitialised...
int rc = zmq_msg_init_size (&in_progress, size - 1);
+ if (rc != 0 && errno == ENOMEM) {
+ rc = zmq_msg_init (&in_progress);
+ errno_assert (rc == 0);
+ decoding_error ();
+ return false;
+ }
errno_assert (rc == 0);
- next_step (tmpbuf, 1, &zmq_decoder_t::flags_ready);
+ next_step (tmpbuf, 1, &decoder_t::flags_ready);
return true;
}
-bool zmq::zmq_decoder_t::flags_ready ()
+bool zmq::decoder_t::flags_ready ()
{
// Store the flags from the wire into the message structure.
in_progress.flags = tmpbuf [0];
next_step (zmq_msg_data (&in_progress), zmq_msg_size (&in_progress),
- &zmq_decoder_t::message_ready);
+ &decoder_t::message_ready);
return true;
}
-bool zmq::zmq_decoder_t::message_ready ()
+bool zmq::decoder_t::message_ready ()
{
// Message is completely read. Push it further and start reading
// new message. (in_progress is a 0-byte message after this point.)
if (!destination || !destination->write (&in_progress))
return false;
- next_step (tmpbuf, 1, &zmq_decoder_t::one_byte_size_ready);
+ next_step (tmpbuf, 1, &decoder_t::one_byte_size_ready);
return true;
}
diff --git a/src/decoder.hpp b/src/decoder.hpp
index f05f651..f554e46 100644
--- a/src/decoder.hpp
+++ b/src/decoder.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,37 +28,39 @@
#include "err.hpp"
+#include "../include/zmq.h"
+
namespace zmq
{
// Helper base class for decoders that know the amount of data to read
// in advance at any moment. Knowing the amount in advance is a property
- // of the protocol used. Both AMQP and backend protocol are based on
- // size-prefixed paradigm, therefore they are using decoder_t to parse
- // the messages. On the other hand, XML-based transports (like XMPP or
- // SOAP) don't allow for knowing the size of data to read in advance and
- // should use different decoding algorithms.
+ // of the protocol used. 0MQ framing protocol is based size-prefixed
+ // paradigm, whixh qualifies it to be parsed by this class.
+ // On the other hand, XML-based transports (like XMPP or SOAP) don't allow
+ // for knowing the size of data to read in advance and should use different
+ // decoding algorithms.
//
- // Decoder implements the state machine that parses the incoming buffer.
+ // This class implements the state machine that parses the incoming buffer.
// Derived class should implement individual state machine actions.
- template <typename T> class decoder_t
+ template <typename T> class decoder_base_t
{
public:
- inline decoder_t (size_t bufsize_) :
+ inline decoder_base_t (size_t bufsize_) :
read_pos (NULL),
to_read (0),
next (NULL),
bufsize (bufsize_)
{
buf = (unsigned char*) malloc (bufsize_);
- zmq_assert (buf);
+ alloc_assert (buf);
}
// The destructor doesn't have to be virtual. It is mad virtual
// just to keep ICC and code checking tools from complaining.
- inline virtual ~decoder_t ()
+ inline virtual ~decoder_base_t ()
{
free (buf);
}
@@ -89,6 +92,10 @@ namespace zmq
// bytes actually processed.
inline size_t process_buffer (unsigned char *data_, size_t size_)
{
+ // Check if we had an error in previous attempt.
+ if (unlikely (!(static_cast <T*> (this)->next)))
+ return (size_t) -1;
+
// In case of zero-copy simply adjust the pointers, no copying
// is required. Also, run the state machine in case all the data
// were processed.
@@ -96,9 +103,13 @@ namespace zmq
read_pos += size_;
to_read -= size_;
- while (!to_read)
- if (!(static_cast <T*> (this)->*next) ())
+ while (!to_read) {
+ if (!(static_cast <T*> (this)->*next) ()) {
+ if (unlikely (!(static_cast <T*> (this)->next)))
+ return (size_t) -1;
return size_;
+ }
+ }
return size_;
}
@@ -107,9 +118,13 @@ namespace zmq
// Try to get more space in the message to fill in.
// If none is available, return.
- while (!to_read)
- if (!(static_cast <T*> (this)->*next) ())
+ while (!to_read) {
+ if (!(static_cast <T*> (this)->*next) ()) {
+ if (unlikely (!(static_cast <T*> (this)->next)))
+ return (size_t) -1;
return pos;
+ }
+ }
// If there are no more data in the buffer, return.
if (pos == size_)
@@ -140,6 +155,13 @@ namespace zmq
next = next_;
}
+ // This function should be called from the derived class to
+ // abort decoder state machine.
+ inline void decoding_error ()
+ {
+ next = NULL;
+ }
+
private:
unsigned char *read_pos;
@@ -149,6 +171,32 @@ namespace zmq
size_t bufsize;
unsigned char *buf;
+ decoder_base_t (const decoder_base_t&);
+ const decoder_base_t &operator = (const decoder_base_t&);
+ };
+
+ // Decoder for 0MQ framing protocol. Converts data batches into messages.
+
+ class decoder_t : public decoder_base_t <decoder_t>
+ {
+ public:
+
+ decoder_t (size_t bufsize_);
+ ~decoder_t ();
+
+ void set_inout (struct i_inout *destination_);
+
+ private:
+
+ bool one_byte_size_ready ();
+ bool eight_byte_size_ready ();
+ bool flags_ready ();
+ bool message_ready ();
+
+ struct i_inout *destination;
+ unsigned char tmpbuf [8];
+ ::zmq_msg_t in_progress;
+
decoder_t (const decoder_t&);
void operator = (const decoder_t&);
};
@@ -156,3 +204,4 @@ namespace zmq
}
#endif
+
diff --git a/src/queue.cpp b/src/device.cpp
index 36fab07..351283a 100644
--- a/src/queue.cpp
+++ b/src/device.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -21,17 +22,20 @@
#include "../include/zmq.h"
-#include "queue.hpp"
+#include "device.hpp"
#include "socket_base.hpp"
#include "likely.hpp"
#include "err.hpp"
-int zmq::queue (class socket_base_t *insocket_,
+int zmq::device (class socket_base_t *insocket_,
class socket_base_t *outsocket_)
{
zmq_msg_t msg;
int rc = zmq_msg_init (&msg);
- zmq_assert (rc == 0);
+
+ if (rc != 0) {
+ return -1;
+ }
int64_t more;
size_t moresz;
@@ -51,9 +55,7 @@ int zmq::queue (class socket_base_t *insocket_,
// Wait while there are either requests or replies to process.
rc = zmq_poll (&items [0], 2, -1);
if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
+ return -1;
}
// The algorithm below asumes ratio of request and replies processed
@@ -67,24 +69,18 @@ int zmq::queue (class socket_base_t *insocket_,
rc = insocket_->recv (&msg, 0);
if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
+ return -1;
}
moresz = sizeof (more);
rc = insocket_->getsockopt (ZMQ_RCVMORE, &more, &moresz);
if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
+ return -1;
}
rc = outsocket_->send (&msg, more ? ZMQ_SNDMORE : 0);
if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
+ return -1;
}
if (!more)
@@ -98,24 +94,18 @@ int zmq::queue (class socket_base_t *insocket_,
rc = outsocket_->recv (&msg, 0);
if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
+ return -1;
}
moresz = sizeof (more);
rc = outsocket_->getsockopt (ZMQ_RCVMORE, &more, &moresz);
if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
+ return -1;
}
rc = insocket_->send (&msg, more ? ZMQ_SNDMORE : 0);
if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
+ return -1;
}
if (!more)
diff --git a/src/queue.hpp b/src/device.hpp
index dc968cb..c5b7118 100644
--- a/src/queue.hpp
+++ b/src/device.hpp
@@ -1,29 +1,30 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __ZMQ_QUEUE_HPP_INCLUDED__
-#define __ZMQ_QUEUE_HPP_INCLUDED__
+#ifndef __ZMQ_DEVICE_HPP_INCLUDED__
+#define __ZMQ_DEVICE_HPP_INCLUDED__
namespace zmq
{
- int queue (class socket_base_t *insocket_,
+ int device (class socket_base_t *insocket_,
class socket_base_t *outsocket_);
}
diff --git a/src/devpoll.cpp b/src/devpoll.cpp
index 003f465..25763c6 100644
--- a/src/devpoll.cpp
+++ b/src/devpoll.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,7 +24,6 @@
#include <sys/devpoll.h>
#include <sys/time.h>
-#include <sys/resource.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
@@ -40,15 +40,6 @@
zmq::devpoll_t::devpoll_t () :
stopping (false)
{
- // Get limit on open files
- struct rlimit rl;
- int rc = getrlimit (RLIMIT_NOFILE, &rl);
- errno_assert (rc != -1);
- fd_table.resize (rl.rlim_cur);
-
- for (rlim_t i = 0; i < rl.rlim_cur; i ++)
- fd_table [i].valid = false;
-
devpoll_fd = open ("/dev/poll", O_RDWR);
errno_assert (devpoll_fd != -1);
}
@@ -56,10 +47,6 @@ zmq::devpoll_t::devpoll_t () :
zmq::devpoll_t::~devpoll_t ()
{
worker.stop ();
-
- // Make sure there are no fds registered on shutdown.
- zmq_assert (load.get () == 0);
-
close (devpoll_fd);
}
@@ -73,6 +60,16 @@ void zmq::devpoll_t::devpoll_ctl (fd_t fd_, short events_)
zmq::devpoll_t::handle_t zmq::devpoll_t::add_fd (fd_t fd_,
i_poll_events *reactor_)
{
+ // If the file descriptor table is too small expand it.
+ fd_table_t::size_type sz = fd_table.size ();
+ if (sz <= (fd_table_t::size_type) fd_) {
+ fd_table.resize (fd_ + 1);
+ while (sz != (fd_table_t::size_type) (fd_ + 1)) {
+ fd_table [sz].valid = false;
+ ++sz;
+ }
+ }
+
assert (!fd_table [fd_].valid);
fd_table [fd_].events = 0;
@@ -84,7 +81,7 @@ zmq::devpoll_t::handle_t zmq::devpoll_t::add_fd (fd_t fd_,
pending_list.push_back (fd_);
// Increase the load metric of the thread.
- load.add (1);
+ adjust_load (1);
return fd_;
}
@@ -97,7 +94,7 @@ void zmq::devpoll_t::rm_fd (handle_t handle_)
fd_table [handle_].valid = false;
// Decrease the load metric of the thread.
- load.sub (1);
+ adjust_load (-1);
}
void zmq::devpoll_t::set_pollin (handle_t handle_)
@@ -128,23 +125,6 @@ void zmq::devpoll_t::reset_pollout (handle_t handle_)
devpoll_ctl (handle_, fd_table [handle_].events);
}
-void zmq::devpoll_t::add_timer (i_poll_events *events_)
-{
- timers.push_back (events_);
-}
-
-void zmq::devpoll_t::cancel_timer (i_poll_events *events_)
-{
- timers_t::iterator it = std::find (timers.begin (), timers.end (), events_);
- if (it != timers.end ())
- timers.erase (it);
-}
-
-int zmq::devpoll_t::get_load ()
-{
- return load.get ();
-}
-
void zmq::devpoll_t::start ()
{
worker.start (worker_routine, this);
@@ -157,10 +137,6 @@ void zmq::devpoll_t::stop ()
void zmq::devpoll_t::loop ()
{
- // According to the poll(7d) man page, we can retrieve
- // no more then (OPEN_MAX - 1) events.
- int nfds = std::min ((int) max_io_events, OPEN_MAX - 1);
-
while (!stopping) {
struct pollfd ev_buf [max_io_events];
@@ -170,31 +146,23 @@ void zmq::devpoll_t::loop ()
fd_table [pending_list [i]].accepted = true;
pending_list.clear ();
- poll_req.dp_fds = &ev_buf [0];
- poll_req.dp_nfds = nfds;
- poll_req.dp_timeout = timers.empty () ? -1 : max_timer_period;
+ // Execute any due timers.
+ int timeout = (int) execute_timers ();
// Wait for events.
+ // On Solaris, we can retrieve no more then (OPEN_MAX - 1) events.
+ poll_req.dp_fds = &ev_buf [0];
+#if defined ZMQ_HAVE_SOLARIS
+ poll_req.dp_nfds = std::min ((int) max_io_events, OPEN_MAX - 1);
+#else
+ poll_req.dp_nfds = max_io_events;
+#endif
+ poll_req.dp_timeout = timeout ? timeout : -1;
int n = ioctl (devpoll_fd, DP_POLL, &poll_req);
if (n == -1 && errno == EINTR)
continue;
errno_assert (n != -1);
- // Handle timer.
- if (!n) {
-
- // Use local list of timers as timer handlers may fill new timers
- // into the original array.
- timers_t t;
- std::swap (timers, t);
-
- // Trigger all the timers.
- for (timers_t::iterator it = t.begin (); it != t.end (); it ++)
- (*it)->timer_event ();
-
- continue;
- }
-
for (int i = 0; i < n; i ++) {
fd_entry_t *fd_ptr = &fd_table [ev_buf [i].fd];
diff --git a/src/devpoll.hpp b/src/devpoll.hpp
index 019d268..2eaaeb2 100644
--- a/src/devpoll.hpp
+++ b/src/devpoll.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,21 +23,20 @@
#include "platform.hpp"
-#if defined ZMQ_HAVE_SOLARIS || ZMQ_HAVE_HPUX
+#if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_HPUX
#include <vector>
#include "fd.hpp"
#include "thread.hpp"
-#include "atomic_counter.hpp"
+#include "poller_base.hpp"
namespace zmq
{
- // Implements socket polling mechanism using the Solaris-specific
- // "/dev/poll" interface.
+ // Implements socket polling mechanism using the "/dev/poll" interface.
- class devpoll_t
+ class devpoll_t : public poller_base_t
{
public:
@@ -52,9 +52,6 @@ namespace zmq
void reset_pollin (handle_t handle_);
void set_pollout (handle_t handle_);
void reset_pollout (handle_t handle_);
- void add_timer (struct i_poll_events *events_);
- void cancel_timer (struct i_poll_events *events_);
- int get_load ();
void start ();
void stop ();
@@ -77,7 +74,8 @@ namespace zmq
bool accepted;
};
- std::vector <fd_entry_t> fd_table;
+ typedef std::vector <fd_entry_t> fd_table_t;
+ fd_table_t fd_table;
typedef std::vector <fd_t> pending_list_t;
pending_list_t pending_list;
@@ -85,22 +83,14 @@ namespace zmq
// Pollset manipulation function.
void devpoll_ctl (fd_t fd_, short events_);
- // List of all the engines waiting for the timer event.
- typedef std::vector <struct i_poll_events*> timers_t;
- timers_t timers;
-
// If true, thread is in the process of shutting down.
bool stopping;
// Handle of the physical thread doing the I/O work.
thread_t worker;
- // Load of the poller. Currently number of file descriptors
- // registered with the poller.
- atomic_counter_t load;
-
devpoll_t (const devpoll_t&);
- void operator = (const devpoll_t&);
+ const devpoll_t &operator = (const devpoll_t&);
};
}
diff --git a/src/dist.cpp b/src/dist.cpp
new file mode 100644
index 0000000..e447bc1
--- /dev/null
+++ b/src/dist.cpp
@@ -0,0 +1,196 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "../include/zmq.h"
+
+#include "dist.hpp"
+#include "pipe.hpp"
+#include "err.hpp"
+#include "own.hpp"
+#include "msg_content.hpp"
+
+zmq::dist_t::dist_t (own_t *sink_) :
+ active (0),
+ more (false),
+ sink (sink_),
+ terminating (false)
+{
+}
+
+zmq::dist_t::~dist_t ()
+{
+ zmq_assert (pipes.empty ());
+}
+
+void zmq::dist_t::attach (writer_t *pipe_)
+{
+ // If we are in the middle of sending a message, let's postpone plugging
+ // in the pipe.
+ if (!terminating && more) {
+ new_pipes.push_back (pipe_);
+ return;
+ }
+
+ pipe_->set_event_sink (this);
+
+ pipes.push_back (pipe_);
+ pipes.swap (active, pipes.size () - 1);
+ active++;
+
+ if (terminating) {
+ sink->register_term_acks (1);
+ pipe_->terminate ();
+ }
+}
+
+void zmq::dist_t::terminate ()
+{
+ zmq_assert (!terminating);
+ terminating = true;
+
+ sink->register_term_acks (pipes.size ());
+ for (pipes_t::size_type i = 0; i != pipes.size (); i++)
+ pipes [i]->terminate ();
+}
+
+void zmq::dist_t::terminated (writer_t *pipe_)
+{
+ // Remove the pipe from the list; adjust number of active pipes
+ // accordingly.
+ if (pipes.index (pipe_) < active)
+ active--;
+ pipes.erase (pipe_);
+
+ if (terminating)
+ sink->unregister_term_ack ();
+}
+
+void zmq::dist_t::activated (writer_t *pipe_)
+{
+ // Move the pipe to the list of active pipes.
+ pipes.swap (pipes.index (pipe_), active);
+ active++;
+}
+
+int zmq::dist_t::send (zmq_msg_t *msg_, int flags_)
+{
+ // Is this end of a multipart message?
+ bool msg_more = msg_->flags & ZMQ_MSG_MORE;
+
+ // Push the message to active pipes.
+ distribute (msg_, flags_);
+
+ // If mutlipart message is fully sent, activate new pipes.
+ if (more && !msg_more)
+ clear_new_pipes ();
+
+ more = msg_more;
+
+ return 0;
+}
+
+void zmq::dist_t::distribute (zmq_msg_t *msg_, int flags_)
+{
+ // If there are no active pipes available, simply drop the message.
+ if (active == 0) {
+ int rc = zmq_msg_close (msg_);
+ zmq_assert (rc == 0);
+ rc = zmq_msg_init (msg_);
+ zmq_assert (rc == 0);
+ return;
+ }
+
+ msg_content_t *content = (msg_content_t*) msg_->content;
+
+ // For VSMs the copying is straighforward.
+ if (content == (msg_content_t*) ZMQ_VSM) {
+ for (pipes_t::size_type i = 0; i < active;)
+ if (write (pipes [i], msg_))
+ i++;
+ int rc = zmq_msg_init (msg_);
+ zmq_assert (rc == 0);
+ return;
+ }
+
+ // Optimisation for the case when there's only a single pipe
+ // to send the message to - no refcount adjustment i.e. no atomic
+ // operations are needed.
+ if (active == 1) {
+ if (!write (pipes [0], msg_)) {
+ int rc = zmq_msg_close (msg_);
+ zmq_assert (rc == 0);
+ }
+ int rc = zmq_msg_init (msg_);
+ zmq_assert (rc == 0);
+ return;
+ }
+
+ // There are at least 2 destinations for the message. That means we have
+ // to deal with reference counting. First add N-1 references to
+ // the content (we are holding one reference anyway, that's why -1).
+ if (msg_->flags & ZMQ_MSG_SHARED)
+ content->refcnt.add (active - 1);
+ else {
+ content->refcnt.set (active);
+ msg_->flags |= ZMQ_MSG_SHARED;
+ }
+
+ // Push the message to all destinations.
+ for (pipes_t::size_type i = 0; i < active;) {
+ if (!write (pipes [i], msg_))
+ content->refcnt.sub (1);
+ else
+ i++;
+ }
+
+ // Detach the original message from the data buffer.
+ int rc = zmq_msg_init (msg_);
+ zmq_assert (rc == 0);
+}
+
+bool zmq::dist_t::has_out ()
+{
+ return true;
+}
+
+bool zmq::dist_t::write (class writer_t *pipe_, zmq_msg_t *msg_)
+{
+ if (!pipe_->write (msg_)) {
+ active--;
+ pipes.swap (pipes.index (pipe_), active);
+ return false;
+ }
+ if (!(msg_->flags & ZMQ_MSG_MORE))
+ pipe_->flush ();
+ return true;
+}
+
+void zmq::dist_t::clear_new_pipes ()
+{
+ for (new_pipes_t::iterator it = new_pipes.begin (); it != new_pipes.end ();
+ ++it) {
+ (*it)->set_event_sink (this);
+ pipes.push_back (*it);
+ pipes.swap (active, pipes.size () - 1);
+ active++;
+ }
+ new_pipes.clear ();
+}
+
diff --git a/src/dist.hpp b/src/dist.hpp
new file mode 100644
index 0000000..ad9767a
--- /dev/null
+++ b/src/dist.hpp
@@ -0,0 +1,92 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_DIST_HPP_INCLUDED__
+#define __ZMQ_DIST_HPP_INCLUDED__
+
+#include <vector>
+
+#include "array.hpp"
+#include "pipe.hpp"
+
+namespace zmq
+{
+
+ // Class manages a set of outbound pipes. It sends each messages to
+ // each of them.
+ class dist_t : public i_writer_events
+ {
+ public:
+
+ dist_t (class own_t *sink_);
+ ~dist_t ();
+
+ void attach (writer_t *pipe_);
+ void terminate ();
+ int send (zmq_msg_t *msg_, int flags_);
+ bool has_out ();
+
+ // i_writer_events interface implementation.
+ void activated (writer_t *pipe_);
+ void terminated (writer_t *pipe_);
+
+ private:
+
+ // Write the message to the pipe. Make the pipe inactive if writing
+ // fails. In such a case false is returned.
+ bool write (class writer_t *pipe_, zmq_msg_t *msg_);
+
+ // Put the message to all active pipes.
+ void distribute (zmq_msg_t *msg_, int flags_);
+
+ // Plug in all the delayed pipes.
+ void clear_new_pipes ();
+
+ // List of outbound pipes.
+ typedef array_t <class writer_t> pipes_t;
+ pipes_t pipes;
+
+ // List of new pipes that were not yet inserted into 'pipes' list.
+ // These pipes are moves to 'pipes' list once the current multipart
+ // message is fully sent. This way we avoid sending incomplete messages
+ // to peers.
+ typedef std::vector <class writer_t*> new_pipes_t;
+ new_pipes_t new_pipes;
+
+ // Number of active pipes. All the active pipes are located at the
+ // beginning of the pipes array.
+ pipes_t::size_type active;
+
+ // True if last we are in the middle of a multipart message.
+ bool more;
+
+ // Object to send events to.
+ class own_t *sink;
+
+ // If true, termination process is already underway.
+ bool terminating;
+
+ dist_t (const dist_t&);
+ const dist_t &operator = (const dist_t&);
+ };
+
+}
+
+#endif
diff --git a/src/zmq_encoder.cpp b/src/encoder.cpp
index 077286f..88e1dff 100644
--- a/src/zmq_encoder.cpp
+++ b/src/encoder.cpp
@@ -1,58 +1,59 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "zmq_encoder.hpp"
+#include "encoder.hpp"
#include "i_inout.hpp"
#include "wire.hpp"
-zmq::zmq_encoder_t::zmq_encoder_t (size_t bufsize_) :
- encoder_t <zmq_encoder_t> (bufsize_),
+zmq::encoder_t::encoder_t (size_t bufsize_) :
+ encoder_base_t <encoder_t> (bufsize_),
source (NULL)
{
zmq_msg_init (&in_progress);
// Write 0 bytes to the batch and go to message_ready state.
- next_step (NULL, 0, &zmq_encoder_t::message_ready, true);
+ next_step (NULL, 0, &encoder_t::message_ready, true);
}
-zmq::zmq_encoder_t::~zmq_encoder_t ()
+zmq::encoder_t::~encoder_t ()
{
zmq_msg_close (&in_progress);
}
-void zmq::zmq_encoder_t::set_inout (i_inout *source_)
+void zmq::encoder_t::set_inout (i_inout *source_)
{
source = source_;
}
-bool zmq::zmq_encoder_t::size_ready ()
+bool zmq::encoder_t::size_ready ()
{
// Write message body into the buffer.
next_step (zmq_msg_data (&in_progress), zmq_msg_size (&in_progress),
- &zmq_encoder_t::message_ready, false);
+ &encoder_t::message_ready, false);
return true;
}
-bool zmq::zmq_encoder_t::message_ready ()
+bool zmq::encoder_t::message_ready ()
{
// Destroy content of the old message.
- zmq_msg_close(&in_progress);
+ zmq_msg_close (&in_progress);
// Read new message. If there is none, return false.
// Note that new state is set only if write is successful. That way
@@ -75,14 +76,14 @@ bool zmq::zmq_encoder_t::message_ready ()
if (size < 255) {
tmpbuf [0] = (unsigned char) size;
tmpbuf [1] = (in_progress.flags & ~ZMQ_MSG_SHARED);
- next_step (tmpbuf, 2, &zmq_encoder_t::size_ready,
+ 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);
- next_step (tmpbuf, 10, &zmq_encoder_t::size_ready,
+ next_step (tmpbuf, 10, &encoder_t::size_ready,
!(in_progress.flags & ZMQ_MSG_MORE));
}
return true;
diff --git a/src/encoder.hpp b/src/encoder.hpp
index 0d5b6ba..918ec2b 100644
--- a/src/encoder.hpp
+++ b/src/encoder.hpp
@@ -1,30 +1,26 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_ENCODER_HPP_INCLUDED__
#define __ZMQ_ENCODER_HPP_INCLUDED__
-#include "platform.hpp"
-#if defined ZMQ_HAVE_WINDOWS
-#include "windows.hpp"
-#endif
-
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
@@ -32,6 +28,8 @@
#include "err.hpp"
+#include "../include/zmq.h"
+
namespace zmq
{
@@ -39,20 +37,20 @@ namespace zmq
// fills the outgoing buffer. Derived classes should implement individual
// state machine actions.
- template <typename T> class encoder_t
+ template <typename T> class encoder_base_t
{
public:
- inline encoder_t (size_t bufsize_) :
+ inline encoder_base_t (size_t bufsize_) :
bufsize (bufsize_)
{
buf = (unsigned char*) malloc (bufsize_);
- zmq_assert (buf);
+ alloc_assert (buf);
}
- // The destructor doesn't have to be virtual. It is mad virtual
+ // The destructor doesn't have to be virtual. It is made virtual
// just to keep ICC and code checking tools from complaining.
- inline virtual ~encoder_t ()
+ inline virtual ~encoder_base_t ()
{
free (buf);
}
@@ -153,10 +151,34 @@ namespace zmq
size_t bufsize;
unsigned char *buf;
- encoder_t (const encoder_t&);
- void operator = (const encoder_t&);
+ encoder_base_t (const encoder_base_t&);
+ void operator = (const encoder_base_t&);
};
+ // Encoder for 0MQ framing protocol. Converts messages into data batches.
+
+ class encoder_t : public encoder_base_t <encoder_t>
+ {
+ public:
+
+ encoder_t (size_t bufsize_);
+ ~encoder_t ();
+
+ void set_inout (struct i_inout *source_);
+
+ private:
+
+ bool size_ready ();
+ bool message_ready ();
+
+ struct i_inout *source;
+ ::zmq_msg_t in_progress;
+ unsigned char tmpbuf [10];
+
+ encoder_t (const encoder_t&);
+ const encoder_t &operator = (const encoder_t&);
+ };
}
#endif
+
diff --git a/src/epoll.cpp b/src/epoll.cpp
index e22eb8c..2c84f8c 100644
--- a/src/epoll.cpp
+++ b/src/epoll.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -45,18 +46,15 @@ zmq::epoll_t::~epoll_t ()
// Wait till the worker thread exits.
worker.stop ();
- // Make sure there are no fds registered on shutdown.
- zmq_assert (load.get () == 0);
-
close (epoll_fd);
- for (retired_t::iterator it = retired.begin (); it != retired.end (); it ++)
+ for (retired_t::iterator it = retired.begin (); it != retired.end (); ++it)
delete *it;
}
zmq::epoll_t::handle_t zmq::epoll_t::add_fd (fd_t fd_, i_poll_events *events_)
{
poll_entry_t *pe = new (std::nothrow) poll_entry_t;
- zmq_assert (pe != NULL);
+ alloc_assert (pe);
// The memset is not actually needed. It's here to prevent debugging
// tools to complain about using uninitialised memory.
@@ -71,7 +69,7 @@ zmq::epoll_t::handle_t zmq::epoll_t::add_fd (fd_t fd_, i_poll_events *events_)
errno_assert (rc != -1);
// Increase the load metric of the thread.
- load.add (1);
+ adjust_load (1);
return pe;
}
@@ -85,7 +83,7 @@ void zmq::epoll_t::rm_fd (handle_t handle_)
retired.push_back (pe);
// Decrease the load metric of the thread.
- load.sub (1);
+ adjust_load (-1);
}
void zmq::epoll_t::set_pollin (handle_t handle_)
@@ -120,24 +118,6 @@ void zmq::epoll_t::reset_pollout (handle_t handle_)
errno_assert (rc != -1);
}
-void zmq::epoll_t::add_timer (i_poll_events *events_)
-{
- timers.push_back (events_);
-}
-
-void zmq::epoll_t::cancel_timer (i_poll_events *events_)
-{
- timers_t::iterator it = std::find (timers.begin (), timers.end (), events_);
- if (it == timers.end ())
- return;
- timers.erase (it);
-}
-
-int zmq::epoll_t::get_load ()
-{
- return load.get ();
-}
-
void zmq::epoll_t::start ()
{
worker.start (worker_routine, this);
@@ -154,31 +134,15 @@ void zmq::epoll_t::loop ()
while (!stopping) {
- // Wait for events.
- int n;
- while (true) {
- n = epoll_wait (epoll_fd, &ev_buf [0], max_io_events,
- timers.empty () ? -1 : max_timer_period);
- if (!(n == -1 && errno == EINTR)) {
- errno_assert (n != -1);
- break;
- }
- }
-
- // Handle timer.
- if (!n) {
-
- // Use local list of timers as timer handlers may fill new timers
- // into the original array.
- timers_t t;
- std::swap (timers, t);
-
- // Trigger all the timers.
- for (timers_t::iterator it = t.begin (); it != t.end (); it ++)
- (*it)->timer_event ();
+ // Execute any due timers.
+ int timeout = (int) execute_timers ();
+ // Wait for events.
+ int n = epoll_wait (epoll_fd, &ev_buf [0], max_io_events,
+ timeout ? timeout : -1);
+ if (n == -1 && errno == EINTR)
continue;
- }
+ errno_assert (n != -1);
for (int i = 0; i < n; i ++) {
poll_entry_t *pe = ((poll_entry_t*) ev_buf [i].data.ptr);
@@ -199,7 +163,7 @@ void zmq::epoll_t::loop ()
// Destroy retired event sources.
for (retired_t::iterator it = retired.begin (); it != retired.end ();
- it ++)
+ ++it)
delete *it;
retired.clear ();
}
diff --git a/src/epoll.hpp b/src/epoll.hpp
index 38175cb..7e5195e 100644
--- a/src/epoll.hpp
+++ b/src/epoll.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,7 +30,7 @@
#include "fd.hpp"
#include "thread.hpp"
-#include "atomic_counter.hpp"
+#include "poller_base.hpp"
namespace zmq
{
@@ -37,7 +38,7 @@ namespace zmq
// This class implements socket polling mechanism using the Linux-specific
// epoll mechanism.
- class epoll_t
+ class epoll_t : public poller_base_t
{
public:
@@ -53,9 +54,6 @@ namespace zmq
void reset_pollin (handle_t handle_);
void set_pollout (handle_t handle_);
void reset_pollout (handle_t handle_);
- void add_timer (struct i_poll_events *events_);
- void cancel_timer (struct i_poll_events *events_);
- int get_load ();
void start ();
void stop ();
@@ -81,22 +79,14 @@ namespace zmq
typedef std::vector <poll_entry_t*> retired_t;
retired_t retired;
- // List of all the engines waiting for the timer event.
- typedef std::vector <struct i_poll_events*> timers_t;
- timers_t timers;
-
// If true, thread is in the process of shutting down.
bool stopping;
// Handle of the physical thread doing the I/O work.
thread_t worker;
- // Load of the poller. Currently number of file descriptors
- // registered with the poller.
- atomic_counter_t load;
-
epoll_t (const epoll_t&);
- void operator = (const epoll_t&);
+ const epoll_t &operator = (const epoll_t&);
};
}
diff --git a/src/err.cpp b/src/err.cpp
index 17a9689..8761c22 100644
--- a/src/err.cpp
+++ b/src/err.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,6 +23,47 @@
#include "err.hpp"
#include "platform.hpp"
+const char *zmq::errno_to_string (int errno_)
+{
+ switch (errno_) {
+#if defined ZMQ_HAVE_WINDOWS
+ case ENOTSUP:
+ return "Not supported";
+ case EPROTONOSUPPORT:
+ return "Protocol not supported";
+ case ENOBUFS:
+ return "No buffer space available";
+ case ENETDOWN:
+ return "Network is down";
+ case EADDRINUSE:
+ return "Address in use";
+ case EADDRNOTAVAIL:
+ return "Address not available";
+ case ECONNREFUSED:
+ return "Connection refused";
+ case EINPROGRESS:
+ return "Operation in progress";
+#endif
+ case EFSM:
+ return "Operation cannot be accomplished in current state";
+ case ENOCOMPATPROTO:
+ return "The protocol is not compatible with the socket type";
+ case ETERM:
+ return "Context was terminated";
+ case EMTHREAD:
+ return "No thread available";
+ default:
+#if defined _MSC_VER
+#pragma warning (push)
+#pragma warning (disable:4996)
+#endif
+ return strerror (errno_);
+#if defined _MSC_VER
+#pragma warning (pop)
+#endif
+ }
+}
+
#ifdef ZMQ_HAVE_WINDOWS
const char *zmq::wsa_error()
diff --git a/src/err.hpp b/src/err.hpp
index 2b76569..3ffd99d 100644
--- a/src/err.hpp
+++ b/src/err.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -35,15 +36,18 @@
#include <netdb.h>
#endif
+namespace zmq
+{
+ const char *errno_to_string (int errno_);
+}
+
#ifdef ZMQ_HAVE_WINDOWS
namespace zmq
{
-
const char *wsa_error ();
void win_error (char *buffer_, size_t buffer_size_);
- void wsa_error_to_errno ();
-
+ void wsa_error_to_errno ();
}
// Provides convenient way to check WSA-style errors on Windows.
@@ -95,7 +99,7 @@ namespace zmq
}\
} while (false)
-// Provides convenient way to check for POSIX errors.
+// Provides convenient way to check for POSIX errors.
#define posix_assert(x) \
do {\
if (unlikely (x)) {\
@@ -104,7 +108,7 @@ namespace zmq
}\
} while (false)
-// Provides convenient way to check for errors from getaddrinfo.
+// Provides convenient way to check for errors from getaddrinfo.
#define gai_assert(x) \
do {\
if (unlikely (x)) {\
@@ -114,10 +118,16 @@ namespace zmq
}\
} while (false)
-#endif
-
-#define zmq_not_implemented() \
+// Provides convenient way to check whether memory allocation have succeeded.
+#define alloc_assert(x) \
do {\
- fprintf (stderr, "Hic sunt leones (%s:%d)\n", __FILE__, __LINE__);\
- abort ();\
+ if (unlikely (!x)) {\
+ fprintf (stderr, "FATAL ERROR: OUT OF MEMORY (%s:%d)\n",\
+ __FILE__, __LINE__);\
+ abort ();\
+ }\
} while (false)
+
+#endif
+
+
diff --git a/src/fd.hpp b/src/fd.hpp
index 6ad8252..3b15024 100644
--- a/src/fd.hpp
+++ b/src/fd.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/forwarder.cpp b/src/forwarder.cpp
deleted file mode 100644
index d1f324e..0000000
--- a/src/forwarder.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "../include/zmq.h"
-
-#include "forwarder.hpp"
-#include "socket_base.hpp"
-#include "likely.hpp"
-#include "err.hpp"
-
-int zmq::forwarder (socket_base_t *insocket_, socket_base_t *outsocket_)
-{
- zmq_msg_t msg;
- int rc = zmq_msg_init (&msg);
- errno_assert (rc == 0);
-
- int64_t more;
- size_t more_sz = sizeof (more);
-
- while (true) {
- rc = insocket_->recv (&msg, 0);
- if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
- }
-
- rc = insocket_->getsockopt (ZMQ_RCVMORE, &more, &more_sz);
- if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
- }
-
- rc = outsocket_->send (&msg, more ? ZMQ_SNDMORE : 0);
- if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
- }
- }
-
- return 0;
-}
diff --git a/src/forwarder.hpp b/src/forwarder.hpp
deleted file mode 100644
index 68827a4..0000000
--- a/src/forwarder.hpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __ZMQ_FORWARDER_HPP_INCLUDED__
-#define __ZMQ_FORWARDER_HPP_INCLUDED__
-
-namespace zmq
-{
-
- int forwarder (class socket_base_t *insocket_,
- class socket_base_t *outsocket_);
-
-}
-
-#endif
diff --git a/src/fq.cpp b/src/fq.cpp
index 9028853..36fd435 100644
--- a/src/fq.cpp
+++ b/src/fq.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,29 +23,42 @@
#include "fq.hpp"
#include "pipe.hpp"
#include "err.hpp"
+#include "own.hpp"
-zmq::fq_t::fq_t () :
+zmq::fq_t::fq_t (own_t *sink_) :
active (0),
current (0),
- more (false)
+ more (false),
+ sink (sink_),
+ terminating (false)
{
}
zmq::fq_t::~fq_t ()
{
- for (pipes_t::size_type i = 0; i != pipes.size (); i++)
- pipes [i]->term ();
+ zmq_assert (pipes.empty ());
}
void zmq::fq_t::attach (reader_t *pipe_)
{
+ pipe_->set_event_sink (this);
+
pipes.push_back (pipe_);
pipes.swap (active, pipes.size () - 1);
active++;
+
+ // If we are already terminating, ask the pipe to terminate straight away.
+ if (terminating) {
+ sink->register_term_acks (1);
+ pipe_->terminate ();
+ }
}
-void zmq::fq_t::detach (reader_t *pipe_)
+void zmq::fq_t::terminated (reader_t *pipe_)
{
+ // TODO: This is a problem with session-initiated termination. It breaks
+ // message atomicity. However, for socket initiated termination it's
+ // just fine.
zmq_assert (!more || pipes [current] != pipe_);
// Remove the pipe from the list; adjust number of active pipes
@@ -55,18 +69,26 @@ void zmq::fq_t::detach (reader_t *pipe_)
current = 0;
}
pipes.erase (pipe_);
+
+ if (terminating)
+ sink->unregister_term_ack ();
}
-void zmq::fq_t::kill (reader_t *pipe_)
+void zmq::fq_t::delimited (reader_t *pipe_)
{
- // Move the pipe to the list of inactive pipes.
- active--;
- if (current == active)
- current = 0;
- pipes.swap (pipes.index (pipe_), active);
}
-void zmq::fq_t::revive (reader_t *pipe_)
+void zmq::fq_t::terminate ()
+{
+ zmq_assert (!terminating);
+ terminating = true;
+
+ sink->register_term_acks (pipes.size ());
+ for (pipes_t::size_type i = 0; i != pipes.size (); i++)
+ pipes [i]->terminate ();
+}
+
+void zmq::fq_t::activated (reader_t *pipe_)
{
// Move the pipe to the list of active pipes.
pipes.swap (pipes.index (pipe_), active);
@@ -84,10 +106,14 @@ int zmq::fq_t::recv (zmq_msg_t *msg_, int flags_)
// Try to fetch new message. If we've already read part of the message
// subsequent part should be immediately available.
bool fetched = pipes [current]->read (msg_);
+
+ // Check the atomicity of the message. If we've already received the
+ // first part of the message we should get the remaining parts
+ // without blocking.
zmq_assert (!(more && !fetched));
- // Note that when message is not fetched, current pipe is killed and
- // replaced by another active pipe. Thus we don't have to increase
+ // Note that when message is not fetched, current pipe is deactivated
+ // and replaced by another active pipe. Thus we don't have to increase
// the 'current' pointer.
if (fetched) {
more = msg_->flags & ZMQ_MSG_MORE;
@@ -98,6 +124,12 @@ int zmq::fq_t::recv (zmq_msg_t *msg_, int flags_)
}
return 0;
}
+ else {
+ active--;
+ pipes.swap (current, active);
+ if (current == active)
+ current = 0;
+ }
}
// No message is available. Initialise the output parameter
@@ -120,8 +152,11 @@ bool zmq::fq_t::has_in ()
for (int count = active; count != 0; count--) {
if (pipes [current]->check_read ())
return true;
- current++;
- if (current >= active)
+
+ // Deactivate the pipe.
+ active--;
+ pipes.swap (current, active);
+ if (current == active)
current = 0;
}
diff --git a/src/fq.hpp b/src/fq.hpp
index 5c699ee..8c6c95c 100644
--- a/src/fq.hpp
+++ b/src/fq.hpp
@@ -1,26 +1,28 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_FQ_HPP_INCLUDED__
#define __ZMQ_FQ_HPP_INCLUDED__
-#include "yarray.hpp"
+#include "array.hpp"
+#include "pipe.hpp"
namespace zmq
{
@@ -28,24 +30,28 @@ namespace zmq
// Class manages a set of inbound pipes. On receive it performs fair
// queueing (RFC970) so that senders gone berserk won't cause denial of
// service for decent senders.
- class fq_t
+ class fq_t : public i_reader_events
{
public:
- fq_t ();
+ fq_t (class own_t *sink_);
~fq_t ();
- void attach (class reader_t *pipe_);
- void detach (class reader_t *pipe_);
- void kill (class reader_t *pipe_);
- void revive (class reader_t *pipe_);
+ void attach (reader_t *pipe_);
+ void terminate ();
+
int recv (zmq_msg_t *msg_, int flags_);
bool has_in ();
+ // i_reader_events implementation.
+ void activated (reader_t *pipe_);
+ void terminated (reader_t *pipe_);
+ void delimited (reader_t *pipe_);
+
private:
// Inbound pipes.
- typedef yarray_t <class reader_t> pipes_t;
+ typedef array_t <reader_t> pipes_t;
pipes_t pipes;
// Number of active pipes. All the active pipes are located at the
@@ -59,8 +65,14 @@ namespace zmq
// there are following parts still waiting in the current pipe.
bool more;
+ // Object to send events to.
+ class own_t *sink;
+
+ // If true, termination process is already underway.
+ bool terminating;
+
fq_t (const fq_t&);
- void operator = (const fq_t&);
+ const fq_t &operator = (const fq_t&);
};
}
diff --git a/src/i_endpoint.hpp b/src/i_endpoint.hpp
deleted file mode 100644
index 0d14224..0000000
--- a/src/i_endpoint.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __ZMQ_I_ENDPOINT_HPP_INCLUDED__
-#define __ZMQ_I_ENDPOINT_HPP_INCLUDED__
-
-#include "blob.hpp"
-
-namespace zmq
-{
-
- struct i_endpoint
- {
- virtual ~i_endpoint () {}
-
- virtual void attach_pipes (class reader_t *inpipe_,
- class writer_t *outpipe_, const blob_t &peer_identity_) = 0;
- virtual void detach_inpipe (class reader_t *pipe_) = 0;
- virtual void detach_outpipe (class writer_t *pipe_) = 0;
- virtual void kill (class reader_t *pipe_) = 0;
- virtual void revive (class reader_t *pipe_) = 0;
- virtual void revive (class writer_t *pipe_) = 0;
- };
-
-}
-
-#endif
diff --git a/src/i_engine.hpp b/src/i_engine.hpp
index ea6b850..7bd4ea6 100644
--- a/src/i_engine.hpp
+++ b/src/i_engine.hpp
@@ -1,27 +1,26 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_I_ENGINE_HPP_INCLUDED__
#define __ZMQ_I_ENGINE_HPP_INCLUDED__
-#include <stddef.h>
-
namespace zmq
{
@@ -30,18 +29,23 @@ namespace zmq
virtual ~i_engine () {}
// Plug the engine to the session.
- virtual void plug (struct i_inout *inout_) = 0;
+ virtual void plug (class io_thread_t *io_thread_,
+ struct i_inout *inout_) = 0;
// Unplug the engine from the session.
virtual void unplug () = 0;
- // This method is called by the session to signalise that there
- // are messages to send available.
- virtual void revive () = 0;
+ // Terminate and deallocate the engine. Note that 'detached'
+ // events are not fired on termination.
+ virtual void terminate () = 0;
// This method is called by the session to signalise that more
// messages can be written to the pipe.
- virtual void resume_input () = 0;
+ virtual void activate_in () = 0;
+
+ // This method is called by the session to signalise that there
+ // are messages to send available.
+ virtual void activate_out () = 0;
};
}
diff --git a/src/i_inout.hpp b/src/i_inout.hpp
index 21d1838..057b46c 100644
--- a/src/i_inout.hpp
+++ b/src/i_inout.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -31,28 +32,17 @@ namespace zmq
{
virtual ~i_inout () {}
- // Engine asks to get a message to send to the network.
+ // Engine asks for a message to send to the network.
virtual bool read (::zmq_msg_t *msg_) = 0;
- // Engine sends the incoming message further on downstream.
+ // Engine received message from the network and sends it further on.
virtual bool write (::zmq_msg_t *msg_) = 0;
- // Flush all the previously written messages downstream.
+ // Flush all the previously written messages.
virtual void flush () = 0;
-
- // Drop all the references to the engine. The parameter is the object
- // to use to reconnect. If reconnection is not required, the argument
- // is set to NULL.
- virtual void detach (class owned_t *reconnecter_) = 0;
- // Returns least loaded I/O thread.
- virtual class io_thread_t *get_io_thread () = 0;
-
- // Return pointer to the owning socket.
- virtual class socket_base_t *get_owner () = 0;
-
- // Return ordinal number of the session.
- virtual uint64_t get_ordinal () = 0;
+ // Engine is dead. Drop all the references to it.
+ virtual void detach () = 0;
};
}
diff --git a/src/i_poll_events.hpp b/src/i_poll_events.hpp
index 6d474b2..fa9fb25 100644
--- a/src/i_poll_events.hpp
+++ b/src/i_poll_events.hpp
@@ -1,20 +1,21 @@
/*
-Copyright (c) 2007-2010 iMatix Corporation
-
-This file is part of 0MQ.
-
-0MQ is free software; you can redistribute it and/or modify it under
-the terms of the Lesser GNU 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
-Lesser GNU General Public License for more details.
-
-You should have received a copy of the Lesser GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_I_POLL_EVENTS_HPP_INCLUDED__
@@ -37,7 +38,7 @@ namespace zmq
virtual void out_event () = 0;
// Called when timer expires.
- virtual void timer_event () = 0;
+ virtual void timer_event (int id_) = 0;
};
}
diff --git a/src/io_object.cpp b/src/io_object.cpp
index 086f173..e68917c 100644
--- a/src/io_object.cpp
+++ b/src/io_object.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -21,21 +22,35 @@
#include "io_thread.hpp"
#include "err.hpp"
-zmq::io_object_t::io_object_t (io_thread_t *io_thread_)
+zmq::io_object_t::io_object_t (io_thread_t *io_thread_) :
+ poller (NULL)
{
- // Retrieve the poller from the thread we are running in.
- poller = io_thread_->get_poller ();
+ if (io_thread_)
+ plug (io_thread_);
}
zmq::io_object_t::~io_object_t ()
{
}
-void zmq::io_object_t::set_io_thread (io_thread_t *io_thread_)
+void zmq::io_object_t::plug (io_thread_t *io_thread_)
{
+ zmq_assert (io_thread_);
+ zmq_assert (!poller);
+
+ // Retrieve the poller from the thread we are running in.
poller = io_thread_->get_poller ();
}
+void zmq::io_object_t::unplug ()
+{
+ zmq_assert (poller);
+
+ // Forget about old poller in preparation to be migrated
+ // to a different I/O thread.
+ poller = NULL;
+}
+
zmq::io_object_t::handle_t zmq::io_object_t::add_fd (fd_t fd_)
{
return poller->add_fd (fd_, this);
@@ -66,14 +81,14 @@ void zmq::io_object_t::reset_pollout (handle_t handle_)
poller->reset_pollout (handle_);
}
-void zmq::io_object_t::add_timer ()
+void zmq::io_object_t::add_timer (int timeout_, int id_)
{
- poller->add_timer (this);
+ poller->add_timer (timeout_, this, id_);
}
-void zmq::io_object_t::cancel_timer ()
+void zmq::io_object_t::cancel_timer (int id_)
{
- poller->cancel_timer (this);
+ poller->cancel_timer (this, id_);
}
void zmq::io_object_t::in_event ()
@@ -86,7 +101,7 @@ void zmq::io_object_t::out_event ()
zmq_assert (false);
}
-void zmq::io_object_t::timer_event ()
+void zmq::io_object_t::timer_event (int id_)
{
zmq_assert (false);
}
diff --git a/src/io_object.hpp b/src/io_object.hpp
index 655e7f5..fb0d1e3 100644
--- a/src/io_object.hpp
+++ b/src/io_object.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -40,15 +41,15 @@ namespace zmq
io_object_t (class io_thread_t *io_thread_ = NULL);
~io_object_t ();
+ // When migrating an object from one I/O thread to another, first
+ // unplug it, then migrate it, then plug it to the new thread.
+ void plug (class io_thread_t *io_thread_);
+ void unplug ();
+
protected:
typedef poller_t::handle_t handle_t;
- // Derived class can init/swap the underlying I/O thread.
- // Caution: Remove all the file descriptors from the old I/O thread
- // before swapping to the new one!
- void set_io_thread (class io_thread_t *io_thread_);
-
// Methods to access underlying poller object.
handle_t add_fd (fd_t fd_);
void rm_fd (handle_t handle_);
@@ -56,20 +57,20 @@ namespace zmq
void reset_pollin (handle_t handle_);
void set_pollout (handle_t handle_);
void reset_pollout (handle_t handle_);
- void add_timer ();
- void cancel_timer ();
+ void add_timer (int timout_, int id_);
+ void cancel_timer (int id_);
// i_poll_events interface implementation.
void in_event ();
void out_event ();
- void timer_event ();
+ void timer_event (int id_);
private:
poller_t *poller;
io_object_t (const io_object_t&);
- void operator = (const io_object_t&);
+ const io_object_t &operator = (const io_object_t&);
};
}
diff --git a/src/io_thread.cpp b/src/io_thread.cpp
index fac6961..be52bdd 100644
--- a/src/io_thread.cpp
+++ b/src/io_thread.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -26,15 +27,14 @@
#include "err.hpp"
#include "ctx.hpp"
-zmq::io_thread_t::io_thread_t (ctx_t *ctx_,
- uint32_t thread_slot_) :
- object_t (ctx_, thread_slot_)
+zmq::io_thread_t::io_thread_t (ctx_t *ctx_, uint32_t tid_) :
+ object_t (ctx_, tid_)
{
poller = new (std::nothrow) poller_t;
- zmq_assert (poller);
+ alloc_assert (poller);
- signaler_handle = poller->add_fd (signaler.get_fd (), this);
- poller->set_pollin (signaler_handle);
+ mailbox_handle = poller->add_fd (mailbox.get_fd (), this);
+ poller->set_pollin (mailbox_handle);
}
zmq::io_thread_t::~io_thread_t ()
@@ -53,9 +53,9 @@ void zmq::io_thread_t::stop ()
send_stop ();
}
-zmq::signaler_t *zmq::io_thread_t::get_signaler ()
+zmq::mailbox_t *zmq::io_thread_t::get_mailbox ()
{
- return &signaler;
+ return &mailbox;
}
int zmq::io_thread_t::get_load ()
@@ -72,8 +72,12 @@ void zmq::io_thread_t::in_event ()
// Get the next command. If there is none, exit.
command_t cmd;
- if (!signaler.recv (&cmd, false))
+ int rc = mailbox.recv (&cmd, false);
+ if (rc != 0 && errno == EINTR)
+ continue;
+ if (rc != 0 && errno == EAGAIN)
break;
+ errno_assert (rc == 0);
// Process the command.
cmd.destination->process_command (cmd);
@@ -86,7 +90,7 @@ void zmq::io_thread_t::out_event ()
zmq_assert (false);
}
-void zmq::io_thread_t::timer_event ()
+void zmq::io_thread_t::timer_event (int id_)
{
// No timers here. This function is never called.
zmq_assert (false);
@@ -100,6 +104,6 @@ zmq::poller_t *zmq::io_thread_t::get_poller ()
void zmq::io_thread_t::process_stop ()
{
- poller->rm_fd (signaler_handle);
+ poller->rm_fd (mailbox_handle);
poller->stop ();
}
diff --git a/src/io_thread.hpp b/src/io_thread.hpp
index 3d832c0..f578d4e 100644
--- a/src/io_thread.hpp
+++ b/src/io_thread.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -26,7 +27,7 @@
#include "object.hpp"
#include "poller.hpp"
#include "i_poll_events.hpp"
-#include "signaler.hpp"
+#include "mailbox.hpp"
namespace zmq
{
@@ -38,7 +39,7 @@ namespace zmq
{
public:
- io_thread_t (class ctx_t *ctx_, uint32_t thread_slot_);
+ io_thread_t (class ctx_t *ctx_, uint32_t tid_);
// Clean-up. If the thread was started, it's neccessary to call 'stop'
// before invoking destructor. Otherwise the destructor would hang up.
@@ -50,13 +51,13 @@ namespace zmq
// Ask underlying thread to stop.
void stop ();
- // Returns signaler associated with this I/O thread.
- signaler_t *get_signaler ();
+ // Returns mailbox associated with this I/O thread.
+ mailbox_t *get_mailbox ();
// i_poll_events implementation.
void in_event ();
void out_event ();
- void timer_event ();
+ void timer_event (int id_);
// Used by io_objects to retrieve the assciated poller object.
poller_t *get_poller ();
@@ -69,15 +70,17 @@ namespace zmq
private:
- // Poll thread gets notifications about incoming commands using
- // this signaler.
- signaler_t signaler;
+ // I/O thread accesses incoming commands via this mailbox.
+ mailbox_t mailbox;
- // Handle associated with signaler's file descriptor.
- poller_t::handle_t signaler_handle;
+ // Handle associated with mailbox' file descriptor.
+ poller_t::handle_t mailbox_handle;
// I/O multiplexing is performed using a poller object.
poller_t *poller;
+
+ io_thread_t (const io_thread_t&);
+ const io_thread_t &operator = (const io_thread_t&);
};
}
diff --git a/src/ip.cpp b/src/ip.cpp
index f491008..a63a97d 100644
--- a/src/ip.cpp
+++ b/src/ip.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,6 +23,8 @@
#include <stdlib.h>
#include <string>
+#include "../include/zmq.h"
+
#include "ip.hpp"
#include "platform.hpp"
#include "err.hpp"
@@ -50,7 +53,7 @@ static int resolve_nic_name (in_addr* addr_, char const *interface_)
// Allocate memory to get interface names.
size_t ifr_size = sizeof (struct lifreq) * ifn.lifn_count;
char *ifr = (char*) malloc (ifr_size);
- errno_assert (ifr);
+ alloc_assert (ifr);
// Retrieve interface names.
lifconf ifc;
@@ -228,10 +231,13 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_,
}
// There's no such interface name. Assume literal address.
+#if defined ZMQ_HAVE_OPENVMS && defined __ia64
+ __addrinfo64 *res = NULL;
+ __addrinfo64 req;
+#else
addrinfo *res = NULL;
-
- // Set up the query.
addrinfo req;
+#endif
memset (&req, 0, sizeof (req));
// We only support IPv4 addresses for now.
@@ -311,11 +317,13 @@ int zmq::resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_,
return 0;
}
-#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
-
int zmq::resolve_local_path (sockaddr_storage *addr_, socklen_t *addr_len_,
const char *path_)
{
+#if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS
+ errno = EPROTONOSUPPORT;
+ return -1;
+#else
sockaddr_un *un = (sockaddr_un*) addr_;
if (strlen (path_) >= sizeof (un->sun_path))
{
@@ -326,7 +334,6 @@ int zmq::resolve_local_path (sockaddr_storage *addr_, socklen_t *addr_len_,
un->sun_family = AF_UNIX;
*addr_len_ = sizeof (sockaddr_un);
return 0;
-}
-
#endif
+}
diff --git a/src/ip.hpp b/src/ip.hpp
index d963df2..ec2db43 100644
--- a/src/ip.hpp
+++ b/src/ip.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -59,11 +60,9 @@ namespace zmq
int resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_,
const char *hostname_);
-#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
// This function sets up address for UNIX domain transport.
int resolve_local_path (sockaddr_storage *addr_, socklen_t *addr_len_,
const char* pathname_);
-#endif
}
#endif
diff --git a/src/kqueue.cpp b/src/kqueue.cpp
index e1fe2fa..e28ecd7 100644
--- a/src/kqueue.cpp
+++ b/src/kqueue.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -54,10 +55,6 @@ zmq::kqueue_t::kqueue_t () :
zmq::kqueue_t::~kqueue_t ()
{
worker.stop ();
-
- // Make sure there are no fds registered on shutdown.
- zmq_assert (load.get () == 0);
-
close (kqueue_fd);
}
@@ -74,7 +71,7 @@ void zmq::kqueue_t::kevent_delete (fd_t fd_, short filter_)
{
struct kevent ev;
- EV_SET (&ev, fd_, filter_, EV_DELETE, 0, 0, (kevent_udata_t)NULL);
+ EV_SET (&ev, fd_, filter_, EV_DELETE, 0, 0, 0);
int rc = kevent (kqueue_fd, &ev, 1, NULL, 0, NULL);
errno_assert (rc != -1);
}
@@ -83,13 +80,15 @@ zmq::kqueue_t::handle_t zmq::kqueue_t::add_fd (fd_t fd_,
i_poll_events *reactor_)
{
poll_entry_t *pe = new (std::nothrow) poll_entry_t;
- zmq_assert (pe != NULL);
+ alloc_assert (pe);
pe->fd = fd_;
pe->flag_pollin = 0;
pe->flag_pollout = 0;
pe->reactor = reactor_;
+ adjust_load (1);
+
return pe;
}
@@ -102,6 +101,8 @@ void zmq::kqueue_t::rm_fd (handle_t handle_)
kevent_delete (pe->fd, EVFILT_WRITE);
pe->fd = retired_fd;
retired.push_back (pe);
+
+ adjust_load (-1);
}
void zmq::kqueue_t::set_pollin (handle_t handle_)
@@ -132,23 +133,6 @@ void zmq::kqueue_t::reset_pollout (handle_t handle_)
kevent_delete (pe->fd, EVFILT_WRITE);
}
-void zmq::kqueue_t::add_timer (i_poll_events *events_)
-{
- timers.push_back (events_);
-}
-
-void zmq::kqueue_t::cancel_timer (i_poll_events *events_)
-{
- timers_t::iterator it = std::find (timers.begin (), timers.end (), events_);
- if (it != timers.end ())
- timers.erase (it);
-}
-
-int zmq::kqueue_t::get_load ()
-{
- return load.get ();
-}
-
void zmq::kqueue_t::start ()
{
worker.start (worker_routine, this);
@@ -163,34 +147,18 @@ void zmq::kqueue_t::loop ()
{
while (!stopping) {
- struct kevent ev_buf [max_io_events];
-
- // Compute time interval to wait.
- timespec timeout = {max_timer_period / 1000,
- (max_timer_period % 1000) * 1000000};
+ // Execute any due timers.
+ int timeout = (int) execute_timers ();
// Wait for events.
- int n = kevent (kqueue_fd, NULL, 0,
- &ev_buf [0], max_io_events, timers.empty () ? NULL : &timeout);
+ struct kevent ev_buf [max_io_events];
+ timespec ts = {timeout / 1000, (timeout % 1000) * 1000000};
+ int n = kevent (kqueue_fd, NULL, 0, &ev_buf [0], max_io_events,
+ timeout ? &ts: NULL);
if (n == -1 && errno == EINTR)
continue;
errno_assert (n != -1);
- // Handle timer.
- if (!n) {
-
- // Use local list of timers as timer handlers may fill new timers
- // into the original array.
- timers_t t;
- std::swap (timers, t);
-
- // Trigger all the timers.
- for (timers_t::iterator it = t.begin (); it != t.end (); it ++)
- (*it)->timer_event ();
-
- continue;
- }
-
for (int i = 0; i < n; i ++) {
poll_entry_t *pe = (poll_entry_t*) ev_buf [i].udata;
@@ -210,7 +178,7 @@ void zmq::kqueue_t::loop ()
// Destroy retired event sources.
for (retired_t::iterator it = retired.begin (); it != retired.end ();
- it ++)
+ ++it)
delete *it;
retired.clear ();
}
diff --git a/src/kqueue.hpp b/src/kqueue.hpp
index ac28a7d..d564c7c 100644
--- a/src/kqueue.hpp
+++ b/src/kqueue.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,7 +30,7 @@
#include "fd.hpp"
#include "thread.hpp"
-#include "atomic_counter.hpp"
+#include "poller_base.hpp"
namespace zmq
{
@@ -37,7 +38,7 @@ namespace zmq
// Implements socket polling mechanism using the BSD-specific
// kqueue interface.
- class kqueue_t
+ class kqueue_t : public poller_base_t
{
public:
@@ -53,9 +54,6 @@ namespace zmq
void reset_pollin (handle_t handle_);
void set_pollout (handle_t handle_);
void reset_pollout (handle_t handle_);
- void add_timer (struct i_poll_events *events_);
- void cancel_timer (struct i_poll_events *events_);
- int get_load ();
void start ();
void stop ();
@@ -88,22 +86,14 @@ namespace zmq
typedef std::vector <poll_entry_t*> retired_t;
retired_t retired;
- // List of all the engines waiting for the timer event.
- typedef std::vector <struct i_poll_events*> timers_t;
- timers_t timers;
-
// If true, thread is in the process of shutting down.
bool stopping;
// Handle of the physical thread doing the I/O work.
thread_t worker;
- // Load of the poller. Currently number of file descriptors
- // registered with the poller.
- atomic_counter_t load;
-
kqueue_t (const kqueue_t&);
- void operator = (const kqueue_t&);
+ const kqueue_t &operator = (const kqueue_t&);
};
}
diff --git a/src/lb.cpp b/src/lb.cpp
index ca93ba2..95af4a1 100644
--- a/src/lb.cpp
+++ b/src/lb.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,42 +23,70 @@
#include "lb.hpp"
#include "pipe.hpp"
#include "err.hpp"
+#include "own.hpp"
-zmq::lb_t::lb_t () :
+zmq::lb_t::lb_t (own_t *sink_) :
active (0),
current (0),
- more (false)
+ more (false),
+ dropping (false),
+ sink (sink_),
+ terminating (false)
{
}
zmq::lb_t::~lb_t ()
{
- for (pipes_t::size_type i = 0; i != pipes.size (); i++)
- pipes [i]->term ();
+ zmq_assert (pipes.empty ());
}
void zmq::lb_t::attach (writer_t *pipe_)
{
+ pipe_->set_event_sink (this);
+
pipes.push_back (pipe_);
pipes.swap (active, pipes.size () - 1);
active++;
+
+ if (terminating) {
+ sink->register_term_acks (1);
+ pipe_->terminate ();
+ }
+}
+
+void zmq::lb_t::terminate ()
+{
+ zmq_assert (!terminating);
+ terminating = true;
+
+ sink->register_term_acks (pipes.size ());
+ for (pipes_t::size_type i = 0; i != pipes.size (); i++)
+ pipes [i]->terminate ();
}
-void zmq::lb_t::detach (writer_t *pipe_)
+void zmq::lb_t::terminated (writer_t *pipe_)
{
- zmq_assert (!more || pipes [current] != pipe_);
+ pipes_t::size_type index = pipes.index (pipe_);
+
+ // If we are in the middle of multipart message and current pipe
+ // have disconnected, we have to drop the remainder of the message.
+ if (index == current && more)
+ dropping = true;
// Remove the pipe from the list; adjust number of active pipes
// accordingly.
- if (pipes.index (pipe_) < active) {
+ if (index < active) {
active--;
if (current == active)
current = 0;
}
pipes.erase (pipe_);
+
+ if (terminating)
+ sink->unregister_term_ack ();
}
-void zmq::lb_t::revive (writer_t *pipe_)
+void zmq::lb_t::activated (writer_t *pipe_)
{
// Move the pipe to the list of active pipes.
pipes.swap (pipes.index (pipe_), active);
@@ -66,6 +95,21 @@ void zmq::lb_t::revive (writer_t *pipe_)
int zmq::lb_t::send (zmq_msg_t *msg_, int flags_)
{
+ // Drop the message if required. If we are at the end of the message
+ // switch back to non-dropping mode.
+ if (dropping) {
+
+ more = msg_->flags & ZMQ_MSG_MORE;
+ if (!more)
+ dropping = false;
+
+ int rc = zmq_msg_close (msg_);
+ errno_assert (rc == 0);
+ rc = zmq_msg_init (msg_);
+ zmq_assert (rc == 0);
+ return 0;
+ }
+
while (active > 0) {
if (pipes [current]->write (msg_)) {
more = msg_->flags & ZMQ_MSG_MORE;
@@ -108,13 +152,20 @@ bool zmq::lb_t::has_out ()
return true;
while (active > 0) {
- if (pipes [current]->check_write ())
+
+ // Check whether zero-sized message can be written to the pipe.
+ zmq_msg_t msg;
+ zmq_msg_init (&msg);
+ if (pipes [current]->check_write (&msg)) {
+ zmq_msg_close (&msg);
return true;
+ }
+ zmq_msg_close (&msg);
+ // Deactivate the pipe.
active--;
- if (current < active)
- pipes.swap (current, active);
- else
+ pipes.swap (current, active);
+ if (current == active)
current = 0;
}
diff --git a/src/lb.hpp b/src/lb.hpp
index 526a727..0dc11e2 100644
--- a/src/lb.hpp
+++ b/src/lb.hpp
@@ -1,49 +1,54 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_LB_HPP_INCLUDED__
#define __ZMQ_LB_HPP_INCLUDED__
-#include "yarray.hpp"
+#include "array.hpp"
+#include "pipe.hpp"
namespace zmq
{
// Class manages a set of outbound pipes. On send it load balances
// messages fairly among the pipes.
- class lb_t
+ class lb_t : public i_writer_events
{
public:
- lb_t ();
+ lb_t (class own_t *sink_);
~lb_t ();
- void attach (class writer_t *pipe_);
- void detach (class writer_t *pipe_);
- void revive (class writer_t *pipe_);
+ void attach (writer_t *pipe_);
+ void terminate ();
int send (zmq_msg_t *msg_, int flags_);
bool has_out ();
+ // i_writer_events interface implementation.
+ void activated (writer_t *pipe_);
+ void terminated (writer_t *pipe_);
+
private:
// List of outbound pipes.
- typedef yarray_t <class writer_t> pipes_t;
+ typedef array_t <class writer_t> pipes_t;
pipes_t pipes;
// Number of active pipes. All the active pipes are located at the
@@ -56,8 +61,17 @@ namespace zmq
// True if last we are in the middle of a multipart message.
bool more;
+ // True if we are dropping current message.
+ bool dropping;
+
+ // Object to send events to.
+ class own_t *sink;
+
+ // If true, termination process is already underway.
+ bool terminating;
+
lb_t (const lb_t&);
- void operator = (const lb_t&);
+ const lb_t &operator = (const lb_t&);
};
}
diff --git a/src/likely.hpp b/src/likely.hpp
index b7a8171..a524a50 100644
--- a/src/likely.hpp
+++ b/src/likely.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/mailbox.cpp b/src/mailbox.cpp
new file mode 100644
index 0000000..221396b
--- /dev/null
+++ b/src/mailbox.cpp
@@ -0,0 +1,382 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "mailbox.hpp"
+#include "platform.hpp"
+#include "err.hpp"
+#include "fd.hpp"
+#include "ip.hpp"
+
+#if defined ZMQ_HAVE_WINDOWS
+#include "windows.hpp"
+#else
+#include <unistd.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <netinet/tcp.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#endif
+
+zmq::fd_t zmq::mailbox_t::get_fd ()
+{
+ return r;
+}
+
+#if defined ZMQ_HAVE_WINDOWS
+
+zmq::mailbox_t::mailbox_t ()
+{
+ // Create the socketpair for signalling.
+ int rc = make_socketpair (&r, &w);
+ errno_assert (rc == 0);
+
+ // Set the writer to non-blocking mode.
+ unsigned long argp = 1;
+ rc = ioctlsocket (w, FIONBIO, &argp);
+ wsa_assert (rc != SOCKET_ERROR);
+
+ // Set the reader to non-blocking mode.
+ argp = 1;
+ rc = ioctlsocket (r, FIONBIO, &argp);
+ wsa_assert (rc != SOCKET_ERROR);
+}
+
+zmq::mailbox_t::~mailbox_t ()
+{
+ int rc = closesocket (w);
+ wsa_assert (rc != SOCKET_ERROR);
+
+ rc = closesocket (r);
+ wsa_assert (rc != SOCKET_ERROR);
+}
+
+void zmq::mailbox_t::send (const command_t &cmd_)
+{
+ // TODO: Implement SNDBUF auto-resizing as for POSIX platforms.
+ // In the mean time, the following code with assert if the send()
+ // call would block.
+ int nbytes = ::send (w, (char *)&cmd_, sizeof (command_t), 0);
+ wsa_assert (nbytes != SOCKET_ERROR);
+ zmq_assert (nbytes == sizeof (command_t));
+}
+
+int zmq::mailbox_t::recv (command_t *cmd_, bool block_)
+{
+ // If required, set the reader to blocking mode.
+ if (block_) {
+ unsigned long argp = 0;
+ int rc = ioctlsocket (r, FIONBIO, &argp);
+ wsa_assert (rc != SOCKET_ERROR);
+ }
+
+ // Attempt to read an entire command. Returns EAGAIN if non-blocking
+ // and a command is not available. Save value of errno if we wish to pass
+ // it to caller.
+ int err = 0;
+ int nbytes = ::recv (r, (char *)cmd_, sizeof (command_t), 0);
+ if (nbytes == -1 && WSAGetLastError () == WSAEWOULDBLOCK)
+ err = EAGAIN;
+
+ // Re-set the reader to non-blocking mode.
+ if (block_) {
+ unsigned long argp = 1;
+ int rc = ioctlsocket (r, FIONBIO, &argp);
+ wsa_assert (rc != SOCKET_ERROR);
+ }
+
+ // If the recv failed, return with the saved errno.
+ if (err != 0) {
+ errno = err;
+ return -1;
+ }
+
+ // Sanity check for success.
+ wsa_assert (nbytes != SOCKET_ERROR);
+
+ // Check whether we haven't got half of command.
+ zmq_assert (nbytes == sizeof (command_t));
+
+ return 0;
+}
+
+#else
+
+zmq::mailbox_t::mailbox_t ()
+{
+#ifdef PIPE_BUF
+ // Make sure that command can be written to the socket in atomic fashion.
+ // If this wasn't guaranteed, commands from different threads would be
+ // interleaved.
+ zmq_assert (sizeof (command_t) <= PIPE_BUF);
+#endif
+
+ // Create the socketpair for signaling.
+ int rc = make_socketpair (&r, &w);
+ errno_assert (rc == 0);
+
+ // Set the writer to non-blocking mode.
+ int flags = fcntl (w, F_GETFL, 0);
+ errno_assert (flags >= 0);
+ rc = fcntl (w, F_SETFL, flags | O_NONBLOCK);
+ errno_assert (rc == 0);
+
+#ifndef MSG_DONTWAIT
+ // Set the reader to non-blocking mode.
+ flags = fcntl (r, F_GETFL, 0);
+ errno_assert (flags >= 0);
+ rc = fcntl (r, F_SETFL, flags | O_NONBLOCK);
+ errno_assert (rc == 0);
+#endif
+}
+
+zmq::mailbox_t::~mailbox_t ()
+{
+ close (w);
+ close (r);
+}
+
+void zmq::mailbox_t::send (const command_t &cmd_)
+{
+ // Attempt to write an entire command without blocking.
+ ssize_t nbytes;
+ do {
+ nbytes = ::send (w, &cmd_, sizeof (command_t), 0);
+ } while (nbytes == -1 && errno == EINTR);
+
+ // Attempt to increase mailbox SNDBUF if the send failed.
+ if (nbytes == -1 && errno == EAGAIN) {
+ int old_sndbuf, new_sndbuf;
+ socklen_t sndbuf_size = sizeof old_sndbuf;
+
+ // Retrieve current send buffer size.
+ int rc = getsockopt (w, SOL_SOCKET, SO_SNDBUF, &old_sndbuf,
+ &sndbuf_size);
+ errno_assert (rc == 0);
+ new_sndbuf = old_sndbuf * 2;
+
+ // Double the new send buffer size.
+ rc = setsockopt (w, SOL_SOCKET, SO_SNDBUF, &new_sndbuf, sndbuf_size);
+ errno_assert (rc == 0);
+
+ // Verify that the OS actually honored the request.
+ rc = getsockopt (w, SOL_SOCKET, SO_SNDBUF, &new_sndbuf, &sndbuf_size);
+ errno_assert (rc == 0);
+ zmq_assert (new_sndbuf > old_sndbuf);
+
+ // Retry the sending operation; at this point it must succeed.
+ do {
+ nbytes = ::send (w, &cmd_, sizeof (command_t), 0);
+ } while (nbytes == -1 && errno == EINTR);
+ }
+ errno_assert (nbytes != -1);
+
+ // This should never happen as we've already checked that command size is
+ // less than PIPE_BUF.
+ zmq_assert (nbytes == sizeof (command_t));
+}
+
+int zmq::mailbox_t::recv (command_t *cmd_, bool block_)
+{
+#ifdef MSG_DONTWAIT
+
+ // Attempt to read an entire command. Returns EAGAIN if non-blocking
+ // mode is requested and a command is not available.
+ ssize_t nbytes = ::recv (r, cmd_, sizeof (command_t),
+ block_ ? 0 : MSG_DONTWAIT);
+ if (nbytes == -1 && (errno == EAGAIN || errno == EINTR))
+ return -1;
+#else
+
+ // If required, set the reader to blocking mode.
+ if (block_) {
+ int flags = fcntl (r, F_GETFL, 0);
+ errno_assert (flags >= 0);
+ int rc = fcntl (r, F_SETFL, flags & ~O_NONBLOCK);
+ errno_assert (rc == 0);
+ }
+
+ // Attempt to read an entire command. Returns EAGAIN if non-blocking
+ // and a command is not available. Save value of errno if we wish to pass
+ // it to caller.
+ int err = 0;
+ ssize_t nbytes = ::recv (r, cmd_, sizeof (command_t), 0);
+ if (nbytes == -1 && (errno == EAGAIN || errno == EINTR))
+ err = errno;
+
+ // Re-set the reader to non-blocking mode.
+ if (block_) {
+ int flags = fcntl (r, F_GETFL, 0);
+ errno_assert (flags >= 0);
+ int rc = fcntl (r, F_SETFL, flags | O_NONBLOCK);
+ errno_assert (rc == 0);
+ }
+
+ // If the recv failed, return with the saved errno if set.
+ if (err != 0) {
+ errno = err;
+ return -1;
+ }
+
+#endif
+
+ // Sanity check for success.
+ errno_assert (nbytes != -1);
+
+ // Check whether we haven't got half of command.
+ zmq_assert (nbytes == sizeof (command_t));
+
+ return 0;
+}
+
+#endif
+
+int zmq::mailbox_t::make_socketpair (fd_t *r_, fd_t *w_)
+{
+#if defined ZMQ_HAVE_WINDOWS
+
+ // Windows has no 'socketpair' function. CreatePipe is no good as pipe
+ // handles cannot be polled on. Here we create the socketpair by hand.
+ *w_ = INVALID_SOCKET;
+ *r_ = INVALID_SOCKET;
+
+ // Create listening socket.
+ SOCKET listener;
+ listener = socket (AF_INET, SOCK_STREAM, 0);
+ wsa_assert (listener != INVALID_SOCKET);
+
+ // Set SO_REUSEADDR and TCP_NODELAY on listening socket.
+ BOOL so_reuseaddr = 1;
+ int rc = setsockopt (listener, SOL_SOCKET, SO_REUSEADDR,
+ (char *)&so_reuseaddr, sizeof (so_reuseaddr));
+ wsa_assert (rc != SOCKET_ERROR);
+ BOOL tcp_nodelay = 1;
+ rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELAY,
+ (char *)&tcp_nodelay, sizeof (tcp_nodelay));
+ wsa_assert (rc != SOCKET_ERROR);
+
+ // Bind listening socket to any free local port.
+ struct sockaddr_in addr;
+ memset (&addr, 0, sizeof (addr));
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
+ addr.sin_port = 0;
+ rc = bind (listener, (const struct sockaddr*) &addr, sizeof (addr));
+ wsa_assert (rc != SOCKET_ERROR);
+
+ // Retrieve local port listener is bound to (into addr).
+ int addrlen = sizeof (addr);
+ rc = getsockname (listener, (struct sockaddr*) &addr, &addrlen);
+ wsa_assert (rc != SOCKET_ERROR);
+
+ // Listen for incomming connections.
+ rc = listen (listener, 1);
+ wsa_assert (rc != SOCKET_ERROR);
+
+ // Create the writer socket.
+ *w_ = WSASocket (AF_INET, SOCK_STREAM, 0, NULL, 0, 0);
+ wsa_assert (*w_ != INVALID_SOCKET);
+
+ // Set TCP_NODELAY on writer socket.
+ rc = setsockopt (*w_, IPPROTO_TCP, TCP_NODELAY,
+ (char *)&tcp_nodelay, sizeof (tcp_nodelay));
+ wsa_assert (rc != SOCKET_ERROR);
+
+ // Connect writer to the listener.
+ rc = connect (*w_, (sockaddr *) &addr, sizeof (addr));
+ wsa_assert (rc != SOCKET_ERROR);
+
+ // Accept connection from writer.
+ *r_ = accept (listener, NULL, NULL);
+ wsa_assert (*r_ != INVALID_SOCKET);
+
+ // We don't need the listening socket anymore. Close it.
+ rc = closesocket (listener);
+ wsa_assert (rc != SOCKET_ERROR);
+
+ return 0;
+
+#elif defined ZMQ_HAVE_OPENVMS
+
+ // Whilst OpenVMS supports socketpair - it maps to AF_INET only. Further,
+ // it does not set the socket options TCP_NODELAY and TCP_NODELACK which
+ // can lead to performance problems.
+ //
+ // The bug will be fixed in V5.6 ECO4 and beyond. In the meantime, we'll
+ // create the socket pair manually.
+ sockaddr_in lcladdr;
+ memset (&lcladdr, 0, sizeof (lcladdr));
+ lcladdr.sin_family = AF_INET;
+ lcladdr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
+ lcladdr.sin_port = 0;
+
+ int listener = socket (AF_INET, SOCK_STREAM, 0);
+ errno_assert (listener != -1);
+
+ int on = 1;
+ int rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on));
+ errno_assert (rc != -1);
+
+ rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELACK, &on, sizeof (on));
+ errno_assert (rc != -1);
+
+ rc = bind(listener, (struct sockaddr*) &lcladdr, sizeof (lcladdr));
+ errno_assert (rc != -1);
+
+ socklen_t lcladdr_len = sizeof (lcladdr);
+
+ rc = getsockname (listener, (struct sockaddr*) &lcladdr, &lcladdr_len);
+ errno_assert (rc != -1);
+
+ rc = listen (listener, 1);
+ errno_assert (rc != -1);
+
+ *w_ = socket (AF_INET, SOCK_STREAM, 0);
+ errno_assert (*w_ != -1);
+
+ rc = setsockopt (*w_, IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on));
+ errno_assert (rc != -1);
+
+ rc = setsockopt (*w_, IPPROTO_TCP, TCP_NODELACK, &on, sizeof (on));
+ errno_assert (rc != -1);
+
+ rc = connect (*w_, (struct sockaddr*) &lcladdr, sizeof (lcladdr));
+ errno_assert (rc != -1);
+
+ *r_ = accept (listener, NULL, NULL);
+ errno_assert (*r_ != -1);
+
+ close (listener);
+
+ return 0;
+
+#else // All other implementations support socketpair()
+
+ int sv [2];
+ int rc = socketpair (AF_UNIX, SOCK_STREAM, 0, sv);
+ errno_assert (rc == 0);
+ *w_ = sv [0];
+ *r_ = sv [1];
+ return 0;
+
+#endif
+}
+
diff --git a/src/mailbox.hpp b/src/mailbox.hpp
new file mode 100644
index 0000000..96bf4eb
--- /dev/null
+++ b/src/mailbox.hpp
@@ -0,0 +1,62 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_MAILBOX_HPP_INCLUDED__
+#define __ZMQ_MAILBOX_HPP_INCLUDED__
+
+#include <stddef.h>
+
+#include "platform.hpp"
+#include "fd.hpp"
+#include "stdint.hpp"
+#include "config.hpp"
+#include "command.hpp"
+
+namespace zmq
+{
+
+ class mailbox_t
+ {
+ public:
+
+ mailbox_t ();
+ ~mailbox_t ();
+
+ fd_t get_fd ();
+ void send (const command_t &cmd_);
+ int recv (command_t *cmd_, bool block_);
+
+ private:
+
+ // Write & read end of the socketpair.
+ fd_t w;
+ fd_t r;
+
+ // Platform-dependent function to create a socketpair.
+ static int make_socketpair (fd_t *r_, fd_t *w_);
+
+ // Disable copying of mailbox_t object.
+ mailbox_t (const mailbox_t&);
+ const mailbox_t &operator = (const mailbox_t&);
+ };
+
+}
+
+#endif
diff --git a/src/msg_content.hpp b/src/msg_content.hpp
index d409d45..7e22098 100644
--- a/src/msg_content.hpp
+++ b/src/msg_content.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/mutex.hpp b/src/mutex.hpp
index 3306d2e..9b13ffa 100644
--- a/src/mutex.hpp
+++ b/src/mutex.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -110,7 +111,7 @@ namespace zmq
// Disable copy construction and assignment.
mutex_t (const mutex_t&);
- void operator = (const mutex_t&);
+ const mutex_t &operator = (const mutex_t&);
};
}
diff --git a/src/named_session.cpp b/src/named_session.cpp
new file mode 100644
index 0000000..2532c5a
--- /dev/null
+++ b/src/named_session.cpp
@@ -0,0 +1,85 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "named_session.hpp"
+#include "socket_base.hpp"
+
+zmq::named_session_t::named_session_t (class io_thread_t *io_thread_,
+ socket_base_t *socket_, const options_t &options_,
+ const blob_t &name_) :
+ session_t (io_thread_, socket_, options_),
+ name (name_)
+{
+ // Make double sure that the session has valid name.
+ zmq_assert (!name.empty ());
+ zmq_assert (name [0] != 0);
+
+ if (!socket_->register_session (name, this)) {
+
+ // TODO: There's already a session with the specified
+ // identity. We should log the error and drop the
+ // session.
+ zmq_assert (false);
+ }
+}
+
+zmq::named_session_t::~named_session_t ()
+{
+ // Unregister the session from the global list of named sessions.
+ if (!name.empty ())
+ unregister_session (name);
+}
+
+void zmq::named_session_t::attached (const blob_t &peer_identity_)
+{
+ if (!name.empty ()) {
+
+ // If both IDs are temporary, no checking is needed.
+ // TODO: Old ID should be reused in this case...
+ if (name.empty () || name [0] != 0 ||
+ peer_identity_.empty () || peer_identity_ [0] != 0) {
+
+ // If we already know the peer name do nothing, just check whether
+ // it haven't changed.
+ zmq_assert (name == peer_identity_);
+ }
+ }
+ else if (!peer_identity_.empty ()) {
+
+ // Store the peer identity.
+ name = peer_identity_;
+
+ // Register the session using the peer name.
+ if (!register_session (name, this)) {
+
+ // TODO: There's already a session with the specified
+ // identity. We should presumably syslog it and drop the
+ // session.
+ zmq_assert (false);
+ }
+ }
+}
+
+void zmq::named_session_t::detached ()
+{
+ // Do nothing. Named sessions are never destroyed because of disconnection,
+ // neither they have to actively reconnect.
+}
+
diff --git a/src/named_session.hpp b/src/named_session.hpp
new file mode 100644
index 0000000..cf31209
--- /dev/null
+++ b/src/named_session.hpp
@@ -0,0 +1,57 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_NAMED_SESSION_HPP_INCLUDED__
+#define __ZMQ_NAMED_SESSION_HPP_INCLUDED__
+
+#include "session.hpp"
+#include "blob.hpp"
+
+namespace zmq
+{
+
+ // Named session is created by listener object when the peer identifies
+ // itself by a strong name. Named session survives reconnections.
+
+ class named_session_t : public session_t
+ {
+ public:
+
+ named_session_t (class io_thread_t *io_thread_,
+ class socket_base_t *socket_, const options_t &options_,
+ const blob_t &name_);
+ ~named_session_t ();
+
+ // Handlers for events from session base class.
+ void attached (const blob_t &peer_identity_);
+ void detached ();
+
+ private:
+
+ // Name of the session. Corresponds to the peer's strong identity.
+ blob_t name;
+
+ named_session_t (const named_session_t&);
+ const named_session_t &operator = (const named_session_t&);
+ };
+
+}
+
+#endif
diff --git a/src/object.cpp b/src/object.cpp
index 324450f..e2ca6d6 100644
--- a/src/object.cpp
+++ b/src/object.cpp
@@ -1,42 +1,43 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
+#include <stdarg.h>
#include "object.hpp"
#include "ctx.hpp"
#include "err.hpp"
#include "pipe.hpp"
#include "io_thread.hpp"
-#include "owned.hpp"
#include "session.hpp"
#include "socket_base.hpp"
-zmq::object_t::object_t (ctx_t *ctx_, uint32_t thread_slot_) :
+zmq::object_t::object_t (ctx_t *ctx_, uint32_t tid_) :
ctx (ctx_),
- thread_slot (thread_slot_)
+ tid (tid_)
{
}
zmq::object_t::object_t (object_t *parent_) :
ctx (parent_->ctx),
- thread_slot (parent_->thread_slot)
+ tid (parent_->tid)
{
}
@@ -44,9 +45,9 @@ zmq::object_t::~object_t ()
{
}
-uint32_t zmq::object_t::get_thread_slot ()
+uint32_t zmq::object_t::get_tid ()
{
- return thread_slot;
+ return tid;
}
zmq::ctx_t *zmq::object_t::get_ctx ()
@@ -58,8 +59,12 @@ void zmq::object_t::process_command (command_t &cmd_)
{
switch (cmd_.type) {
- case command_t::revive:
- process_revive ();
+ case command_t::activate_reader:
+ process_activate_reader ();
+ break;
+
+ case command_t::activate_writer:
+ process_activate_writer (cmd_.args.activate_writer.msgs_read);
break;
case command_t::stop:
@@ -78,22 +83,19 @@ void zmq::object_t::process_command (command_t &cmd_)
case command_t::attach:
process_attach (cmd_.args.attach.engine,
+ cmd_.args.attach.peer_identity ?
blob_t (cmd_.args.attach.peer_identity,
- cmd_.args.attach.peer_identity_size));
+ cmd_.args.attach.peer_identity_size) : blob_t ());
process_seqnum ();
break;
case command_t::bind:
process_bind (cmd_.args.bind.in_pipe, cmd_.args.bind.out_pipe,
- blob_t (cmd_.args.bind.peer_identity,
- cmd_.args.bind.peer_identity_size));
+ cmd_.args.bind.peer_identity ? blob_t (cmd_.args.bind.peer_identity,
+ cmd_.args.bind.peer_identity_size) : blob_t ());
process_seqnum ();
break;
- case command_t::reader_info:
- process_reader_info (cmd_.args.reader_info.msgs_read);
- break;
-
case command_t::pipe_term:
process_pipe_term ();
return;
@@ -107,13 +109,21 @@ void zmq::object_t::process_command (command_t &cmd_)
break;
case command_t::term:
- process_term ();
+ process_term (cmd_.args.term.linger);
break;
case command_t::term_ack:
process_term_ack ();
break;
+ case command_t::reap:
+ process_reap (cmd_.args.reap.socket);
+ break;
+
+ case command_t::reaped:
+ process_reaped ();
+ break;
+
default:
zmq_assert (false);
}
@@ -123,34 +133,37 @@ void zmq::object_t::process_command (command_t &cmd_)
deallocate_command (&cmd_);
}
-void zmq::object_t::register_pipe (class pipe_t *pipe_)
+int zmq::object_t::register_endpoint (const char *addr_, endpoint_t &endpoint_)
{
- ctx->register_pipe (pipe_);
+ return ctx->register_endpoint (addr_, endpoint_);
}
-void zmq::object_t::unregister_pipe (class pipe_t *pipe_)
+void zmq::object_t::unregister_endpoints (socket_base_t *socket_)
{
- ctx->unregister_pipe (pipe_);
+ return ctx->unregister_endpoints (socket_);
}
-int zmq::object_t::register_endpoint (const char *addr_, socket_base_t *socket_)
+zmq::endpoint_t zmq::object_t::find_endpoint (const char *addr_)
{
- return ctx->register_endpoint (addr_, socket_);
+ return ctx->find_endpoint (addr_);
}
-void zmq::object_t::unregister_endpoints (socket_base_t *socket_)
+void zmq::object_t::destroy_socket (socket_base_t *socket_)
{
- return ctx->unregister_endpoints (socket_);
+ ctx->destroy_socket (socket_);
}
-zmq::socket_base_t *zmq::object_t::find_endpoint (const char *addr_)
+void zmq::object_t::log (const char *format_, ...)
{
- return ctx->find_endpoint (addr_);
+ va_list args;
+ va_start (args, format_);
+ ctx->log (format_, args);
+ va_end (args);
}
-zmq::io_thread_t *zmq::object_t::choose_io_thread (uint64_t taskset_)
+zmq::io_thread_t *zmq::object_t::choose_io_thread (uint64_t affinity_)
{
- return ctx->choose_io_thread (taskset_);
+ return ctx->choose_io_thread (affinity_);
}
void zmq::object_t::send_stop ()
@@ -158,26 +171,35 @@ void zmq::object_t::send_stop ()
// 'stop' command goes always from administrative thread to
// the current object.
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = this;
cmd.type = command_t::stop;
- ctx->send_command (thread_slot, cmd);
+ ctx->send_command (tid, cmd);
}
-void zmq::object_t::send_plug (owned_t *destination_, bool inc_seqnum_)
+void zmq::object_t::send_plug (own_t *destination_, bool inc_seqnum_)
{
if (inc_seqnum_)
destination_->inc_seqnum ();
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
cmd.type = command_t::plug;
send_command (cmd);
}
-void zmq::object_t::send_own (socket_base_t *destination_, owned_t *object_)
+void zmq::object_t::send_own (own_t *destination_, own_t *object_)
{
destination_->inc_seqnum ();
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
cmd.type = command_t::own;
cmd.args.own.object = object_;
@@ -191,6 +213,9 @@ void zmq::object_t::send_attach (session_t *destination_, i_engine *engine_,
destination_->inc_seqnum ();
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
cmd.type = command_t::attach;
cmd.args.attach.engine = engine_;
@@ -204,21 +229,23 @@ void zmq::object_t::send_attach (session_t *destination_, i_engine *engine_,
(unsigned char) peer_identity_.size ();
cmd.args.attach.peer_identity =
(unsigned char*) malloc (peer_identity_.size ());
- zmq_assert (cmd.args.attach.peer_identity_size);
+ alloc_assert (cmd.args.attach.peer_identity_size);
memcpy (cmd.args.attach.peer_identity, peer_identity_.data (),
peer_identity_.size ());
}
send_command (cmd);
}
-void zmq::object_t::send_bind (socket_base_t *destination_,
- reader_t *in_pipe_, writer_t *out_pipe_, const blob_t &peer_identity_,
- bool inc_seqnum_)
+void zmq::object_t::send_bind (own_t *destination_, reader_t *in_pipe_,
+ writer_t *out_pipe_, const blob_t &peer_identity_, bool inc_seqnum_)
{
if (inc_seqnum_)
destination_->inc_seqnum ();
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
cmd.type = command_t::bind;
cmd.args.bind.in_pipe = in_pipe_;
@@ -233,34 +260,43 @@ void zmq::object_t::send_bind (socket_base_t *destination_,
(unsigned char) peer_identity_.size ();
cmd.args.bind.peer_identity =
(unsigned char*) malloc (peer_identity_.size ());
- zmq_assert (cmd.args.bind.peer_identity_size);
+ alloc_assert (cmd.args.bind.peer_identity_size);
memcpy (cmd.args.bind.peer_identity, peer_identity_.data (),
peer_identity_.size ());
}
send_command (cmd);
}
-void zmq::object_t::send_revive (object_t *destination_)
+void zmq::object_t::send_activate_reader (reader_t *destination_)
{
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
- cmd.type = command_t::revive;
+ cmd.type = command_t::activate_reader;
send_command (cmd);
}
-void zmq::object_t::send_reader_info (writer_t *destination_,
+void zmq::object_t::send_activate_writer (writer_t *destination_,
uint64_t msgs_read_)
{
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
- cmd.type = command_t::reader_info;
- cmd.args.reader_info.msgs_read = msgs_read_;
+ cmd.type = command_t::activate_writer;
+ cmd.args.activate_writer.msgs_read = msgs_read_;
send_command (cmd);
}
void zmq::object_t::send_pipe_term (writer_t *destination_)
{
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
cmd.type = command_t::pipe_term;
send_command (cmd);
@@ -269,37 +305,84 @@ void zmq::object_t::send_pipe_term (writer_t *destination_)
void zmq::object_t::send_pipe_term_ack (reader_t *destination_)
{
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
cmd.type = command_t::pipe_term_ack;
send_command (cmd);
}
-void zmq::object_t::send_term_req (socket_base_t *destination_,
- owned_t *object_)
+void zmq::object_t::send_term_req (own_t *destination_,
+ own_t *object_)
{
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
cmd.type = command_t::term_req;
cmd.args.term_req.object = object_;
send_command (cmd);
}
-void zmq::object_t::send_term (owned_t *destination_)
+void zmq::object_t::send_term (own_t *destination_, int linger_)
{
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
cmd.type = command_t::term;
+ cmd.args.term.linger = linger_;
send_command (cmd);
}
-void zmq::object_t::send_term_ack (socket_base_t *destination_)
+void zmq::object_t::send_term_ack (own_t *destination_)
{
command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
cmd.destination = destination_;
cmd.type = command_t::term_ack;
send_command (cmd);
}
+void zmq::object_t::send_reap (class socket_base_t *socket_)
+{
+ command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
+ cmd.destination = ctx->get_reaper ();
+ cmd.type = command_t::reap;
+ cmd.args.reap.socket = socket_;
+ send_command (cmd);
+}
+
+void zmq::object_t::send_reaped ()
+{
+ command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
+ cmd.destination = ctx->get_reaper ();
+ cmd.type = command_t::reaped;
+ send_command (cmd);
+}
+
+void zmq::object_t::send_done ()
+{
+ command_t cmd;
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (&cmd, 0, sizeof (cmd));
+#endif
+ cmd.destination = NULL;
+ cmd.type = command_t::done;
+ ctx->send_command (ctx_t::term_tid, cmd);
+}
+
void zmq::object_t::process_stop ()
{
zmq_assert (false);
@@ -310,7 +393,7 @@ void zmq::object_t::process_plug ()
zmq_assert (false);
}
-void zmq::object_t::process_own (owned_t *object_)
+void zmq::object_t::process_own (own_t *object_)
{
zmq_assert (false);
}
@@ -327,12 +410,12 @@ void zmq::object_t::process_bind (reader_t *in_pipe_, writer_t *out_pipe_,
zmq_assert (false);
}
-void zmq::object_t::process_revive ()
+void zmq::object_t::process_activate_reader ()
{
zmq_assert (false);
}
-void zmq::object_t::process_reader_info (uint64_t msgs_read_)
+void zmq::object_t::process_activate_writer (uint64_t msgs_read_)
{
zmq_assert (false);
}
@@ -347,12 +430,12 @@ void zmq::object_t::process_pipe_term_ack ()
zmq_assert (false);
}
-void zmq::object_t::process_term_req (owned_t *object_)
+void zmq::object_t::process_term_req (own_t *object_)
{
zmq_assert (false);
}
-void zmq::object_t::process_term ()
+void zmq::object_t::process_term (int linger_)
{
zmq_assert (false);
}
@@ -362,6 +445,16 @@ void zmq::object_t::process_term_ack ()
zmq_assert (false);
}
+void zmq::object_t::process_reap (class socket_base_t *socket_)
+{
+ zmq_assert (false);
+}
+
+void zmq::object_t::process_reaped ()
+{
+ zmq_assert (false);
+}
+
void zmq::object_t::process_seqnum ()
{
zmq_assert (false);
@@ -369,6 +462,6 @@ void zmq::object_t::process_seqnum ()
void zmq::object_t::send_command (command_t &cmd_)
{
- ctx->send_command (cmd_.destination->get_thread_slot (), cmd_);
+ ctx->send_command (cmd_.destination->get_tid (), cmd_);
}
diff --git a/src/object.hpp b/src/object.hpp
index a38b0a6..706303b 100644
--- a/src/object.hpp
+++ b/src/object.hpp
@@ -1,25 +1,28 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_OBJECT_HPP_INCLUDED__
#define __ZMQ_OBJECT_HPP_INCLUDED__
+#include "../include/zmq.h"
+
#include "stdint.hpp"
#include "blob.hpp"
@@ -32,67 +35,73 @@ namespace zmq
{
public:
- object_t (class ctx_t *ctx_, uint32_t thread_slot_);
+ object_t (class ctx_t *ctx_, uint32_t tid_);
object_t (object_t *parent_);
virtual ~object_t ();
- uint32_t get_thread_slot ();
+ uint32_t get_tid ();
ctx_t *get_ctx ();
void process_command (struct command_t &cmd_);
- // Allow pipe to access corresponding context functions.
- void register_pipe (class pipe_t *pipe_);
- void unregister_pipe (class pipe_t *pipe_);
-
protected:
// Using following function, socket is able to access global
// repository of inproc endpoints.
- int register_endpoint (const char *addr_, class socket_base_t *socket_);
+ int register_endpoint (const char *addr_, struct endpoint_t &endpoint_);
void unregister_endpoints (class socket_base_t *socket_);
- class socket_base_t *find_endpoint (const char *addr_);
+ struct endpoint_t find_endpoint (const char *addr_);
+ void destroy_socket (class socket_base_t *socket_);
+
+ // Logs an message.
+ void log (const char *format_, ...);
// Chooses least loaded I/O thread.
- class io_thread_t *choose_io_thread (uint64_t taskset_);
+ class io_thread_t *choose_io_thread (uint64_t affinity_);
// Derived object can use these functions to send commands
// to other objects.
void send_stop ();
- void send_plug (class owned_t *destination_, bool inc_seqnum_ = true);
- void send_own (class socket_base_t *destination_,
- class owned_t *object_);
+ void send_plug (class own_t *destination_,
+ bool inc_seqnum_ = true);
+ void send_own (class own_t *destination_,
+ class own_t *object_);
void send_attach (class session_t *destination_,
struct i_engine *engine_, const blob_t &peer_identity_,
bool inc_seqnum_ = true);
- void send_bind (class socket_base_t *destination_,
+ void send_bind (class own_t *destination_,
class reader_t *in_pipe_, class writer_t *out_pipe_,
const blob_t &peer_identity_, bool inc_seqnum_ = true);
- void send_revive (class object_t *destination_);
- void send_reader_info (class writer_t *destination_,
+ void send_activate_reader (class reader_t *destination_);
+ void send_activate_writer (class writer_t *destination_,
uint64_t msgs_read_);
void send_pipe_term (class writer_t *destination_);
void send_pipe_term_ack (class reader_t *destination_);
- void send_term_req (class socket_base_t *destination_,
- class owned_t *object_);
- void send_term (class owned_t *destination_);
- void send_term_ack (class socket_base_t *destination_);
+ void send_term_req (class own_t *destination_,
+ class own_t *object_);
+ void send_term (class own_t *destination_, int linger_);
+ void send_term_ack (class own_t *destination_);
+ void send_reap (class socket_base_t *socket_);
+ void send_reaped ();
+ void send_done ();
// These handlers can be overloaded by the derived objects. They are
// called when command arrives from another thread.
virtual void process_stop ();
virtual void process_plug ();
- virtual void process_own (class owned_t *object_);
+ virtual void process_own (class own_t *object_);
virtual void process_attach (struct i_engine *engine_,
const blob_t &peer_identity_);
virtual void process_bind (class reader_t *in_pipe_,
class writer_t *out_pipe_, const blob_t &peer_identity_);
- virtual void process_revive ();
- virtual void process_reader_info (uint64_t msgs_read_);
+ virtual void process_activate_reader ();
+ virtual void process_activate_writer (uint64_t msgs_read_);
virtual void process_pipe_term ();
virtual void process_pipe_term_ack ();
- virtual void process_term_req (class owned_t *object_);
- virtual void process_term ();
+ virtual void process_term_req (class own_t *object_);
+ virtual void process_term (int linger_);
virtual void process_term_ack ();
+ virtual void process_reap (class socket_base_t *socket_);
+ virtual void process_reaped ();
// Special handler called after a command that requires a seqnum
// was processed. The implementation should catch up with its counter
@@ -104,13 +113,13 @@ namespace zmq
// Context provides access to the global state.
class ctx_t *ctx;
- // Slot ID of the thread the object belongs to.
- uint32_t thread_slot;
+ // Thread ID of the thread the object belongs to.
+ uint32_t tid;
void send_command (command_t &cmd_);
object_t (const object_t&);
- void operator = (const object_t&);
+ const object_t &operator = (const object_t&);
};
}
diff --git a/src/options.cpp b/src/options.cpp
index dcbb51d..92887ab 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -28,11 +29,17 @@ zmq::options_t::options_t () :
hwm (0),
swap (0),
affinity (0),
- rate (100),
+ rate (40 * 1000),
recovery_ivl (10),
+ recovery_ivl_msec (-1),
use_multicast_loop (true),
sndbuf (0),
rcvbuf (0),
+ type (-1),
+ linger (-1),
+ reconnect_ivl (100),
+ reconnect_ivl_max (0),
+ backlog (100),
requires_in (false),
requires_out (false),
immediate_connect (true)
@@ -97,6 +104,14 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
recovery_ivl = (uint32_t) *((int64_t*) optval_);
return 0;
+ case ZMQ_RECOVERY_IVL_MSEC:
+ if (optvallen_ != sizeof (int64_t) || *((int64_t*) optval_) < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+ recovery_ivl_msec = (int32_t) *((int64_t*) optval_);
+ return 0;
+
case ZMQ_MCAST_LOOP:
if (optvallen_ != sizeof (int64_t)) {
errno = EINVAL;
@@ -127,6 +142,47 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
}
rcvbuf = *((uint64_t*) optval_);
return 0;
+
+ case ZMQ_LINGER:
+ if (optvallen_ != sizeof (int)) {
+ errno = EINVAL;
+ return -1;
+ }
+ linger = *((int*) optval_);
+ return 0;
+
+ case ZMQ_RECONNECT_IVL:
+ if (optvallen_ != sizeof (int)) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (*((int*) optval_) < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+ reconnect_ivl = *((int*) optval_);
+ return 0;
+
+ case ZMQ_RECONNECT_IVL_MAX:
+ if (optvallen_ != sizeof (int)) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (*((int*) optval_) < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+ reconnect_ivl_max = *((int*) optval_);
+ return 0;
+
+ case ZMQ_BACKLOG:
+ if (optvallen_ != sizeof (int)) {
+ errno = EINVAL;
+ return -1;
+ }
+ backlog = *((int*) optval_);
+ return 0;
+
}
errno = EINVAL;
@@ -192,6 +248,15 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
*optvallen_ = sizeof (int64_t);
return 0;
+ case ZMQ_RECOVERY_IVL_MSEC:
+ if (*optvallen_ < sizeof (int64_t)) {
+ errno = EINVAL;
+ return -1;
+ }
+ *((int64_t*) optval_) = recovery_ivl_msec;
+ *optvallen_ = sizeof (int64_t);
+ return 0;
+
case ZMQ_MCAST_LOOP:
if (*optvallen_ < sizeof (int64_t)) {
errno = EINVAL;
@@ -218,6 +283,52 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
*((uint64_t*) optval_) = rcvbuf;
*optvallen_ = sizeof (uint64_t);
return 0;
+
+ case ZMQ_TYPE:
+ if (*optvallen_ < sizeof (int)) {
+ errno = EINVAL;
+ return -1;
+ }
+ *((int*) optval_) = type;
+ *optvallen_ = sizeof (int);
+ return 0;
+
+ case ZMQ_LINGER:
+ if (*optvallen_ < sizeof (int)) {
+ errno = EINVAL;
+ return -1;
+ }
+ *((int*) optval_) = linger;
+ *optvallen_ = sizeof (int);
+ return 0;
+
+ case ZMQ_RECONNECT_IVL:
+ if (*optvallen_ < sizeof (int)) {
+ errno = EINVAL;
+ return -1;
+ }
+ *((int*) optval_) = reconnect_ivl;
+ *optvallen_ = sizeof (int);
+ return 0;
+
+ case ZMQ_RECONNECT_IVL_MAX:
+ if (*optvallen_ < sizeof (int)) {
+ errno = EINVAL;
+ return -1;
+ }
+ *((int*) optval_) = reconnect_ivl_max;
+ *optvallen_ = sizeof (int);
+ return 0;
+
+ case ZMQ_BACKLOG:
+ if (*optvallen_ < sizeof (int)) {
+ errno = EINVAL;
+ return -1;
+ }
+ *((int*) optval_) = backlog;
+ *optvallen_ = sizeof (int);
+ return 0;
+
}
errno = EINVAL;
diff --git a/src/options.hpp b/src/options.hpp
index 908b166..b2e29d0 100644
--- a/src/options.hpp
+++ b/src/options.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -44,6 +45,8 @@ namespace zmq
// Reliability time interval [s]. Default 10s.
uint32_t recovery_ivl;
+ // Reliability time interval [ms]. Default -1 = not used.
+ int32_t recovery_ivl_msec;
// Enable multicast loopback. Default disabled (false).
bool use_multicast_loop;
@@ -51,6 +54,22 @@ namespace zmq
uint64_t sndbuf;
uint64_t rcvbuf;
+ // Socket type.
+ int type;
+
+ // Linger time, in milliseconds.
+ int linger;
+
+ // Minimum interval between attempts to reconnect, in milliseconds.
+ // Default 100ms
+ int reconnect_ivl;
+ // Maximum interval between attempts to reconnect, in milliseconds.
+ // Default 0 (unused)
+ int reconnect_ivl_max;
+
+ // Maximum backlog for pending connections.
+ int backlog;
+
// These options are never set by the user directly. Instead they are
// provided by the specific socket type.
bool requires_in;
diff --git a/src/own.cpp b/src/own.cpp
new file mode 100644
index 0000000..57e183a
--- /dev/null
+++ b/src/own.cpp
@@ -0,0 +1,214 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "own.hpp"
+#include "err.hpp"
+#include "io_thread.hpp"
+
+zmq::own_t::own_t (class ctx_t *parent_, uint32_t tid_) :
+ object_t (parent_, tid_),
+ terminating (false),
+ sent_seqnum (0),
+ processed_seqnum (0),
+ owner (NULL),
+ term_acks (0)
+{
+}
+
+zmq::own_t::own_t (io_thread_t *io_thread_, const options_t &options_) :
+ object_t (io_thread_),
+ options (options_),
+ terminating (false),
+ sent_seqnum (0),
+ processed_seqnum (0),
+ owner (NULL),
+ term_acks (0)
+{
+}
+
+zmq::own_t::~own_t ()
+{
+}
+
+void zmq::own_t::set_owner (own_t *owner_)
+{
+ zmq_assert (!owner);
+ owner = owner_;
+}
+
+void zmq::own_t::inc_seqnum ()
+{
+ // This function may be called from a different thread!
+ sent_seqnum.add (1);
+}
+
+void zmq::own_t::process_seqnum ()
+{
+ // Catch up with counter of processed commands.
+ processed_seqnum++;
+
+ // We may have catched up and still have pending terms acks.
+ check_term_acks ();
+}
+
+void zmq::own_t::launch_child (own_t *object_)
+{
+ // Specify the owner of the object.
+ object_->set_owner (this);
+
+ // Plug the object into the I/O thread.
+ send_plug (object_);
+
+ // Take ownership of the object.
+ send_own (this, object_);
+}
+
+void zmq::own_t::launch_sibling (own_t *object_)
+{
+ // At this point it is important that object is plugged in before its
+ // owner has a chance to terminate it. Thus, 'plug' command is sent before
+ // the 'own' command. Given that the mailbox preserves ordering of
+ // commands, 'term' command from the owner cannot make it to the object
+ // before the already written 'plug' command.
+
+ // Specify the owner of the object.
+ object_->set_owner (owner);
+
+ // Plug the object into its I/O thread.
+ send_plug (object_);
+
+ // Make parent own the object.
+ send_own (owner, object_);
+}
+
+void zmq::own_t::process_term_req (own_t *object_)
+{
+ // When shutting down we can ignore termination requests from owned
+ // objects. The termination request was already sent to the object.
+ if (terminating)
+ return;
+
+ // If I/O object is well and alive let's ask it to terminate.
+ owned_t::iterator it = std::find (owned.begin (), owned.end (), object_);
+
+ // If not found, we assume that termination request was already sent to
+ // the object so we can safely ignore the request.
+ if (it == owned.end ())
+ return;
+
+ owned.erase (it);
+ register_term_acks (1);
+
+ // Note that this object is the root of the (partial shutdown) thus, its
+ // value of linger is used, rather than the value stored by the children.
+ send_term (object_, options.linger);
+}
+
+void zmq::own_t::process_own (own_t *object_)
+{
+ // If the object is already being shut down, new owned objects are
+ // immediately asked to terminate. Note that linger is set to zero.
+ if (terminating) {
+ register_term_acks (1);
+ send_term (object_, 0);
+ return;
+ }
+
+ // Store the reference to the owned object.
+ owned.insert (object_);
+}
+
+void zmq::own_t::terminate ()
+{
+ // If termination is already underway, there's no point
+ // in starting it anew.
+ if (terminating)
+ return;
+
+ // As for the root of the ownership tree, there's noone to terminate it,
+ // so it has to terminate itself.
+ if (!owner) {
+ process_term (options.linger);
+ return;
+ }
+
+ // If I am an owned object, I'll ask my owner to terminate me.
+ send_term_req (owner, this);
+}
+
+void zmq::own_t::process_term (int linger_)
+{
+ // Double termination should never happen.
+ zmq_assert (!terminating);
+
+ // Send termination request to all owned objects.
+ for (owned_t::iterator it = owned.begin (); it != owned.end (); ++it)
+ send_term (*it, linger_);
+ register_term_acks (owned.size ());
+ owned.clear ();
+
+ // Start termination process and check whether by chance we cannot
+ // terminate immediately.
+ terminating = true;
+ check_term_acks ();
+}
+
+void zmq::own_t::register_term_acks (int count_)
+{
+ term_acks += count_;
+}
+
+void zmq::own_t::unregister_term_ack ()
+{
+ zmq_assert (term_acks > 0);
+ term_acks--;
+
+ // This may be a last ack we are waiting for before termination...
+ check_term_acks ();
+}
+
+void zmq::own_t::process_term_ack ()
+{
+ unregister_term_ack ();
+}
+
+void zmq::own_t::check_term_acks ()
+{
+ if (terminating && processed_seqnum == sent_seqnum.get () &&
+ term_acks == 0) {
+
+ // Sanity check. There should be no active children at this point.
+ zmq_assert (owned.empty ());
+
+ // The root object has nobody to confirm the termination to.
+ // Other nodes will confirm the termination to the owner.
+ if (owner)
+ send_term_ack (owner);
+
+ // Deallocate the resources.
+ process_destroy ();
+ }
+}
+
+void zmq::own_t::process_destroy ()
+{
+ delete this;
+}
+
diff --git a/src/own.hpp b/src/own.hpp
new file mode 100644
index 0000000..5023a30
--- /dev/null
+++ b/src/own.hpp
@@ -0,0 +1,140 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_OWN_HPP_INCLUDED__
+#define __ZMQ_OWN_HPP_INCLUDED__
+
+#include <set>
+#include <algorithm>
+
+#include "object.hpp"
+#include "options.hpp"
+#include "atomic_counter.hpp"
+#include "stdint.hpp"
+
+namespace zmq
+{
+
+ // Base class for objects forming a part of ownership hierarchy.
+ // It handles initialisation and destruction of such objects.
+
+ class own_t : public object_t
+ {
+ public:
+
+ // Note that the owner is unspecified in the constructor.
+ // It'll be supplied later on when the object is plugged in.
+
+ // The object is not living within an I/O thread. It has it's own
+ // thread outside of 0MQ infrastructure.
+ own_t (class ctx_t *parent_, uint32_t tid_);
+
+ // The object is living within I/O thread.
+ own_t (class io_thread_t *io_thread_, const options_t &options_);
+
+ // When another owned object wants to send command to this object
+ // it calls this function to let it know it should not shut down
+ // before the command is delivered.
+ void inc_seqnum ();
+
+ // Use following two functions to wait for arbitrary events before
+ // terminating. Just add number of events to wait for using
+ // register_tem_acks functions. When event occurs, call
+ // remove_term_ack. When number of pending acks reaches zero
+ // object will be deallocated.
+ void register_term_acks (int count_);
+ void unregister_term_ack ();
+
+ protected:
+
+ // Launch the supplied object and become its owner.
+ void launch_child (own_t *object_);
+
+ // Launch the supplied object and make it your sibling (make your
+ // owner become its owner as well).
+ void launch_sibling (own_t *object_);
+
+ // Ask owner object to terminate this object. It may take a while
+ // while actual termination is started. This function should not be
+ // called more than once.
+ void terminate ();
+
+ // Derived object destroys own_t. There's no point in allowing
+ // others to invoke the destructor. At the same time, it has to be
+ // virtual so that generic own_t deallocation mechanism destroys
+ // specific type of the owned object correctly.
+ virtual ~own_t ();
+
+ // Term handler is protocted rather than private so that it can
+ // be intercepted by the derived class. This is useful to add custom
+ // steps to the beginning of the termination process.
+ void process_term (int linger_);
+
+ // A place to hook in when phyicallal destruction of the object
+ // is to be delayed.
+ virtual void process_destroy ();
+
+ // Socket options associated with this object.
+ options_t options;
+
+ private:
+
+ // Set owner of the object
+ void set_owner (own_t *owner_);
+
+ // Handlers for incoming commands.
+ void process_own (own_t *object_);
+ void process_term_req (own_t *object_);
+ void process_term_ack ();
+ void process_seqnum ();
+
+ // Check whether all the peding term acks were delivered.
+ // If so, deallocate this object.
+ void check_term_acks ();
+
+ // True if termination was already initiated. If so, we can destroy
+ // the object if there are no more child objects or pending term acks.
+ bool terminating;
+
+ // Sequence number of the last command sent to this object.
+ atomic_counter_t sent_seqnum;
+
+ // Sequence number of the last command processed by this object.
+ uint64_t processed_seqnum;
+
+ // Socket owning this object. It's responsible for shutting down
+ // this object.
+ own_t *owner;
+
+ // List of all objects owned by this socket. We are responsible
+ // for deallocating them before we quit.
+ typedef std::set <own_t*> owned_t;
+ owned_t owned;
+
+ // Number of events we have to get before we can destroy the object.
+ int term_acks;
+
+ own_t (const own_t&);
+ const own_t &operator = (const own_t&);
+ };
+
+}
+
+#endif
diff --git a/src/owned.cpp b/src/owned.cpp
deleted file mode 100644
index d6be444..0000000
--- a/src/owned.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "owned.hpp"
-#include "err.hpp"
-
-zmq::owned_t::owned_t (object_t *parent_, socket_base_t *owner_) :
- object_t (parent_),
- owner (owner_),
- sent_seqnum (0),
- processed_seqnum (0),
- shutting_down (false)
-{
-}
-
-zmq::owned_t::~owned_t ()
-{
-}
-
-void zmq::owned_t::inc_seqnum ()
-{
- // NB: This function may be called from a different thread!
- sent_seqnum.add (1);
-}
-
-void zmq::owned_t::term ()
-{
- send_term_req (owner, this);
-}
-
-void zmq::owned_t::process_term ()
-{
- zmq_assert (!shutting_down);
- shutting_down = true;
- finalise ();
-}
-
-void zmq::owned_t::process_seqnum ()
-{
- // Catch up with counter of processed commands.
- processed_seqnum++;
- finalise ();
-}
-
-void zmq::owned_t::finalise ()
-{
- // If termination request was already received and there are no more
- // commands to wait for, terminate the object.
- if (shutting_down && processed_seqnum == sent_seqnum.get ()) {
- process_unplug ();
- send_term_ack (owner);
- delete this;
- }
-}
-
diff --git a/src/owned.hpp b/src/owned.hpp
deleted file mode 100644
index 91189a1..0000000
--- a/src/owned.hpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __ZMQ_OWNED_HPP_INCLUDED__
-#define __ZMQ_OWNED_HPP_INCLUDED__
-
-#include "socket_base.hpp"
-#include "atomic_counter.hpp"
-#include "stdint.hpp"
-
-namespace zmq
-{
-
- // Base class for objects owned by individual sockets. Handles
- // initialisation and destruction of such objects.
-
- class owned_t : public object_t
- {
- public:
-
- // The object will live in parent's thread, however, its lifetime
- // will be managed by its owner socket.
- owned_t (object_t *parent_, socket_base_t *owner_);
-
- // When another owned object wants to send command to this object
- // it calls this function to let it know it should not shut down
- // before the command is delivered.
- void inc_seqnum ();
-
- protected:
-
- // Ask owner socket to terminate this object.
- void term ();
-
- // Derived object destroys owned_t. No point in allowing others to
- // invoke the destructor. At the same time, it has to be virtual so
- // that generic owned_t deallocation mechanism destroys specific type
- // of the owned object correctly.
- virtual ~owned_t ();
-
- // io_object_t defines a new handler used to disconnect the object
- // from the poller object. Implement the handlen in the derived
- // classes to ensure sane cleanup.
- virtual void process_unplug () = 0;
-
- // Socket owning this object. When the socket is being closed it's
- // responsible for shutting down this object.
- socket_base_t *owner;
-
- private:
-
- // Handlers for incoming commands.
- void process_term ();
- void process_seqnum ();
-
- void finalise ();
-
- // Sequence number of the last command sent to this object.
- atomic_counter_t sent_seqnum;
-
- // Sequence number of the last command processed by this object.
- uint64_t processed_seqnum;
-
- // If true, the object is already shutting down.
- bool shutting_down;
-
- owned_t (const owned_t&);
- void operator = (const owned_t&);
- };
-
-}
-
-#endif
diff --git a/src/pair.cpp b/src/pair.cpp
index 3872b28..1acc60f 100644
--- a/src/pair.cpp
+++ b/src/pair.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,68 +24,96 @@
#include "err.hpp"
#include "pipe.hpp"
-zmq::pair_t::pair_t (class app_thread_t *parent_) :
- socket_base_t (parent_),
+zmq::pair_t::pair_t (class ctx_t *parent_, uint32_t tid_) :
+ socket_base_t (parent_, tid_),
inpipe (NULL),
outpipe (NULL),
- alive (true)
+ inpipe_alive (false),
+ outpipe_alive (false),
+ terminating (false)
{
+ options.type = ZMQ_PAIR;
options.requires_in = true;
options.requires_out = true;
}
zmq::pair_t::~pair_t ()
{
- if (inpipe)
- inpipe->term ();
- if (outpipe)
- outpipe->term ();
+ zmq_assert (!inpipe);
+ zmq_assert (!outpipe);
}
-void zmq::pair_t::xattach_pipes (class reader_t *inpipe_,
- class writer_t *outpipe_, const blob_t &peer_identity_)
+void zmq::pair_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_,
+ const blob_t &peer_identity_)
{
zmq_assert (!inpipe && !outpipe);
+
inpipe = inpipe_;
+ inpipe_alive = true;
+ inpipe->set_event_sink (this);
+
outpipe = outpipe_;
outpipe_alive = true;
+ outpipe->set_event_sink (this);
+
+ if (terminating) {
+ register_term_acks (2);
+ inpipe_->terminate ();
+ outpipe_->terminate ();
+ }
}
-void zmq::pair_t::xdetach_inpipe (class reader_t *pipe_)
+void zmq::pair_t::terminated (reader_t *pipe_)
{
zmq_assert (pipe_ == inpipe);
inpipe = NULL;
+ inpipe_alive = false;
+
+ if (terminating)
+ unregister_term_ack ();
}
-void zmq::pair_t::xdetach_outpipe (class writer_t *pipe_)
+void zmq::pair_t::terminated (writer_t *pipe_)
{
zmq_assert (pipe_ == outpipe);
outpipe = NULL;
+ outpipe_alive = false;
+
+ if (terminating)
+ unregister_term_ack ();
}
-void zmq::pair_t::xkill (class reader_t *pipe_)
+void zmq::pair_t::delimited (reader_t *pipe_)
{
- zmq_assert (alive);
- alive = false;
}
-void zmq::pair_t::xrevive (class reader_t *pipe_)
+void zmq::pair_t::process_term (int linger_)
{
- zmq_assert (!alive);
- alive = true;
+ terminating = true;
+
+ if (inpipe) {
+ register_term_acks (1);
+ inpipe->terminate ();
+ }
+
+ if (outpipe) {
+ register_term_acks (1);
+ outpipe->terminate ();
+ }
+
+ socket_base_t::process_term (linger_);
}
-void zmq::pair_t::xrevive (class writer_t *pipe_)
+void zmq::pair_t::activated (class reader_t *pipe_)
{
- zmq_assert (!outpipe_alive);
- outpipe_alive = true;
+ zmq_assert (!inpipe_alive);
+ inpipe_alive = true;
}
-int zmq::pair_t::xsetsockopt (int option_, const void *optval_,
- size_t optvallen_)
+void zmq::pair_t::activated (class writer_t *pipe_)
{
- errno = EINVAL;
- return -1;
+ zmq_assert (!outpipe_alive);
+ outpipe_alive = true;
}
int zmq::pair_t::xsend (zmq_msg_t *msg_, int flags_)
@@ -100,7 +129,8 @@ int zmq::pair_t::xsend (zmq_msg_t *msg_, int flags_)
return -1;
}
- outpipe->flush ();
+ if (!(flags_ & ZMQ_SNDMORE))
+ outpipe->flush ();
// Detach the original message from the data buffer.
int rc = zmq_msg_init (msg_);
@@ -114,9 +144,12 @@ int zmq::pair_t::xrecv (zmq_msg_t *msg_, int flags_)
// Deallocate old content of the message.
zmq_msg_close (msg_);
- if (!alive || !inpipe || !inpipe->read (msg_)) {
- // No message is available. Initialise the output parameter
- // to be a 0-byte message.
+ if (!inpipe_alive || !inpipe || !inpipe->read (msg_)) {
+
+ // No message is available.
+ inpipe_alive = false;
+
+ // Initialise the output parameter to be a 0-byte message.
zmq_msg_init (msg_);
errno = EAGAIN;
return -1;
@@ -126,17 +159,22 @@ int zmq::pair_t::xrecv (zmq_msg_t *msg_, int flags_)
bool zmq::pair_t::xhas_in ()
{
- if (alive && inpipe && inpipe->check_read ())
- return true;
- return false;
+ if (!inpipe || !inpipe_alive)
+ return false;
+
+ inpipe_alive = inpipe->check_read ();
+ return inpipe_alive;
}
bool zmq::pair_t::xhas_out ()
{
- if (outpipe == NULL || !outpipe_alive)
+ if (!outpipe || !outpipe_alive)
return false;
- outpipe_alive = outpipe->check_write ();
+ zmq_msg_t msg;
+ zmq_msg_init (&msg);
+ outpipe_alive = outpipe->check_write (&msg);
+ zmq_msg_close (&msg);
return outpipe_alive;
}
diff --git a/src/pair.hpp b/src/pair.hpp
index aea249f..54e60b5 100644
--- a/src/pair.hpp
+++ b/src/pair.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -21,41 +22,53 @@
#define __ZMQ_PAIR_HPP_INCLUDED__
#include "socket_base.hpp"
+#include "pipe.hpp"
namespace zmq
{
- class pair_t : public socket_base_t
+ class pair_t :
+ public socket_base_t,
+ public i_reader_events,
+ public i_writer_events
{
public:
- pair_t (class app_thread_t *parent_);
+ pair_t (class ctx_t *parent_, uint32_t tid_);
~pair_t ();
// Overloads of functions from socket_base_t.
void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
const blob_t &peer_identity_);
- void xdetach_inpipe (class reader_t *pipe_);
- void xdetach_outpipe (class writer_t *pipe_);
- void xkill (class reader_t *pipe_);
- void xrevive (class reader_t *pipe_);
- void xrevive (class writer_t *pipe_);
- int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
int xsend (zmq_msg_t *msg_, int flags_);
int xrecv (zmq_msg_t *msg_, int flags_);
bool xhas_in ();
bool xhas_out ();
+ // i_reader_events interface implementation.
+ void activated (class reader_t *pipe_);
+ void terminated (class reader_t *pipe_);
+ void delimited (class reader_t *pipe_);
+
+ // i_writer_events interface implementation.
+ void activated (class writer_t *pipe_);
+ void terminated (class writer_t *pipe_);
+
private:
+ // Hook into termination process.
+ void process_term (int linger_);
+
class reader_t *inpipe;
class writer_t *outpipe;
- bool alive;
+ bool inpipe_alive;
bool outpipe_alive;
+ bool terminating;
+
pair_t (const pair_t&);
- void operator = (const pair_t&);
+ const pair_t &operator = (const pair_t&);
};
}
diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp
index 048c529..4fadadc 100644
--- a/src/pgm_receiver.cpp
+++ b/src/pgm_receiver.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -36,6 +37,7 @@
zmq::pgm_receiver_t::pgm_receiver_t (class io_thread_t *parent_,
const options_t &options_) :
io_object_t (parent_),
+ has_rx_timer (false),
pgm_socket (true, options_),
options (options_),
inout (NULL),
@@ -55,7 +57,7 @@ int zmq::pgm_receiver_t::init (bool udp_encapsulation_, const char *network_)
return pgm_socket.init (udp_encapsulation_, network_);
}
-void zmq::pgm_receiver_t::plug (i_inout *inout_)
+void zmq::pgm_receiver_t::plug (io_thread_t *io_thread_, i_inout *inout_)
{
// Retrieve PGM fds and start polling.
int socket_fd;
@@ -72,7 +74,7 @@ void zmq::pgm_receiver_t::plug (i_inout *inout_)
void zmq::pgm_receiver_t::unplug ()
{
// Delete decoders.
- for (peers_t::iterator it = peers.begin (); it != peers.end (); it++) {
+ for (peers_t::iterator it = peers.begin (); it != peers.end (); ++it) {
if (it->second.decoder != NULL)
delete it->second.decoder;
}
@@ -81,19 +83,29 @@ void zmq::pgm_receiver_t::unplug ()
mru_decoder = NULL;
pending_bytes = 0;
- // Stop polling.
+ if (has_rx_timer) {
+ cancel_timer (rx_timer_id);
+ has_rx_timer = false;
+ }
+
rm_fd (socket_handle);
rm_fd (pipe_handle);
inout = NULL;
}
-void zmq::pgm_receiver_t::revive ()
+void zmq::pgm_receiver_t::terminate ()
+{
+ unplug ();
+ delete this;
+}
+
+void zmq::pgm_receiver_t::activate_out ()
{
zmq_assert (false);
}
-void zmq::pgm_receiver_t::resume_input ()
+void zmq::pgm_receiver_t::activate_in ()
{
// It is possible that the most recently used decoder
// processed the whole buffer but failed to write
@@ -129,17 +141,31 @@ void zmq::pgm_receiver_t::in_event ()
zmq_assert (pending_bytes == 0);
+ if (has_rx_timer) {
+ cancel_timer (rx_timer_id);
+ has_rx_timer = false;
+ }
+
// TODO: This loop can effectively block other engines in the same I/O
// thread in the case of high load.
while (true) {
// Get new batch of data.
- ssize_t received = pgm_socket.receive ((void**) &data, &tsi);
+ // Note the workaround made not to break strict-aliasing rules.
+ void *tmp = NULL;
+ ssize_t received = pgm_socket.receive (&tmp, &tsi);
+ data = (unsigned char*) tmp;
// No data to process. This may happen if the packet received is
// neither ODATA nor ODATA.
- if (received == 0)
+ if (received == 0) {
+ if (errno == ENOMEM || errno == EBUSY) {
+ const long timeout = pgm_socket.get_rx_timeout ();
+ add_timer (timeout, rx_timer_id);
+ has_rx_timer = true;
+ }
break;
+ }
// Find the peer based on its TSI.
peers_t::iterator it = peers.find (*tsi);
@@ -161,7 +187,7 @@ void zmq::pgm_receiver_t::in_event ()
// New peer. Add it to the list of know but unjoint peers.
if (it == peers.end ()) {
peer_info_t peer_info = {false, NULL};
- it = peers.insert (std::make_pair (*tsi, peer_info)).first;
+ it = peers.insert (peers_t::value_type (*tsi, peer_info)).first;
}
// Read the offset of the fist message in the current packet.
@@ -189,7 +215,8 @@ void zmq::pgm_receiver_t::in_event ()
it->second.joined = true;
// Create and connect decoder for the peer.
- it->second.decoder = new (std::nothrow) zmq_decoder_t (0);
+ it->second.decoder = new (std::nothrow) decoder_t (0);
+ alloc_assert (it->second.decoder);
it->second.decoder->set_inout (inout);
}
@@ -205,6 +232,12 @@ void zmq::pgm_receiver_t::in_event ()
reset_pollin (pipe_handle);
reset_pollin (socket_handle);
+ // Reset outstanding timer.
+ if (has_rx_timer) {
+ cancel_timer (rx_timer_id);
+ has_rx_timer = false;
+ }
+
break;
}
}
@@ -213,5 +246,14 @@ void zmq::pgm_receiver_t::in_event ()
inout->flush ();
}
+void zmq::pgm_receiver_t::timer_event (int token)
+{
+ zmq_assert (token == rx_timer_id);
+
+ // Timer cancels on return by poller_base.
+ has_rx_timer = false;
+ in_event ();
+}
+
#endif
diff --git a/src/pgm_receiver.hpp b/src/pgm_receiver.hpp
index 1b367bf..172557f 100644
--- a/src/pgm_receiver.hpp
+++ b/src/pgm_receiver.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -34,7 +35,7 @@
#include "io_object.hpp"
#include "i_engine.hpp"
#include "options.hpp"
-#include "zmq_decoder.hpp"
+#include "decoder.hpp"
#include "pgm_socket.hpp"
namespace zmq
@@ -51,36 +52,42 @@ namespace zmq
int init (bool udp_encapsulation_, const char *network_);
// i_engine interface implementation.
- void plug (struct i_inout *inout_);
+ void plug (class io_thread_t *io_thread_, struct i_inout *inout_);
void unplug ();
- void revive ();
- void resume_input ();
+ void terminate ();
+ void activate_in ();
+ void activate_out ();
// i_poll_events interface implementation.
void in_event ();
+ void timer_event (int token);
private:
+ // RX timeout timer ID.
+ enum {rx_timer_id = 0xa1};
+
+ // RX timer is running.
+ bool has_rx_timer;
+
// If joined is true we are already getting messages from the peer.
// It it's false, we are getting data but still we haven't seen
// beginning of a message.
struct peer_info_t
{
bool joined;
- zmq_decoder_t *decoder;
+ decoder_t *decoder;
};
struct tsi_comp
{
- inline bool operator () (const pgm_tsi_t &ltsi,
+ bool operator () (const pgm_tsi_t &ltsi,
const pgm_tsi_t &rtsi) const
{
- if (ltsi.sport < rtsi.sport)
- return true;
-
- return (std::lexicographical_compare (ltsi.gsi.identifier,
- ltsi.gsi.identifier + 6,
- rtsi.gsi.identifier, rtsi.gsi.identifier + 6));
+ uint32_t ll[2], rl[2];
+ memcpy (ll, &ltsi, sizeof (ll));
+ memcpy (rl, &rtsi, sizeof (rl));
+ return (ll[0] < rl[0]) || (ll[0] == rl[0] && ll[1] < rl[1]);
}
};
@@ -97,7 +104,7 @@ namespace zmq
i_inout *inout;
// Most recently used decoder.
- zmq_decoder_t *mru_decoder;
+ decoder_t *mru_decoder;
// Number of bytes not consumed by the decoder due to pipe overflow.
size_t pending_bytes;
@@ -112,7 +119,7 @@ namespace zmq
handle_t pipe_handle;
pgm_receiver_t (const pgm_receiver_t&);
- void operator = (const pgm_receiver_t&);
+ const pgm_receiver_t &operator = (const pgm_receiver_t&);
};
}
diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp
index 9aeb7a9..4d76433 100644
--- a/src/pgm_sender.cpp
+++ b/src/pgm_sender.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -36,6 +37,8 @@
zmq::pgm_sender_t::pgm_sender_t (io_thread_t *parent_,
const options_t &options_) :
io_object_t (parent_),
+ has_tx_timer (false),
+ has_rx_timer (false),
encoder (0),
pgm_socket (false, options_),
options (options_),
@@ -53,12 +56,12 @@ int zmq::pgm_sender_t::init (bool udp_encapsulation_, const char *network_)
out_buffer_size = pgm_socket.get_max_tsdu_size ();
out_buffer = (unsigned char*) malloc (out_buffer_size);
- zmq_assert (out_buffer);
+ alloc_assert (out_buffer);
return rc;
}
-void zmq::pgm_sender_t::plug (i_inout *inout_)
+void zmq::pgm_sender_t::plug (io_thread_t *io_thread_, i_inout *inout_)
{
// Alocate 2 fds for PGM socket.
int downlink_socket_fd = 0;
@@ -89,6 +92,16 @@ void zmq::pgm_sender_t::plug (i_inout *inout_)
void zmq::pgm_sender_t::unplug ()
{
+ if (has_rx_timer) {
+ cancel_timer (rx_timer_id);
+ has_rx_timer = false;
+ }
+
+ if (has_tx_timer) {
+ cancel_timer (tx_timer_id);
+ has_tx_timer = false;
+ }
+
rm_fd (handle);
rm_fd (uplink_handle);
rm_fd (rdata_notify_handle);
@@ -96,13 +109,19 @@ void zmq::pgm_sender_t::unplug ()
encoder.set_inout (NULL);
}
-void zmq::pgm_sender_t::revive ()
+void zmq::pgm_sender_t::terminate ()
+{
+ unplug ();
+ delete this;
+}
+
+void zmq::pgm_sender_t::activate_out ()
{
set_pollout (handle);
out_event ();
}
-void zmq::pgm_sender_t::resume_input ()
+void zmq::pgm_sender_t::activate_in ()
{
zmq_assert (false);
}
@@ -117,8 +136,18 @@ zmq::pgm_sender_t::~pgm_sender_t ()
void zmq::pgm_sender_t::in_event ()
{
- // In event on sender side means NAK or SPMR receiving from some peer.
+ if (has_rx_timer) {
+ cancel_timer (rx_timer_id);
+ has_rx_timer = false;
+ }
+
+ // In-event on sender side means NAK or SPMR receiving from some peer.
pgm_socket.process_upstream ();
+ if (errno == ENOMEM || errno == EBUSY) {
+ const long timeout = pgm_socket.get_rx_timeout ();
+ add_timer (timeout, rx_timer_id);
+ has_rx_timer = true;
+ }
}
void zmq::pgm_sender_t::out_event ()
@@ -146,14 +175,40 @@ void zmq::pgm_sender_t::out_event ()
put_uint16 (out_buffer, offset == -1 ? 0xffff : (uint16_t) offset);
}
+ if (has_tx_timer) {
+ cancel_timer (tx_timer_id);
+ has_tx_timer = false;
+ }
+
// Send the data.
size_t nbytes = pgm_socket.send (out_buffer, write_size);
// We can write either all data or 0 which means rate limit reached.
- if (nbytes == write_size)
+ if (nbytes == write_size) {
write_size = 0;
- else
+ } else {
zmq_assert (nbytes == 0);
+
+ if (errno == ENOMEM) {
+ const long timeout = pgm_socket.get_tx_timeout ();
+ add_timer (timeout, tx_timer_id);
+ has_tx_timer = true;
+ } else
+ zmq_assert (errno == EBUSY);
+ }
+}
+
+void zmq::pgm_sender_t::timer_event (int token)
+{
+ // Timer cancels on return by poller_base.
+ if (token == rx_timer_id) {
+ has_rx_timer = false;
+ in_event ();
+ } else if (token == tx_timer_id) {
+ has_tx_timer = false;
+ out_event ();
+ } else
+ zmq_assert (false);
}
#endif
diff --git a/src/pgm_sender.hpp b/src/pgm_sender.hpp
index 23a53bc..4a21b3f 100644
--- a/src/pgm_sender.hpp
+++ b/src/pgm_sender.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -33,7 +34,7 @@
#include "i_engine.hpp"
#include "options.hpp"
#include "pgm_socket.hpp"
-#include "zmq_encoder.hpp"
+#include "encoder.hpp"
namespace zmq
{
@@ -49,19 +50,28 @@ namespace zmq
int init (bool udp_encapsulation_, const char *network_);
// i_engine interface implementation.
- void plug (struct i_inout *inout_);
+ void plug (class io_thread_t *io_thread_, struct i_inout *inout_);
void unplug ();
- void revive ();
- void resume_input ();
+ void terminate ();
+ void activate_in ();
+ void activate_out ();
// i_poll_events interface implementation.
void in_event ();
void out_event ();
+ void timer_event (int token);
private:
+ // TX and RX timeout timer ID's.
+ enum {tx_timer_id = 0xa0, rx_timer_id = 0xa1};
+
+ // Timers are running.
+ bool has_tx_timer;
+ bool has_rx_timer;
+
// Message encoder.
- zmq_encoder_t encoder;
+ encoder_t encoder;
// PGM socket.
pgm_socket_t pgm_socket;
@@ -86,7 +96,7 @@ namespace zmq
size_t write_size;
pgm_sender_t (const pgm_sender_t&);
- void operator = (const pgm_sender_t&);
+ const pgm_sender_t &operator = (const pgm_sender_t&);
};
}
diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp
index 5a952a7..5a82907 100644
--- a/src/pgm_socket.cpp
+++ b/src/pgm_socket.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -40,8 +41,12 @@
#include "uuid.hpp"
#include "stdint.hpp"
+#ifndef MSG_ERRQUEUE
+#define MSG_ERRQUEUE 0x2000
+#endif
+
zmq::pgm_socket_t::pgm_socket_t (bool receiver_, const options_t &options_) :
- transport (NULL),
+ sock (NULL),
options (options_),
receiver (receiver_),
pgm_msgv (NULL),
@@ -52,13 +57,18 @@ zmq::pgm_socket_t::pgm_socket_t (bool receiver_, const options_t &options_) :
{
}
+// Create, bind and connect PGM socket.
+// network_ of the form <interface & multicast group decls>:<IP port>
+// e.g. eth0;239.192.0.1:7500
+// link-local;224.250.0.1,224.250.0.2;224.250.0.3:8000
+// ;[fe80::1%en0]:7500
int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
{
// Can not open transport before destroying old one.
- zmq_assert (transport == NULL);
+ zmq_assert (sock == NULL);
- // Parse port number.
- const char *port_delim = strchr (network_, ':');
+ // Parse port number, start from end for IPv6
+ const char *port_delim = strrchr (network_, ':');
if (!port_delim) {
errno = EINVAL;
return -1;
@@ -73,261 +83,276 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
}
memset (network, '\0', sizeof (network));
memcpy (network, network_, port_delim - network_);
-
+
+ // Validate socket options
+ // Data rate is in [B/s]. options.rate is in [kb/s].
+ if (options.rate <= 0) {
+ errno = EINVAL;
+ return -1;
+ }
+ // Recovery interval [s] or [ms] - based on the user's call
+ if ((options.recovery_ivl <= 0) && (options.recovery_ivl_msec <= 0)) {
+ errno = EINVAL;
+ return -1;
+ }
+
// Zero counter used in msgrecv.
nbytes_rec = 0;
nbytes_processed = 0;
pgm_msgv_processed = 0;
- int rc;
- GError *pgm_error = NULL;
+ pgm_error_t *pgm_error = NULL;
+ struct pgm_addrinfo_t hints, *res = NULL;
+ sa_family_t sa_family;
- // PGM transport GSI.
- pgm_gsi_t gsi;
-
- std::string gsi_base;
-
- if (options.identity.size () > 0) {
-
- // Create gsi from identity.
- // TODO: We assume that identity is standard C string here.
- // What if it contains binary zeroes?
- gsi_base.assign ((const char*) options.identity.data (),
- options.identity.size ());
- } else {
+ memset (&hints, 0, sizeof (hints));
+ hints.ai_family = AF_UNSPEC;
+ if (!pgm_getaddrinfo (network, NULL, &res, &pgm_error)) {
- // Generate random gsi.
- gsi_base = uuid_t ().to_string ();
- }
+ // Invalid parameters don't set pgm_error_t.
+ zmq_assert (pgm_error != NULL);
+ if (pgm_error->domain == PGM_ERROR_DOMAIN_IF && (
- rc = pgm_gsi_create_from_string (&gsi, gsi_base.c_str (), -1);
- if (rc != TRUE) {
- errno = EINVAL;
- return -1;
- }
+ // NB: cannot catch EAI_BADFLAGS.
+ pgm_error->code != PGM_ERROR_SERVICE &&
+ pgm_error->code != PGM_ERROR_SOCKTNOSUPPORT))
- struct pgm_transport_info_t *res = NULL;
- struct pgm_transport_info_t hint;
- memset (&hint, 0, sizeof (hint));
- hint.ti_family = AF_INET;
-
- if (!pgm_if_get_transport_info (network, &hint, &res, &pgm_error)) {
- if (pgm_error->domain == PGM_IF_ERROR && (
- pgm_error->code == PGM_IF_ERROR_INVAL ||
- pgm_error->code == PGM_IF_ERROR_XDEV ||
- pgm_error->code == PGM_IF_ERROR_NODEV ||
- pgm_error->code == PGM_IF_ERROR_NOTUNIQ ||
- pgm_error->code == PGM_IF_ERROR_ADDRFAMILY ||
- pgm_error->code == PGM_IF_ERROR_FAMILY ||
- pgm_error->code == PGM_IF_ERROR_NODATA ||
- pgm_error->code == PGM_IF_ERROR_NONAME ||
- pgm_error->code == PGM_IF_ERROR_SERVICE)) {
- g_error_free (pgm_error);
- errno = EINVAL;
- return -1;
- }
+ // User, host, or network configuration or transient error.
+ goto err_abort;
+ // Fatal OpenPGM internal error.
zmq_assert (false);
}
- res->ti_gsi = gsi;
- res->ti_dport = port_number;
+ zmq_assert (res != NULL);
- // If we are using UDP encapsulation update gsr or res.
- if (udp_encapsulation_) {
- res->ti_udp_encap_ucast_port = port_number;
- res->ti_udp_encap_mcast_port = port_number;
- }
+ // Pick up detected IP family.
+ sa_family = res->ai_send_addrs[0].gsr_group.ss_family;
- if (!pgm_transport_create (&transport, res, &pgm_error)) {
- if (pgm_error->domain == PGM_TRANSPORT_ERROR && (
- pgm_error->code == PGM_TRANSPORT_ERROR_INVAL ||
- pgm_error->code == PGM_TRANSPORT_ERROR_PERM ||
- pgm_error->code == PGM_TRANSPORT_ERROR_NODEV)) {
- pgm_if_free_transport_info (res);
- g_error_free (pgm_error);
- errno = EINVAL;
- return -1;
+ // Create IP/PGM or UDP/PGM socket.
+ if (udp_encapsulation_) {
+ if (!pgm_socket (&sock, sa_family, SOCK_SEQPACKET, IPPROTO_UDP,
+ &pgm_error)) {
+
+ // Invalid parameters don't set pgm_error_t.
+ zmq_assert (pgm_error != NULL);
+ if (pgm_error->domain == PGM_ERROR_DOMAIN_SOCKET && (
+ pgm_error->code != PGM_ERROR_BADF &&
+ pgm_error->code != PGM_ERROR_FAULT &&
+ pgm_error->code != PGM_ERROR_NOPROTOOPT &&
+ pgm_error->code != PGM_ERROR_FAILED))
+
+ // User, host, or network configuration or transient error.
+ goto err_abort;
+
+ // Fatal OpenPGM internal error.
+ zmq_assert (false);
}
- zmq_assert (false);
+ // All options are of data type int
+ const int encapsulation_port = port_number;
+ if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_UDP_ENCAP_UCAST_PORT,
+ &encapsulation_port, sizeof (encapsulation_port)))
+ goto err_abort;
+ if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_UDP_ENCAP_MCAST_PORT,
+ &encapsulation_port, sizeof (encapsulation_port)))
+ goto err_abort;
}
-
- pgm_if_free_transport_info (res);
-
- // Common parameters for receiver and sender.
-
- // Set maximum transport protocol data unit size (TPDU).
- rc = pgm_transport_set_max_tpdu (transport, pgm_max_tpdu);
- if (rc != TRUE) {
- errno = EINVAL;
- return -1;
+ else {
+ if (!pgm_socket (&sock, sa_family, SOCK_SEQPACKET, IPPROTO_PGM,
+ &pgm_error)) {
+
+ // Invalid parameters don't set pgm_error_t.
+ zmq_assert (pgm_error != NULL);
+ if (pgm_error->domain == PGM_ERROR_DOMAIN_SOCKET && (
+ pgm_error->code != PGM_ERROR_BADF &&
+ pgm_error->code != PGM_ERROR_FAULT &&
+ pgm_error->code != PGM_ERROR_NOPROTOOPT &&
+ pgm_error->code != PGM_ERROR_FAILED))
+
+ // User, host, or network configuration or transient error.
+ goto err_abort;
+
+ // Fatal OpenPGM internal error.
+ zmq_assert (false);
+ }
}
- // Set maximum number of network hops to cross.
- rc = pgm_transport_set_hops (transport, 16);
- if (rc != TRUE) {
- errno = EINVAL;
- return -1;
- }
+ {
+ const int rcvbuf = (int) options.rcvbuf,
+ sndbuf = (int) options.sndbuf,
+ max_tpdu = (int) pgm_max_tpdu;
+ if (rcvbuf) {
+ if (!pgm_setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &rcvbuf,
+ sizeof (rcvbuf)))
+ goto err_abort;
+ }
+ if (sndbuf) {
+ if (!pgm_setsockopt (sock, SOL_SOCKET, SO_SNDBUF, &sndbuf,
+ sizeof (sndbuf)))
+ goto err_abort;
+ }
- // Set nonblocking send/recv sockets.
- if (!pgm_transport_set_nonblocking (transport, true)) {
- errno = EINVAL;
- return -1;
+ // Set maximum transport protocol data unit size (TPDU).
+ if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_MTU, &max_tpdu,
+ sizeof (max_tpdu)))
+ goto err_abort;
}
if (receiver) {
+ const int recv_only = 1,
+ rxw_max_tpdu = (int) pgm_max_tpdu,
+ rxw_sqns = compute_sqns (rxw_max_tpdu),
+ peer_expiry = pgm_secs (300),
+ spmr_expiry = pgm_msecs (25),
+ nak_bo_ivl = pgm_msecs (50),
+ nak_rpt_ivl = pgm_msecs (200),
+ nak_rdata_ivl = pgm_msecs (200),
+ nak_data_retries = 50,
+ nak_ncf_retries = 50;
+
+ if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_RECV_ONLY, &recv_only,
+ sizeof (recv_only)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_RXW_SQNS, &rxw_sqns,
+ sizeof (rxw_sqns)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_PEER_EXPIRY, &peer_expiry,
+ sizeof (peer_expiry)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_SPMR_EXPIRY, &spmr_expiry,
+ sizeof (spmr_expiry)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_BO_IVL, &nak_bo_ivl,
+ sizeof (nak_bo_ivl)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_RPT_IVL, &nak_rpt_ivl,
+ sizeof (nak_rpt_ivl)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_RDATA_IVL,
+ &nak_rdata_ivl, sizeof (nak_rdata_ivl)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_DATA_RETRIES,
+ &nak_data_retries, sizeof (nak_data_retries)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_NCF_RETRIES,
+ &nak_ncf_retries, sizeof (nak_ncf_retries)))
+ goto err_abort;
+ } else {
+ const int send_only = 1,
+ max_rte = (int) ((options.rate * 1000) / 8),
+ txw_max_tpdu = (int) pgm_max_tpdu,
+ txw_sqns = compute_sqns (txw_max_tpdu),
+ ambient_spm = pgm_secs (30),
+ heartbeat_spm[] = { pgm_msecs (100),
+ pgm_msecs (100),
+ pgm_msecs (100),
+ pgm_msecs (100),
+ pgm_msecs (1300),
+ pgm_secs (7),
+ pgm_secs (16),
+ pgm_secs (25),
+ pgm_secs (30) };
+
+ if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_SEND_ONLY,
+ &send_only, sizeof (send_only)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_ODATA_MAX_RTE,
+ &max_rte, sizeof (max_rte)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_TXW_SQNS,
+ &txw_sqns, sizeof (txw_sqns)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_AMBIENT_SPM,
+ &ambient_spm, sizeof (ambient_spm)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_HEARTBEAT_SPM,
+ &heartbeat_spm, sizeof (heartbeat_spm)))
+ goto err_abort;
+ }
- // Receiver transport.
-
- // Note that NAKs are still generated by the transport.
- rc = pgm_transport_set_recv_only (transport, true, false);
- zmq_assert (rc == TRUE);
-
- if (options.rcvbuf) {
- rc = pgm_transport_set_rcvbuf (transport, (int) options.rcvbuf);
- if (rc != TRUE)
- return -1;
- }
-
- // Set NAK transmit back-off interval [us].
- rc = pgm_transport_set_nak_bo_ivl (transport, 50 * 1000);
- zmq_assert (rc == TRUE);
-
- // Set timeout before repeating NAK [us].
- rc = pgm_transport_set_nak_rpt_ivl (transport, 200 * 1000);
- zmq_assert (rc == TRUE);
-
- // Set timeout for receiving RDATA.
- rc = pgm_transport_set_nak_rdata_ivl (transport, 200 * 1000);
- zmq_assert (rc == TRUE);
-
- // Set retries for NAK without NCF/DATA (NAK_DATA_RETRIES).
- rc = pgm_transport_set_nak_data_retries (transport, 5);
- zmq_assert (rc == TRUE);
-
- // Set retries for NCF after NAK (NAK_NCF_RETRIES).
- rc = pgm_transport_set_nak_ncf_retries (transport, 2);
- zmq_assert (rc == TRUE);
-
- // Set timeout for removing a dead peer [us].
- rc = pgm_transport_set_peer_expiry (transport, 5 * 8192 * 1000);
- zmq_assert (rc == TRUE);
-
- // Set expiration time of SPM Requests [us].
- rc = pgm_transport_set_spmr_expiry (transport, 25 * 1000);
- zmq_assert (rc == TRUE);
+ // PGM transport GSI.
+ struct pgm_sockaddr_t addr;
- // Set the size of the receive window.
- // Data rate is in [B/s]. options.rate is in [kb/s].
- if (options.rate <= 0) {
- errno = EINVAL;
- return -1;
- }
- rc = pgm_transport_set_rxw_max_rte (transport,
- options.rate * 1000 / 8);
- if (rc != TRUE) {
- errno = EINVAL;
- return -1;
- }
+ memset (&addr, 0, sizeof(addr));
+ addr.sa_port = port_number;
+ addr.sa_addr.sport = DEFAULT_DATA_SOURCE_PORT;
- // Recovery interval [s].
- if (options.recovery_ivl <= 0) {
- errno = EINVAL;
- return -1;
- }
- rc = pgm_transport_set_rxw_secs (transport, options.recovery_ivl);
- if (rc != TRUE) {
- errno = EINVAL;
- return -1;
- }
+ if (options.identity.size () > 0) {
+ // Create gsi from identity.
+ if (!pgm_gsi_create_from_data (&addr.sa_addr.gsi,
+ options.identity.data (), options.identity.size ()))
+ goto err_abort;
} else {
- // Sender transport.
+ // Generate random gsi.
+ std::string gsi_base = uuid_t ().to_string ();
+ if (!pgm_gsi_create_from_string (&addr.sa_addr.gsi,
+ gsi_base.c_str (), -1))
+ goto err_abort;
+ }
- // Waiting pipe won't be read.
- rc = pgm_transport_set_send_only (transport, TRUE);
- zmq_assert (rc == TRUE);
+ // Bind a transport to the specified network devices.
+ struct pgm_interface_req_t if_req;
+ memset (&if_req, 0, sizeof(if_req));
+ if_req.ir_interface = res->ai_recv_addrs[0].gsr_interface;
+ if_req.ir_scope_id = 0;
+ if (AF_INET6 == sa_family) {
+ struct sockaddr_in6 sa6;
+ memcpy (&sa6, &res->ai_recv_addrs[0].gsr_group, sizeof (sa6));
+ if_req.ir_scope_id = sa6.sin6_scope_id;
+ }
+ if (!pgm_bind3 (sock, &addr, sizeof (addr), &if_req, sizeof (if_req),
+ &if_req, sizeof (if_req), &pgm_error)) {
- if (options.sndbuf) {
- rc = pgm_transport_set_sndbuf (transport, (int) options.sndbuf);
- if (rc != TRUE)
- return -1;
- }
+ // Invalid parameters don't set pgm_error_t.
+ zmq_assert (pgm_error != NULL);
+ if ((pgm_error->domain == PGM_ERROR_DOMAIN_SOCKET ||
+ pgm_error->domain == PGM_ERROR_DOMAIN_IF) && (
+ pgm_error->code != PGM_ERROR_INVAL &&
+ pgm_error->code != PGM_ERROR_BADF &&
+ pgm_error->code != PGM_ERROR_FAULT))
- // Set the size of the send window.
- // Data rate is in [B/s] options.rate is in [kb/s].
- if (options.rate <= 0) {
- errno = EINVAL;
- return -1;
- }
- rc = pgm_transport_set_txw_max_rte (transport,
- options.rate * 1000 / 8);
- if (rc != TRUE) {
- errno = EINVAL;
- return -1;
- }
+ // User, host, or network configuration or transient error.
+ goto err_abort;
- // Recovery interval [s].
- if (options.recovery_ivl <= 0) {
- errno = EINVAL;
- return -1;
- }
- rc = pgm_transport_set_txw_secs (transport, options.recovery_ivl);
- if (rc != TRUE) {
- errno = EINVAL;
- return -1;
- }
+ // Fatal OpenPGM internal error.
+ zmq_assert (false);
+ }
- // Set interval of background SPM packets [us].
- rc = pgm_transport_set_ambient_spm (transport, 8192 * 1000);
- zmq_assert (rc == TRUE);
-
- // Set intervals of data flushing SPM packets [us].
- guint spm_heartbeat[] = {4 * 1000, 4 * 1000, 8 * 1000, 16 * 1000,
- 32 * 1000, 64 * 1000, 128 * 1000, 256 * 1000, 512 * 1000,
- 1024 * 1000, 2048 * 1000, 4096 * 1000, 8192 * 1000};
- rc = pgm_transport_set_heartbeat_spm (transport, spm_heartbeat,
- G_N_ELEMENTS(spm_heartbeat));
- zmq_assert (rc == TRUE);
+ // Join IP multicast groups.
+ for (unsigned i = 0; i < res->ai_recv_addrs_len; i++) {
+ if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_JOIN_GROUP,
+ &res->ai_recv_addrs [i], sizeof (struct group_req)))
+ goto err_abort;
}
-
- // Enable multicast loopback.
- if (options.use_multicast_loop) {
- rc = pgm_transport_set_multicast_loop (transport, true);
- zmq_assert (rc == TRUE);
+ if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_SEND_GROUP,
+ &res->ai_send_addrs [0], sizeof (struct group_req)))
+ goto err_abort;
+
+ pgm_freeaddrinfo (res);
+ res = NULL;
+
+ // Set IP level parameters.
+ {
+ const int nonblocking = 1,
+ multicast_loop = options.use_multicast_loop ? 1 : 0,
+ multicast_hops = 16,
+
+ // Expedited Forwarding PHB for network elements, no ECN.
+ dscp = 0x2e << 2;
+
+ if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_MULTICAST_LOOP,
+ &multicast_loop, sizeof (multicast_loop)) ||
+ !pgm_setsockopt (sock, IPPROTO_PGM, PGM_MULTICAST_HOPS,
+ &multicast_hops, sizeof (multicast_hops)))
+ goto err_abort;
+ if (AF_INET6 != sa_family && !pgm_setsockopt (sock,
+ IPPROTO_PGM, PGM_TOS, &dscp, sizeof (dscp)))
+ goto err_abort;
+ if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_NOBLOCK,
+ &nonblocking, sizeof (nonblocking)))
+ goto err_abort;
}
- // Bind a transport to the specified network devices.
- if (!pgm_transport_bind (transport, &pgm_error)) {
- if (pgm_error->domain == PGM_IF_ERROR && (
- pgm_error->code == PGM_IF_ERROR_INVAL ||
- pgm_error->code == PGM_IF_ERROR_XDEV ||
- pgm_error->code == PGM_IF_ERROR_NODEV ||
- pgm_error->code == PGM_IF_ERROR_NOTUNIQ ||
- pgm_error->code == PGM_IF_ERROR_ADDRFAMILY ||
- pgm_error->code == PGM_IF_ERROR_FAMILY ||
- pgm_error->code == PGM_IF_ERROR_NODATA ||
- pgm_error->code == PGM_IF_ERROR_NONAME ||
- pgm_error->code == PGM_IF_ERROR_SERVICE)) {
- g_error_free (pgm_error);
- errno = EINVAL;
- return -1;
- }
- if (pgm_error->domain == PGM_TRANSPORT_ERROR && (
- pgm_error->code == PGM_TRANSPORT_ERROR_FAILED)) {
- g_error_free (pgm_error);
- errno = EINVAL;
- return -1;
- }
+ // Connect PGM transport to start state machine.
+ if (!pgm_connect (sock, &pgm_error)) {
- zmq_assert (false);
+ // Invalid parameters don't set pgm_error_t.
+ zmq_assert (pgm_error != NULL);
+ goto err_abort;
}
// For receiver transport preallocate pgm_msgv array.
- // TODO: ?
if (receiver) {
zmq_assert (in_batch_size > 0);
size_t max_tsdu_size = get_max_tsdu_size ();
@@ -337,96 +362,176 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
zmq_assert (pgm_msgv_len);
pgm_msgv = (pgm_msgv_t*) malloc (sizeof (pgm_msgv_t) * pgm_msgv_len);
+ alloc_assert (pgm_msgv);
}
return 0;
+
+err_abort:
+ if (sock != NULL) {
+ pgm_close (sock, FALSE);
+ sock = NULL;
+ }
+ if (res != NULL) {
+ pgm_freeaddrinfo (res);
+ res = NULL;
+ }
+ if (pgm_error != NULL) {
+ pgm_error_free (pgm_error);
+ pgm_error = NULL;
+ }
+ errno = EINVAL;
+ return -1;
}
zmq::pgm_socket_t::~pgm_socket_t ()
{
if (pgm_msgv)
free (pgm_msgv);
- if (transport)
- pgm_transport_destroy (transport, TRUE);
+ if (sock)
+ pgm_close (sock, TRUE);
}
-// Get receiver fds. recv_fd is from transport->recv_sock
-// waiting_pipe_fd is from transport->waiting_pipe [0]
+// Get receiver fds. receive_fd_ is signaled for incoming packets,
+// waiting_pipe_fd_ is signaled for state driven events and data.
void zmq::pgm_socket_t::get_receiver_fds (int *receive_fd_,
int *waiting_pipe_fd_)
{
+ socklen_t socklen;
+ bool rc;
+
zmq_assert (receive_fd_);
zmq_assert (waiting_pipe_fd_);
- // recv_sock2 should not be used - check it.
- zmq_assert (transport->recv_sock2 == -1);
-
- // Check if transport can receive data and can not send.
- zmq_assert (transport->can_recv_data);
- zmq_assert (!transport->can_send_data);
-
- // Take FDs directly from transport.
- *receive_fd_ = pgm_transport_get_recv_fd (transport);
- *waiting_pipe_fd_ = pgm_transport_get_pending_fd (transport);
+ socklen = sizeof (*receive_fd_);
+ rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_RECV_SOCK, receive_fd_,
+ &socklen);
+ zmq_assert (rc);
+ zmq_assert (socklen == sizeof (*receive_fd_));
+
+ socklen = sizeof (*waiting_pipe_fd_);
+ rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_PENDING_SOCK, waiting_pipe_fd_,
+ &socklen);
+ zmq_assert (rc);
+ zmq_assert (socklen == sizeof (*waiting_pipe_fd_));
}
// Get fds and store them into user allocated memory.
-// sender_fd is from pgm_transport->send_sock.
-// receive_fd_ is from transport->recv_sock.
-// rdata_notify_fd_ is from transport->rdata_notify.
-// pending_notify_fd_ is from transport->pending_notify.
+// send_fd is for non-blocking send wire notifications.
+// receive_fd_ is for incoming back-channel protocol packets.
+// rdata_notify_fd_ is raised for waiting repair transmissions.
+// pending_notify_fd_ is for state driven events.
void zmq::pgm_socket_t::get_sender_fds (int *send_fd_, int *receive_fd_,
int *rdata_notify_fd_, int *pending_notify_fd_)
{
+ socklen_t socklen;
+ bool rc;
+
zmq_assert (send_fd_);
zmq_assert (receive_fd_);
-
zmq_assert (rdata_notify_fd_);
zmq_assert (pending_notify_fd_);
- // recv_sock2 should not be used - check it.
- zmq_assert (transport->recv_sock2 == -1);
-
- // Check if transport can send data and can not receive.
- zmq_assert (transport->can_send_data);
- zmq_assert (!transport->can_recv_data);
-
- // Take FDs from transport.
- *send_fd_ = pgm_transport_get_send_fd (transport);
- *receive_fd_ = pgm_transport_get_recv_fd (transport);
-
- *rdata_notify_fd_ = pgm_transport_get_repair_fd (transport);
- *pending_notify_fd_ = pgm_transport_get_pending_fd (transport);
+ socklen = sizeof (*send_fd_);
+ rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_SEND_SOCK, send_fd_, &socklen);
+ zmq_assert (rc);
+ zmq_assert (socklen == sizeof (*receive_fd_));
+
+ socklen = sizeof (*receive_fd_);
+ rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_RECV_SOCK, receive_fd_,
+ &socklen);
+ zmq_assert (rc);
+ zmq_assert (socklen == sizeof (*receive_fd_));
+
+ socklen = sizeof (*rdata_notify_fd_);
+ rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_REPAIR_SOCK, rdata_notify_fd_,
+ &socklen);
+ zmq_assert (rc);
+ zmq_assert (socklen == sizeof (*rdata_notify_fd_));
+
+ socklen = sizeof (*pending_notify_fd_);
+ rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_PENDING_SOCK,
+ pending_notify_fd_, &socklen);
+ zmq_assert (rc);
+ zmq_assert (socklen == sizeof (*pending_notify_fd_));
}
// Send one APDU, transmit window owned memory.
+// data_len_ must be less than one TPDU.
size_t zmq::pgm_socket_t::send (unsigned char *data_, size_t data_len_)
{
size_t nbytes = 0;
- PGMIOStatus status = pgm_send (transport, data_, data_len_, &nbytes);
+ const int status = pgm_send (sock, data_, data_len_, &nbytes);
- if (nbytes != data_len_) {
- zmq_assert (status == PGM_IO_STATUS_RATE_LIMITED);
- zmq_assert (nbytes == 0);
- }
-
- // We have to write all data as one packet.
- if (nbytes > 0)
+ // We have to write all data as one packet.
+ if (nbytes > 0) {
+ zmq_assert (status == PGM_IO_STATUS_NORMAL);
zmq_assert ((ssize_t) nbytes == (ssize_t) data_len_);
+ } else {
+ zmq_assert (status == PGM_IO_STATUS_RATE_LIMITED ||
+ status == PGM_IO_STATUS_WOULD_BLOCK);
+
+ if (status == PGM_IO_STATUS_RATE_LIMITED)
+ errno = ENOMEM;
+ else
+ errno = EBUSY;
+ }
+
+ // Save return value.
+ last_tx_status = status;
return nbytes;
}
+long zmq::pgm_socket_t::get_rx_timeout ()
+{
+ if (last_rx_status != PGM_IO_STATUS_RATE_LIMITED &&
+ last_rx_status != PGM_IO_STATUS_TIMER_PENDING)
+ return -1;
+
+ struct timeval tv;
+ socklen_t optlen = sizeof (tv);
+ const bool rc = pgm_getsockopt (sock, IPPROTO_PGM,
+ last_rx_status == PGM_IO_STATUS_RATE_LIMITED ? PGM_RATE_REMAIN :
+ PGM_TIME_REMAIN, &tv, &optlen);
+ zmq_assert (rc);
+
+ const long timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
+
+ return timeout;
+}
+
+long zmq::pgm_socket_t::get_tx_timeout ()
+{
+ if (last_tx_status != PGM_IO_STATUS_RATE_LIMITED)
+ return -1;
+
+ struct timeval tv;
+ socklen_t optlen = sizeof (tv);
+ const bool rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_RATE_REMAIN, &tv,
+ &optlen);
+ zmq_assert (rc);
+
+ const long timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
+
+ return timeout;
+}
+
// Return max TSDU size without fragmentation from current PGM transport.
size_t zmq::pgm_socket_t::get_max_tsdu_size ()
{
- return (size_t) pgm_transport_max_tsdu (transport, false);
+ int max_tsdu = 0;
+ socklen_t optlen = sizeof (max_tsdu);
+
+ bool rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_MSS, &max_tsdu, &optlen);
+ zmq_assert (rc);
+ zmq_assert (optlen == sizeof (max_tsdu));
+ return (size_t) max_tsdu;
}
-// pgm_transport_recvmsgv is called to fill the pgm_msgv array up to
-// pgm_msgv_len. In subsequent calls data from pgm_msgv structure are
-// returned.
+// pgm_recvmsgv is called to fill the pgm_msgv array up to pgm_msgv_len.
+// In subsequent calls data from pgm_msgv structure are returned.
ssize_t zmq::pgm_socket_t::receive (void **raw_data_, const pgm_tsi_t **tsi_)
{
size_t raw_data_len = 0;
@@ -439,6 +544,7 @@ ssize_t zmq::pgm_socket_t::receive (void **raw_data_, const pgm_tsi_t **tsi_)
nbytes_rec = 0;
nbytes_processed = 0;
pgm_msgv_processed = 0;
+ errno = EAGAIN;
return 0;
}
@@ -453,15 +559,18 @@ ssize_t zmq::pgm_socket_t::receive (void **raw_data_, const pgm_tsi_t **tsi_)
// Receive a vector of Application Protocol Domain Unit's (APDUs)
// from the transport.
- GError *pgm_error = NULL;
+ pgm_error_t *pgm_error = NULL;
- const PGMIOStatus status = pgm_recvmsgv (transport, pgm_msgv,
- pgm_msgv_len, MSG_DONTWAIT, &nbytes_rec, &pgm_error);
+ const int status = pgm_recvmsgv (sock, pgm_msgv,
+ pgm_msgv_len, MSG_ERRQUEUE, &nbytes_rec, &pgm_error);
+ // Invalid parameters.
zmq_assert (status != PGM_IO_STATUS_ERROR);
+ last_rx_status = status;
+
// In a case when no ODATA/RDATA fired POLLIN event (SPM...)
- // pgm_recvmsg returns ?.
+ // pgm_recvmsg returns PGM_IO_STATUS_TIMER_PENDING.
if (status == PGM_IO_STATUS_TIMER_PENDING) {
zmq_assert (nbytes_rec == 0);
@@ -469,21 +578,44 @@ ssize_t zmq::pgm_socket_t::receive (void **raw_data_, const pgm_tsi_t **tsi_)
// In case if no RDATA/ODATA caused POLLIN 0 is
// returned.
nbytes_rec = 0;
+ errno = EBUSY;
+ return 0;
+ }
+
+ // Send SPMR, NAK, ACK is rate limited.
+ if (status == PGM_IO_STATUS_RATE_LIMITED) {
+
+ zmq_assert (nbytes_rec == 0);
+
+ // In case if no RDATA/ODATA caused POLLIN 0 is returned.
+ nbytes_rec = 0;
+ errno = ENOMEM;
+ return 0;
+ }
+
+ // No peers and hence no incoming packets.
+ if (status == PGM_IO_STATUS_WOULD_BLOCK) {
+
+ zmq_assert (nbytes_rec == 0);
+
+ // In case if no RDATA/ODATA caused POLLIN 0 is returned.
+ nbytes_rec = 0;
+ errno = EAGAIN;
return 0;
}
// Data loss.
if (status == PGM_IO_STATUS_RESET) {
- pgm_peer_t* peer = (pgm_peer_t*) transport->peers_pending->data;
+ struct pgm_sk_buff_t* skb = pgm_msgv [0].msgv_skb [0];
// Save lost data TSI.
- *tsi_ = &peer->tsi;
+ *tsi_ = &skb->tsi;
nbytes_rec = 0;
// In case of dala loss -1 is returned.
errno = EINVAL;
- g_error_free (pgm_error);
+ pgm_free_skb (skb);
return -1;
}
@@ -494,6 +626,7 @@ ssize_t zmq::pgm_socket_t::receive (void **raw_data_, const pgm_tsi_t **tsi_)
zmq_assert (pgm_msgv_processed <= pgm_msgv_len);
}
+ // Zero byte payloads are valid in PGM, but not 0MQ protocol.
zmq_assert (nbytes_rec > 0);
// Only one APDU per pgm_msgv_t structure is allowed.
@@ -522,16 +655,50 @@ void zmq::pgm_socket_t::process_upstream ()
pgm_msgv_t dummy_msg;
size_t dummy_bytes = 0;
- GError *pgm_error = NULL;
+ pgm_error_t *pgm_error = NULL;
- PGMIOStatus status = pgm_recvmsgv (transport, &dummy_msg,
- 1, MSG_DONTWAIT, &dummy_bytes, &pgm_error);
+ const int status = pgm_recvmsgv (sock, &dummy_msg,
+ 1, MSG_ERRQUEUE, &dummy_bytes, &pgm_error);
+ // Invalid parameters.
zmq_assert (status != PGM_IO_STATUS_ERROR);
// No data should be returned.
zmq_assert (dummy_bytes == 0 && (status == PGM_IO_STATUS_TIMER_PENDING ||
- status == PGM_IO_STATUS_RATE_LIMITED));
+ status == PGM_IO_STATUS_RATE_LIMITED ||
+ status == PGM_IO_STATUS_WOULD_BLOCK));
+
+ last_rx_status = status;
+
+ if (status == PGM_IO_STATUS_TIMER_PENDING)
+ errno = EBUSY;
+ else if (status == PGM_IO_STATUS_RATE_LIMITED)
+ errno = ENOMEM;
+ else
+ errno = EAGAIN;
+}
+
+int zmq::pgm_socket_t::compute_sqns (int tpdu_)
+{
+ // Convert rate into B/ms.
+ uint64_t rate = ((uint64_t) options.rate) / 8;
+
+ // Get recovery interval in milliseconds.
+ uint64_t interval = options.recovery_ivl_msec >= 0 ?
+ options.recovery_ivl_msec :
+ options.recovery_ivl * 1000;
+
+ // Compute the size of the buffer in bytes.
+ uint64_t size = interval * rate;
+
+ // Translate the size into number of packets.
+ uint64_t sqns = size / tpdu_;
+
+ // Buffer should be able to contain at least one packet.
+ if (sqns == 0)
+ sqns = 1;
+
+ return (int) sqns;
}
#endif
diff --git a/src/pgm_socket.hpp b/src/pgm_socket.hpp
index b9f55d1..9699aed 100644
--- a/src/pgm_socket.hpp
+++ b/src/pgm_socket.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -28,8 +29,13 @@
#include "windows.hpp"
#endif
+#define __PGM_WININT_H__
#include <pgm/pgm.h>
+#ifdef ZMQ_HAVE_OSX
+#include <pgm/in.h>
+#endif
+
#include "options.hpp"
namespace zmq
@@ -39,9 +45,8 @@ namespace zmq
{
public:
+
// If receiver_ is true PGM transport is not generating SPM packets.
- // interface format: iface;mcast_group:port for raw PGM socket
- // udp:iface;mcast_goup:port for UDP encapsulacion
pgm_socket_t (bool receiver_, const options_t &options_);
// Closes the transport.
@@ -67,14 +72,22 @@ namespace zmq
// Receive data from pgm socket.
ssize_t receive (void **data_, const pgm_tsi_t **tsi_);
+ long get_rx_timeout ();
+ long get_tx_timeout ();
+
// POLLIN on sender side should mean NAK or SPMR receiving.
// process_upstream function is used to handle such a situation.
void process_upstream ();
private:
+
+ // Compute size of the buffer based on rate and recovery interval.
+ int compute_sqns (int tpdu_);
- // OpenPGM transport
- pgm_transport_t* transport;
+ // OpenPGM transport.
+ pgm_sock_t* sock;
+
+ int last_rx_status, last_tx_status;
// Associated socket options.
options_t options;
diff --git a/src/pipe.cpp b/src/pipe.cpp
index 200beb0..8dcf577 100644
--- a/src/pipe.cpp
+++ b/src/pipe.cpp
@@ -1,47 +1,72 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <new>
+
#include "../include/zmq.h"
#include "pipe.hpp"
+#include "likely.hpp"
-zmq::reader_t::reader_t (object_t *parent_, uint64_t lwm_) :
+zmq::reader_t::reader_t (object_t *parent_, pipe_t *pipe_,
+ uint64_t lwm_) :
object_t (parent_),
- pipe (NULL),
- peer (NULL),
+ active (true),
+ pipe (pipe_),
+ writer (NULL),
lwm (lwm_),
msgs_read (0),
- endpoint (NULL)
-{}
+ sink (NULL),
+ terminating (false)
+{
+ // Note that writer is not set here. Writer will inform reader about its
+ // address once it is created (via set_writer method).
+}
+
+void zmq::reader_t::set_writer (writer_t *writer_)
+{
+ zmq_assert (!writer);
+ writer = writer_;
+}
zmq::reader_t::~reader_t ()
{
- if (pipe)
- unregister_pipe (pipe);
+ // Pipe as such is owned and deallocated by reader object.
+ // The point is that reader processes the last step of terminal
+ // handshaking (term_ack).
+ zmq_assert (pipe);
+
+ // First delete all the unread messages in the pipe. We have to do it by
+ // hand because zmq_msg_t is a POD, not a class, so there's no associated
+ // destructor.
+ zmq_msg_t msg;
+ while (pipe->read (&msg))
+ zmq_msg_close (&msg);
+
+ delete pipe;
}
-void zmq::reader_t::set_pipe (pipe_t *pipe_)
+void zmq::reader_t::set_event_sink (i_reader_events *sink_)
{
- zmq_assert (!pipe);
- pipe = pipe_;
- peer = &pipe->writer;
- register_pipe (pipe);
+ zmq_assert (!sink);
+ sink = sink_;
}
bool zmq::reader_t::is_delimiter (zmq_msg_t &msg_)
@@ -53,19 +78,24 @@ bool zmq::reader_t::is_delimiter (zmq_msg_t &msg_)
bool zmq::reader_t::check_read ()
{
+ if (!active)
+ return false;
+
// Check if there's an item in the pipe.
- // If not, deactivate the pipe.
if (!pipe->check_read ()) {
- endpoint->kill (this);
+ active = false;
return false;
}
// If the next item in the pipe is message delimiter,
// initiate its termination.
if (pipe->probe (is_delimiter)) {
- if (endpoint)
- endpoint->detach_inpipe (this);
- term ();
+ zmq_msg_t msg;
+ bool ok = pipe->read (&msg);
+ zmq_assert (ok);
+ if (sink)
+ sink->delimited (this);
+ terminate ();
return false;
}
@@ -74,17 +104,20 @@ bool zmq::reader_t::check_read ()
bool zmq::reader_t::read (zmq_msg_t *msg_)
{
+ if (!active)
+ return false;
+
if (!pipe->read (msg_)) {
- endpoint->kill (this);
+ active = false;
return false;
}
// If delimiter was read, start termination process of the pipe.
unsigned char *offset = 0;
if (msg_->content == (void*) (offset + ZMQ_DELIMITER)) {
- if (endpoint)
- endpoint->detach_inpipe (this);
- term ();
+ if (sink)
+ sink->delimited (this);
+ terminate ();
return false;
}
@@ -92,87 +125,104 @@ bool zmq::reader_t::read (zmq_msg_t *msg_)
msgs_read++;
if (lwm > 0 && msgs_read % lwm == 0)
- send_reader_info (peer, msgs_read);
+ send_activate_writer (writer, msgs_read);
return true;
}
-void zmq::reader_t::set_endpoint (i_endpoint *endpoint_)
+void zmq::reader_t::terminate ()
{
- endpoint = endpoint_;
-}
+ // If termination was already started by the peer, do nothing.
+ if (terminating)
+ return;
-void zmq::reader_t::term ()
-{
- endpoint = NULL;
- send_pipe_term (peer);
+ active = false;
+ terminating = true;
+ send_pipe_term (writer);
}
-void zmq::reader_t::process_revive ()
+void zmq::reader_t::process_activate_reader ()
{
- // Beacuse of command throttling mechanism, incoming termination request
- // may not have been processed before subsequent send.
- // In that case endpoint is NULL.
- if (endpoint)
- endpoint->revive (this);
+ // Forward the event to the sink (either socket or session).
+ active = true;
+ sink->activated (this);
}
void zmq::reader_t::process_pipe_term_ack ()
{
- peer = NULL;
- delete pipe;
+ // At this point writer may already be deallocated.
+ // For safety's sake drop the reference to it.
+ writer = NULL;
+
+ // Notify owner about the termination.
+ zmq_assert (sink);
+ sink->terminated (this);
+
+ // Deallocate resources.
+ delete this;
}
-zmq::writer_t::writer_t (object_t *parent_,
+zmq::writer_t::writer_t (object_t *parent_, pipe_t *pipe_, reader_t *reader_,
uint64_t hwm_, int64_t swap_size_) :
object_t (parent_),
- pipe (NULL),
- peer (NULL),
+ active (true),
+ pipe (pipe_),
+ reader (reader_),
hwm (hwm_),
msgs_read (0),
msgs_written (0),
- msg_store (NULL),
- extra_msg_flag (false),
- stalled (false),
- pending_close (false),
- endpoint (NULL)
+ swap (NULL),
+ sink (NULL),
+ swapping (false),
+ pending_delimiter (false),
+ terminating (false)
{
+ // Inform reader about the writer.
+ reader->set_writer (this);
+
+ // Open the swap file, if required.
if (swap_size_ > 0) {
- msg_store = new (std::nothrow) msg_store_t (swap_size_);
- if (msg_store != NULL) {
- if (msg_store->init () < 0) {
- delete msg_store;
- msg_store = NULL;
- }
- }
+ swap = new (std::nothrow) swap_t (swap_size_);
+ alloc_assert (swap);
+ int rc = swap->init ();
+ zmq_assert (rc == 0);
}
}
-void zmq::writer_t::set_endpoint (i_endpoint *endpoint_)
-{
- endpoint = endpoint_;
-}
-
zmq::writer_t::~writer_t ()
{
- if (extra_msg_flag)
- zmq_msg_close (&extra_msg);
-
- delete msg_store;
+ if (swap)
+ delete swap;
}
-void zmq::writer_t::set_pipe (pipe_t *pipe_)
+void zmq::writer_t::set_event_sink (i_writer_events *sink_)
{
- zmq_assert (!pipe);
- pipe = pipe_;
- peer = &pipe->reader;
+ zmq_assert (!sink);
+ sink = sink_;
}
-bool zmq::writer_t::check_write ()
+bool zmq::writer_t::check_write (zmq_msg_t *msg_)
{
- if (pipe_full () && (msg_store == NULL || msg_store->full () || extra_msg_flag)) {
- stalled = true;
+ // We've already checked and there's no space free for the new message.
+ // There's no point in checking once again.
+ if (unlikely (!active))
return false;
+
+ if (unlikely (swapping)) {
+ if (unlikely (!swap->fits (msg_))) {
+ active = false;
+ return false;
+ }
+ }
+ else {
+ if (unlikely (pipe_full ())) {
+ if (swap)
+ swapping = true;
+ else {
+ active = false;
+ return false;
+ }
+ }
}
return true;
@@ -180,73 +230,68 @@ bool zmq::writer_t::check_write ()
bool zmq::writer_t::write (zmq_msg_t *msg_)
{
- if (!check_write ())
+ if (unlikely (!check_write (msg_)))
return false;
- if (pipe_full ()) {
- if (msg_store->store (msg_)) {
- if (!(msg_->flags & ZMQ_MSG_MORE))
- msg_store->commit ();
- } else {
- extra_msg = *msg_;
- extra_msg_flag = true;
- }
- }
- else {
- pipe->write (*msg_, msg_->flags & ZMQ_MSG_MORE);
+ if (unlikely (swapping)) {
+ bool stored = swap->store (msg_);
+ zmq_assert (stored);
if (!(msg_->flags & ZMQ_MSG_MORE))
- msgs_written++;
+ swap->commit ();
+ return true;
}
+ pipe->write (*msg_, msg_->flags & ZMQ_MSG_MORE);
+ if (!(msg_->flags & ZMQ_MSG_MORE))
+ msgs_written++;
+
return true;
}
void zmq::writer_t::rollback ()
{
- if (extra_msg_flag && extra_msg.flags & ZMQ_MSG_MORE) {
- zmq_msg_close (&extra_msg);
- extra_msg_flag = false;
+ // Remove incomplete message from the swap.
+ if (unlikely (swapping)) {
+ swap->rollback ();
+ return;
}
- if (msg_store != NULL)
- msg_store->rollback ();
-
+ // Remove incomplete message from the pipe.
zmq_msg_t msg;
- // Remove all incomplete messages from the pipe.
while (pipe->unwrite (&msg)) {
zmq_assert (msg.flags & ZMQ_MSG_MORE);
zmq_msg_close (&msg);
}
-
- if (stalled && endpoint != NULL && check_write ()) {
- stalled = false;
- endpoint->revive (this);
- }
}
void zmq::writer_t::flush ()
{
- if (!pipe->flush ())
- send_revive (peer);
+ // In the swapping mode, flushing is automatically handled by swap object.
+ if (!swapping && !pipe->flush ())
+ send_activate_reader (reader);
}
-void zmq::writer_t::term ()
+void zmq::writer_t::terminate ()
{
- endpoint = NULL;
+ // Prevent double termination.
+ if (terminating)
+ return;
+ terminating = true;
+
+ // Mark the pipe as not available for writing.
+ active = false;
// Rollback any unfinished messages.
rollback ();
- if (msg_store == NULL || (msg_store->empty () && !extra_msg_flag))
- write_delimiter ();
- else
- pending_close = true;
-}
+ if (swapping) {
+ pending_delimiter = true;
+ return;
+ }
-void zmq::writer_t::write_delimiter ()
-{
- // Push delimiter into the pipe.
- // Trick the compiler to belive that the tag is a valid pointer.
+ // Push delimiter into the pipe. Trick the compiler to belive that
+ // the tag is a valid pointer. Note that watermarks are not checked
+ // thus the delimiter can be written even though the pipe is full.
zmq_msg_t msg;
const unsigned char *offset = 0;
msg.content = (void*) (offset + ZMQ_DELIMITER);
@@ -255,109 +300,110 @@ void zmq::writer_t::write_delimiter ()
flush ();
}
-void zmq::writer_t::process_reader_info (uint64_t msgs_read_)
+void zmq::writer_t::process_activate_writer (uint64_t msgs_read_)
{
- zmq_msg_t msg;
-
+ // Store the reader's message sequence number.
msgs_read = msgs_read_;
- if (msg_store) {
- // Move messages from backing store into pipe.
- while (!pipe_full () && !msg_store->empty ()) {
- msg_store->fetch(&msg);
- // Write message into the pipe.
+ // If we are in the swapping mode, we have some messages in the swap.
+ // Given that pipe is now ready for writing we can move part of the
+ // swap into the pipe.
+ if (swapping) {
+ zmq_msg_t msg;
+ while (!pipe_full () && !swap->empty ()) {
+ swap->fetch(&msg);
pipe->write (msg, msg.flags & ZMQ_MSG_MORE);
if (!(msg.flags & ZMQ_MSG_MORE))
msgs_written++;
}
-
- if (extra_msg_flag) {
- if (!pipe_full ()) {
- pipe->write (extra_msg, extra_msg.flags & ZMQ_MSG_MORE);
- if (!(extra_msg.flags & ZMQ_MSG_MORE))
- msgs_written++;
- extra_msg_flag = false;
- }
- else if (msg_store->store (&extra_msg)) {
- if (!(extra_msg.flags & ZMQ_MSG_MORE))
- msg_store->commit ();
- extra_msg_flag = false;
+ if (!pipe->flush ())
+ send_activate_reader (reader);
+
+ // There are no more messages in the swap. We can switch into
+ // standard in-memory mode.
+ if (swap->empty ()) {
+ swapping = false;
+
+ // Push delimiter into the pipe. Trick the compiler to belive that
+ // the tag is a valid pointer. Note that watermarks are not checked
+ // thus the delimiter can be written even though the pipe is full.
+ if (pending_delimiter) {
+ zmq_msg_t msg;
+ const unsigned char *offset = 0;
+ msg.content = (void*) (offset + ZMQ_DELIMITER);
+ msg.flags = 0;
+ pipe->write (msg, false);
+ flush ();
+ return;
}
}
-
- if (pending_close && msg_store->empty () && !extra_msg_flag) {
- write_delimiter ();
- pending_close = false;
- }
-
- flush ();
}
- if (stalled && endpoint != NULL) {
- stalled = false;
- endpoint->revive (this);
+ // If the writer was non-active before, let's make it active
+ // (available for writing messages to).
+ if (!active && !terminating) {
+ active = true;
+ zmq_assert (sink);
+ sink->activated (this);
}
}
void zmq::writer_t::process_pipe_term ()
{
- if (endpoint)
- endpoint->detach_outpipe (this);
+ send_pipe_term_ack (reader);
- reader_t *p = peer;
- peer = NULL;
- send_pipe_term_ack (p);
-}
+ // The above command allows reader to deallocate itself and the pipe.
+ // For safety's sake we'll drop the pointers here.
+ reader = NULL;
+ pipe = NULL;
-bool zmq::writer_t::pipe_full ()
-{
- return hwm > 0 && msgs_written - msgs_read == hwm;
-}
+ // Notify owner about the termination.
+ zmq_assert (sink);
+ sink->terminated (this);
-zmq::pipe_t::pipe_t (object_t *reader_parent_, object_t *writer_parent_,
- uint64_t hwm_, int64_t swap_size_) :
- reader (reader_parent_, compute_lwm (hwm_)),
- writer (writer_parent_, hwm_, swap_size_)
-{
- reader.set_pipe (this);
- writer.set_pipe (this);
+ // Deallocate the resources.
+ delete this;
}
-zmq::pipe_t::~pipe_t ()
+bool zmq::writer_t::pipe_full ()
{
- // Deallocate all the unread messages in the pipe. We have to do it by
- // hand because zmq_msg_t is a POD, not a class, so there's no associated
- // destructor.
- zmq_msg_t msg;
- while (read (&msg))
- zmq_msg_close (&msg);
+ return hwm > 0 && msgs_written - msgs_read == hwm;
}
-uint64_t zmq::pipe_t::compute_lwm (uint64_t hwm_)
+void zmq::create_pipe (object_t *reader_parent_, object_t *writer_parent_,
+ uint64_t hwm_, int64_t swap_size_, reader_t **reader_, writer_t **writer_)
{
- // Following point should be taken into consideration when computing
- // low watermark:
- //
- // 1. LWM has to be less than HWM.
- // 2. LWM cannot be set to very low value (such as zero) as after filling
- // the queue it would start to refill only after all the messages are
- // read from it and thus unnecessarily hold the progress back.
- // 3. LWM cannot be set to very high value (such as HWM-1) as it would
- // result in lock-step filling of the queue - if a single message is read
- // from a full queue, writer thread is resumed to write exactly one
- // message to the queue and go back to sleep immediately. This would
- // result in low performance.
- //
- // Given the 3. it would be good to keep HWM and LWM as far apart as
- // possible to reduce the thread switching overhead to almost zero,
- // say HWM-LWM should be 500 (max_wm_delta).
- //
- // That done, we still we have to account for the cases where HWM<500 thus
- // driving LWM to negative numbers. Let's make LWM 1/2 of HWM in such cases.
-
- if (hwm_ > max_wm_delta * 2)
- return hwm_ - max_wm_delta;
- else
- return (hwm_ + 1) / 2;
+ // First compute the low water mark. Following point should be taken
+ // into consideration:
+ //
+ // 1. LWM has to be less than HWM.
+ // 2. LWM cannot be set to very low value (such as zero) as after filling
+ // the queue it would start to refill only after all the messages are
+ // read from it and thus unnecessarily hold the progress back.
+ // 3. LWM cannot be set to very high value (such as HWM-1) as it would
+ // result in lock-step filling of the queue - if a single message is
+ // read from a full queue, writer thread is resumed to write exactly one
+ // message to the queue and go back to sleep immediately. This would
+ // result in low performance.
+ //
+ // Given the 3. it would be good to keep HWM and LWM as far apart as
+ // possible to reduce the thread switching overhead to almost zero,
+ // say HWM-LWM should be max_wm_delta.
+ //
+ // That done, we still we have to account for the cases where
+ // HWM < max_wm_delta thus driving LWM to negative numbers.
+ // Let's make LWM 1/2 of HWM in such cases.
+ uint64_t lwm = (hwm_ > max_wm_delta * 2) ?
+ hwm_ - max_wm_delta : (hwm_ + 1) / 2;
+
+ // Create all three objects pipe consists of: the pipe per se, reader and
+ // writer. The pipe will be handled by reader and writer, its never passed
+ // to the user. Reader and writer are returned to the user.
+ pipe_t *pipe = new (std::nothrow) pipe_t ();
+ alloc_assert (pipe);
+ *reader_ = new (std::nothrow) reader_t (reader_parent_, pipe, lwm);
+ alloc_assert (*reader_);
+ *writer_ = new (std::nothrow) writer_t (writer_parent_, pipe, *reader_,
+ hwm_, swap_size_);
+ alloc_assert (*writer_);
}
-
diff --git a/src/pipe.hpp b/src/pipe.hpp
index ece678a..b4a0ffa 100644
--- a/src/pipe.hpp
+++ b/src/pipe.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,25 +24,48 @@
#include "../include/zmq.h"
#include "stdint.hpp"
-#include "i_endpoint.hpp"
-#include "yarray_item.hpp"
+#include "array.hpp"
#include "ypipe.hpp"
-#include "msg_store.hpp"
+#include "swap.hpp"
#include "config.hpp"
#include "object.hpp"
namespace zmq
{
- class reader_t : public object_t, public yarray_item_t
+ // Creates a pipe. Returns pointer to reader and writer objects.
+ void create_pipe (object_t *reader_parent_, object_t *writer_parent_,
+ uint64_t hwm_, int64_t swap_size_, class reader_t **reader_,
+ class writer_t **writer_);
+
+ // The shutdown mechanism for pipe works as follows: Either endpoint
+ // (or even both of them) can ask pipe to terminate by calling 'terminate'
+ // method. Pipe then terminates in asynchronous manner. When the part of
+ // the shutdown tied to the endpoint is done it triggers 'terminated'
+ // event. When endpoint processes the event and returns, associated
+ // reader/writer object is deallocated.
+
+ typedef ypipe_t <zmq_msg_t, message_pipe_granularity> pipe_t;
+
+ struct i_reader_events
{
- public:
+ virtual ~i_reader_events () {}
- reader_t (class object_t *parent_, uint64_t lwm_);
- ~reader_t ();
+ virtual void terminated (class reader_t *pipe_) = 0;
+ virtual void activated (class reader_t *pipe_) = 0;
+ virtual void delimited (class reader_t *pipe_) = 0;
+ };
+
+ class reader_t : public object_t, public array_item_t
+ {
+ friend void create_pipe (object_t*, object_t*, uint64_t,
+ int64_t, reader_t**, writer_t**);
+ friend class writer_t;
+
+ public:
- void set_pipe (class pipe_t *pipe_);
- void set_endpoint (i_endpoint *endpoint_);
+ // Specifies the object to get events from the reader.
+ void set_event_sink (i_reader_events *endpoint_);
// Returns true if there is at least one message to read in the pipe.
bool check_read ();
@@ -50,22 +74,31 @@ namespace zmq
bool read (zmq_msg_t *msg_);
// Ask pipe to terminate.
- void term ();
+ void terminate ();
private:
+ reader_t (class object_t *parent_, pipe_t *pipe_, uint64_t lwm_);
+ ~reader_t ();
+
+ // To be called only by writer itself!
+ void set_writer (class writer_t *writer_);
+
// Command handlers.
- void process_revive ();
+ void process_activate_reader ();
void process_pipe_term_ack ();
// Returns true if the message is delimiter; false otherwise.
static bool is_delimiter (zmq_msg_t &msg_);
+ // True, if pipe can be read from.
+ bool active;
+
// The underlying pipe.
- class pipe_t *pipe;
+ pipe_t *pipe;
// Pipe writer associated with the other side of the pipe.
- class writer_t *peer;
+ class writer_t *writer;
// Low watermark for in-memory storage (in bytes).
uint64_t lwm;
@@ -73,27 +106,39 @@ namespace zmq
// Number of messages read so far.
uint64_t msgs_read;
- // Endpoint (either session or socket) the pipe is attached to.
- i_endpoint *endpoint;
+ // Sink for the events (either the socket of the session).
+ i_reader_events *sink;
+
+ // True is 'terminate' method was called or delimiter
+ // was read from the pipe.
+ bool terminating;
reader_t (const reader_t&);
- void operator = (const reader_t&);
+ const reader_t &operator = (const reader_t&);
};
- class writer_t : public object_t, public yarray_item_t
+ struct i_writer_events
{
- public:
+ virtual ~i_writer_events () {}
- writer_t (class object_t *parent_, uint64_t hwm_, int64_t swap_size_);
- ~writer_t ();
+ virtual void terminated (class writer_t *pipe_) = 0;
+ virtual void activated (class writer_t *pipe_) = 0;
+ };
- void set_pipe (class pipe_t *pipe_);
- void set_endpoint (i_endpoint *endpoint_);
+ class writer_t : public object_t, public array_item_t
+ {
+ friend void create_pipe (object_t*, object_t*, uint64_t,
+ int64_t, reader_t**, writer_t**);
+
+ public:
- // Checks whether a message can be written to the pipe.
- // If writing the message would cause high watermark to be
- // exceeded, the function returns false.
- bool check_write ();
+ // Specifies the object to get events from the writer.
+ void set_event_sink (i_writer_events *endpoint_);
+
+ // Checks whether messages can be written to the pipe.
+ // If writing the message would cause high watermark and (optionally)
+ // if the swap is full, the function returns false.
+ bool check_write (zmq_msg_t *msg_);
// Writes a message to the underlying pipe. Returns false if the
// message cannot be written because high watermark was reached.
@@ -106,27 +151,31 @@ namespace zmq
void flush ();
// Ask pipe to terminate.
- void term ();
+ void terminate ();
private:
- void process_reader_info (uint64_t msgs_read_);
+ writer_t (class object_t *parent_, pipe_t *pipe_, reader_t *reader_,
+ uint64_t hwm_, int64_t swap_size_);
+ ~writer_t ();
// Command handlers.
+ void process_activate_writer (uint64_t msgs_read_);
void process_pipe_term ();
- // Tests whether the pipe is already full.
+ // Tests whether underlying pipe is already full. The swap is not
+ // taken into account.
bool pipe_full ();
- // Write special message to the pipe so that the reader
- // can find out we are finished.
- void write_delimiter ();
+ // True, if this object can be written to. Undelying ypipe may be full
+ // but as long as there's swap space available, this flag is true.
+ bool active;
// The underlying pipe.
- class pipe_t *pipe;
+ pipe_t *pipe;
// Pipe reader associated with the other side of the pipe.
- class reader_t *peer;
+ reader_t *reader;
// High watermark for in-memory storage (in bytes).
uint64_t hwm;
@@ -138,44 +187,26 @@ namespace zmq
// Number of messages we have written so far.
uint64_t msgs_written;
- // Pointer to backing store. If NULL, messages are always
+ // Pointer to the message swap. If NULL, messages are always
// kept in main memory.
- msg_store_t *msg_store;
-
- bool extra_msg_flag;
+ swap_t *swap;
- zmq_msg_t extra_msg;
+ // Sink for the events (either the socket or the session).
+ i_writer_events *sink;
- // True iff the last attempt to write a message has failed.
- bool stalled;
+ // If true, swap is active. New messages are to be written to the swap.
+ bool swapping;
- bool pending_close;
+ // If true, there's a delimiter to be written to the pipe after the
+ // swap is empied.
+ bool pending_delimiter;
- // Endpoint (either session or socket) the pipe is attached to.
- i_endpoint *endpoint;
+ // True is 'terminate' method was called of 'pipe_term' command
+ // arrived from the reader.
+ bool terminating;
writer_t (const writer_t&);
- void operator = (const writer_t&);
- };
-
- // Message pipe.
- class pipe_t : public ypipe_t <zmq_msg_t, message_pipe_granularity>
- {
- public:
-
- pipe_t (object_t *reader_parent_, object_t *writer_parent_,
- uint64_t hwm_, int64_t swap_size_);
- ~pipe_t ();
-
- reader_t reader;
- writer_t writer;
-
- private:
-
- uint64_t compute_lwm (uint64_t hwm_);
-
- pipe_t (const pipe_t&);
- void operator = (const pipe_t&);
+ const writer_t &operator = (const writer_t&);
};
}
diff --git a/src/platform.hpp.in b/src/platform.hpp.in
index 1f47133..09943ee 100644
--- a/src/platform.hpp.in
+++ b/src/platform.hpp.in
@@ -1,11 +1,17 @@
/* src/platform.hpp.in. Generated from configure.in by autoheader. */
+/* Define to 1 if you have the <alloca.h> header file. */
+#undef HAVE_ALLOCA_H
+
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define to 1 if you have the `epoll_create' function. */
+#undef HAVE_EPOLL_CREATE
+
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
@@ -15,6 +21,15 @@
/* Define to 1 if you have the `getifaddrs' function. */
#undef HAVE_GETIFADDRS
+/* Define to 1 if you have the `getopt' function. */
+#undef HAVE_GETOPT
+
+/* Define to 1 if you have the `getprotobyname_r' function. */
+#undef HAVE_GETPROTOBYNAME_R
+
+/* Define to 1 if you have the `getprotobyname_r2' function. */
+#undef HAVE_GETPROTOBYNAME_R2
+
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
@@ -69,6 +84,12 @@
/* Define to 1 if you have the `perror' function. */
#undef HAVE_PERROR
+/* Define to 1 if you have the `poll' function. */
+#undef HAVE_POLL
+
+/* Define to 1 if you have the `pselect' function. */
+#undef HAVE_PSELECT
+
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
@@ -105,6 +126,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
diff --git a/src/poll.cpp b/src/poll.cpp
index 1b203db..6a84d2e 100644
--- a/src/poll.cpp
+++ b/src/poll.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,7 +28,6 @@
#include <sys/types.h>
#include <sys/time.h>
-#include <sys/resource.h>
#include <poll.h>
#include <algorithm>
@@ -40,27 +40,25 @@ zmq::poll_t::poll_t () :
retired (false),
stopping (false)
{
- // Get the limit on open file descriptors. Resize fds so that it
- // can hold all descriptors.
- rlimit rl;
- int rc = getrlimit (RLIMIT_NOFILE, &rl);
- errno_assert (rc != -1);
- fd_table.resize (rl.rlim_cur);
-
- for (rlim_t i = 0; i < rl.rlim_cur; i ++)
- fd_table [i].index = retired_fd;
}
zmq::poll_t::~poll_t ()
{
worker.stop ();
-
- // Make sure there are no fds registered on shutdown.
- zmq_assert (load.get () == 0);
}
zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_)
{
+ // If the file descriptor table is too small expand it.
+ fd_table_t::size_type sz = fd_table.size ();
+ if (sz <= (fd_table_t::size_type) fd_) {
+ fd_table.resize (fd_ + 1);
+ while (sz != (fd_table_t::size_type) (fd_ + 1)) {
+ fd_table [sz].index = retired_fd;
+ ++sz;
+ }
+ }
+
pollfd pfd = {fd_, 0, 0};
pollset.push_back (pfd);
assert (fd_table [fd_].index == retired_fd);
@@ -69,7 +67,7 @@ zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_)
fd_table [fd_].events = events_;
// Increase the load metric of the thread.
- load.add (1);
+ adjust_load (1);
return fd_;
}
@@ -85,7 +83,7 @@ void zmq::poll_t::rm_fd (handle_t handle_)
retired = true;
// Decrease the load metric of the thread.
- load.sub (1);
+ adjust_load (-1);
}
void zmq::poll_t::set_pollin (handle_t handle_)
@@ -112,23 +110,6 @@ void zmq::poll_t::reset_pollout (handle_t handle_)
pollset [index].events &= ~((short) POLLOUT);
}
-void zmq::poll_t::add_timer (i_poll_events *events_)
-{
- timers.push_back (events_);
-}
-
-void zmq::poll_t::cancel_timer (i_poll_events *events_)
-{
- timers_t::iterator it = std::find (timers.begin (), timers.end (), events_);
- if (it != timers.end ())
- timers.erase (it);
-}
-
-int zmq::poll_t::get_load ()
-{
- return load.get ();
-}
-
void zmq::poll_t::start ()
{
worker.start (worker_routine, this);
@@ -143,27 +124,20 @@ void zmq::poll_t::loop ()
{
while (!stopping) {
+ // Execute any due timers.
+ int timeout = (int) execute_timers ();
+
// Wait for events.
- int rc = poll (&pollset [0], pollset.size (),
- timers.empty () ? -1 : max_timer_period);
+ int rc = poll (&pollset [0], pollset.size (), timeout ? timeout : -1);
if (rc == -1 && errno == EINTR)
continue;
errno_assert (rc != -1);
- // Handle timer.
- if (!rc) {
-
- // Use local list of timers as timer handlers may fill new timers
- // into the original array.
- timers_t t;
- std::swap (timers, t);
-
- // Trigger all the timers.
- for (timers_t::iterator it = t.begin (); it != t.end (); it ++)
- (*it)->timer_event ();
+ // If there are no events (i.e. it's a timeout) there's no point
+ // in checking the pollset.
+ if (rc == 0)
continue;
- }
for (pollset_t::size_type i = 0; i != pollset.size (); i++) {
diff --git a/src/poll.hpp b/src/poll.hpp
index f4ae35a..3a18d03 100644
--- a/src/poll.hpp
+++ b/src/poll.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -34,7 +35,7 @@
#include "fd.hpp"
#include "thread.hpp"
-#include "atomic_counter.hpp"
+#include "poller_base.hpp"
namespace zmq
{
@@ -42,7 +43,7 @@ namespace zmq
// Implements socket polling mechanism using the POSIX.1-2001
// poll() system call.
- class poll_t
+ class poll_t : public poller_base_t
{
public:
@@ -58,9 +59,6 @@ namespace zmq
void reset_pollin (handle_t handle_);
void set_pollout (handle_t handle_);
void reset_pollout (handle_t handle_);
- void add_timer (struct i_poll_events *events_);
- void cancel_timer (struct i_poll_events *events_);
- int get_load ();
void start ();
void stop ();
@@ -79,7 +77,8 @@ namespace zmq
};
// This table stores data for registered descriptors.
- std::vector <fd_entry_t> fd_table;
+ typedef std::vector <fd_entry_t> fd_table_t;
+ fd_table_t fd_table;
// Pollset to pass to the poll function.
typedef std::vector <pollfd> pollset_t;
@@ -88,22 +87,14 @@ namespace zmq
// If true, there's at least one retired event source.
bool retired;
- // List of all the engines waiting for the timer event.
- typedef std::vector <struct i_poll_events*> timers_t;
- timers_t timers;
-
// If true, thread is in the process of shutting down.
bool stopping;
// Handle of the physical thread doing the I/O work.
thread_t worker;
- // Load of the poller. Currently number of file descriptors
- // registered with the poller.
- atomic_counter_t load;
-
poll_t (const poll_t&);
- void operator = (const poll_t&);
+ const poll_t &operator = (const poll_t&);
};
}
diff --git a/src/poller.hpp b/src/poller.hpp
index 3c29603..10fafb9 100644
--- a/src/poller.hpp
+++ b/src/poller.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/poller_base.cpp b/src/poller_base.cpp
new file mode 100644
index 0000000..d5fb985
--- /dev/null
+++ b/src/poller_base.cpp
@@ -0,0 +1,99 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "poller_base.hpp"
+#include "i_poll_events.hpp"
+#include "err.hpp"
+
+zmq::poller_base_t::poller_base_t ()
+{
+}
+
+zmq::poller_base_t::~poller_base_t ()
+{
+ // Make sure there is no more load on the shutdown.
+ zmq_assert (get_load () == 0);
+}
+
+int zmq::poller_base_t::get_load ()
+{
+ return load.get ();
+}
+
+void zmq::poller_base_t::adjust_load (int amount_)
+{
+ if (amount_ > 0)
+ load.add (amount_);
+ else if (amount_ < 0)
+ load.sub (-amount_);
+}
+
+void zmq::poller_base_t::add_timer (int timeout_, i_poll_events *sink_, int id_)
+{
+ uint64_t expiration = clock.now_ms () + timeout_;
+ timer_info_t info = {sink_, id_};
+ timers.insert (timers_t::value_type (expiration, info));
+}
+
+void zmq::poller_base_t::cancel_timer (i_poll_events *sink_, int id_)
+{
+ // Complexity of this operation is O(n). We assume it is rarely used.
+ for (timers_t::iterator it = timers.begin (); it != timers.end (); ++it)
+ if (it->second.sink == sink_ && it->second.id == id_) {
+ timers.erase (it);
+ return;
+ }
+
+ // Timer not found.
+ zmq_assert (false);
+}
+
+uint64_t zmq::poller_base_t::execute_timers ()
+{
+ // Fast track.
+ if (timers.empty ())
+ return 0;
+
+ // Get the current time.
+ uint64_t current = clock.now_ms ();
+
+ // Execute the timers that are already due.
+ timers_t::iterator it = timers.begin ();
+ while (it != timers.end ()) {
+
+ // If we have to wait to execute the item, same will be true about
+ // all the following items (multimap is sorted). Thus we can stop
+ // checking the subsequent timers and return the time to wait for
+ // the next timer (at least 1ms).
+ if (it->first > current)
+ return it->first - current;
+
+ // Trigger the timer.
+ it->second.sink->timer_event (it->second.id);
+
+ // Remove it from the list of active timers.
+ timers_t::iterator o = it;
+ ++it;
+ timers.erase (o);
+ }
+
+ // There are no more timers.
+ return 0;
+}
diff --git a/src/poller_base.hpp b/src/poller_base.hpp
new file mode 100644
index 0000000..44fe9f1
--- /dev/null
+++ b/src/poller_base.hpp
@@ -0,0 +1,84 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_POLLER_BASE_HPP_INCLUDED__
+#define __ZMQ_POLLER_BASE_HPP_INCLUDED__
+
+#include <map>
+
+#include "clock.hpp"
+#include "atomic_counter.hpp"
+
+namespace zmq
+{
+
+ class poller_base_t
+ {
+ public:
+
+ poller_base_t ();
+ virtual ~poller_base_t ();
+
+ // Returns load of the poller. Note that this function can be
+ // invoked from a different thread!
+ int get_load ();
+
+ // Add a timeout to expire in timeout_ milliseconds. After the
+ // expiration timer_event on sink_ object will be called with
+ // argument set to id_.
+ void add_timer (int timeout_, struct i_poll_events *sink_, int id_);
+
+ // Cancel the timer created by sink_ object with ID equal to id_.
+ void cancel_timer (struct i_poll_events *sink_, int id_);
+
+ protected:
+
+ // Called by individual poller implementations to manage the load.
+ void adjust_load (int amount_);
+
+ // Executes any timers that are due. Returns number of milliseconds
+ // to wait to match the next timer or 0 meaning "no timers".
+ uint64_t execute_timers ();
+
+ private:
+
+ // Clock instance private to this I/O thread.
+ clock_t clock;
+
+ // List of active timers.
+ struct timer_info_t
+ {
+ struct i_poll_events *sink;
+ int id;
+ };
+ typedef std::multimap <uint64_t, timer_info_t> timers_t;
+ timers_t timers;
+
+ // Load of the poller. Currently the number of file descriptors
+ // registered.
+ atomic_counter_t load;
+
+ poller_base_t (const poller_base_t&);
+ const poller_base_t &operator = (const poller_base_t&);
+ };
+
+}
+
+#endif
diff --git a/src/pub.cpp b/src/pub.cpp
index 4e73b19..74f07fc 100644
--- a/src/pub.cpp
+++ b/src/pub.cpp
@@ -1,177 +1,31 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "../include/zmq.h"
-
#include "pub.hpp"
-#include "err.hpp"
-#include "msg_content.hpp"
-#include "pipe.hpp"
-zmq::pub_t::pub_t (class app_thread_t *parent_) :
- socket_base_t (parent_),
- active (0)
+zmq::pub_t::pub_t (class ctx_t *parent_, uint32_t tid_) :
+ xpub_t (parent_, tid_)
{
- options.requires_in = false;
- options.requires_out = true;
+ options.type = ZMQ_PUB;
}
zmq::pub_t::~pub_t ()
{
- for (pipes_t::size_type i = 0; i != pipes.size (); i++)
- pipes [i]->term ();
- pipes.clear ();
-}
-
-void zmq::pub_t::xattach_pipes (class reader_t *inpipe_,
- class writer_t *outpipe_, const blob_t &peer_identity_)
-{
- zmq_assert (!inpipe_);
- pipes.push_back (outpipe_);
- pipes.swap (active, pipes.size () - 1);
- active++;
-}
-
-void zmq::pub_t::xdetach_inpipe (class reader_t *pipe_)
-{
- zmq_assert (false);
-}
-
-void zmq::pub_t::xdetach_outpipe (class writer_t *pipe_)
-{
- // Remove the pipe from the list; adjust number of active pipes
- // accordingly.
- if (pipes.index (pipe_) < active)
- active--;
- pipes.erase (pipe_);
}
-
-void zmq::pub_t::xkill (class reader_t *pipe_)
-{
- zmq_assert (false);
-}
-
-void zmq::pub_t::xrevive (class reader_t *pipe_)
-{
- zmq_assert (false);
-}
-
-void zmq::pub_t::xrevive (class writer_t *pipe_)
-{
- // Move the pipe to the list of active pipes.
- pipes.swap (pipes.index (pipe_), active);
- active++;
-}
-
-int zmq::pub_t::xsetsockopt (int option_, const void *optval_,
- size_t optvallen_)
-{
- errno = EINVAL;
- return -1;
-}
-
-int zmq::pub_t::xsend (zmq_msg_t *msg_, int flags_)
-{
- // If there are no active pipes available, simply drop the message.
- if (active == 0) {
- int rc = zmq_msg_close (msg_);
- zmq_assert (rc == 0);
- rc = zmq_msg_init (msg_);
- zmq_assert (rc == 0);
- return 0;
- }
-
- msg_content_t *content = (msg_content_t*) msg_->content;
-
- // For VSMs the copying is straighforward.
- if (content == (msg_content_t*) ZMQ_VSM) {
- for (pipes_t::size_type i = 0; i != active;)
- if (write (pipes [i], msg_))
- i++;
- int rc = zmq_msg_init (msg_);
- zmq_assert (rc == 0);
- return 0;
- }
-
- // Optimisation for the case when there's only a single pipe
- // to send the message to - no refcount adjustment i.e. no atomic
- // operations are needed.
- if (active == 1) {
- if (!write (pipes [0], msg_)) {
- int rc = zmq_msg_close (msg_);
- zmq_assert (rc == 0);
- }
- int rc = zmq_msg_init (msg_);
- zmq_assert (rc == 0);
- return 0;
- }
-
- // There are at least 2 destinations for the message. That means we have
- // to deal with reference counting. First add N-1 references to
- // the content (we are holding one reference anyway, that's why -1).
- if (msg_->flags & ZMQ_MSG_SHARED)
- content->refcnt.add (active - 1);
- else {
- content->refcnt.set (active);
- msg_->flags |= ZMQ_MSG_SHARED;
- }
-
- // Push the message to all destinations.
- for (pipes_t::size_type i = 0; i != active;) {
- if (!write (pipes [i], msg_))
- content->refcnt.sub (1);
- else
- i++;
- }
-
- // Detach the original message from the data buffer.
- int rc = zmq_msg_init (msg_);
- zmq_assert (rc == 0);
-
- return 0;
-}
-
-int zmq::pub_t::xrecv (zmq_msg_t *msg_, int flags_)
-{
- errno = ENOTSUP;
- return -1;
-}
-
-bool zmq::pub_t::xhas_in ()
-{
- return false;
-}
-
-bool zmq::pub_t::xhas_out ()
-{
- return true;
-}
-
-bool zmq::pub_t::write (class writer_t *pipe_, zmq_msg_t *msg_)
-{
- if (!pipe_->write (msg_)) {
- active--;
- pipes.swap (pipes.index (pipe_), active);
- return false;
- }
- if (!(msg_->flags & ZMQ_MSG_MORE))
- pipe_->flush ();
- return true;
-}
-
diff --git a/src/pub.hpp b/src/pub.hpp
index ac3924a..e69af3c 100644
--- a/src/pub.hpp
+++ b/src/pub.hpp
@@ -1,68 +1,42 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_PUB_HPP_INCLUDED__
#define __ZMQ_PUB_HPP_INCLUDED__
-#include "socket_base.hpp"
-#include "yarray.hpp"
+#include "xpub.hpp"
namespace zmq
{
- class pub_t : public socket_base_t
+ class pub_t : public xpub_t
{
public:
- pub_t (class app_thread_t *parent_);
+ pub_t (class ctx_t *parent_, uint32_t tid_);
~pub_t ();
- // Overloads of functions from socket_base_t.
- void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
- const blob_t &peer_identity_);
- void xdetach_inpipe (class reader_t *pipe_);
- void xdetach_outpipe (class writer_t *pipe_);
- void xkill (class reader_t *pipe_);
- void xrevive (class reader_t *pipe_);
- void xrevive (class writer_t *pipe_);
- int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
- int xsend (zmq_msg_t *msg_, int flags_);
- int xrecv (zmq_msg_t *msg_, int flags_);
- bool xhas_in ();
- bool xhas_out ();
-
private:
- // Write the message to the pipe. Make the pipe inactive if writing
- // fails. In such a case false is returned.
- bool write (class writer_t *pipe_, zmq_msg_t *msg_);
-
- // Outbound pipes, i.e. those the socket is sending messages to.
- typedef yarray_t <class writer_t> pipes_t;
- pipes_t pipes;
-
- // Number of active pipes. All the active pipes are located at the
- // beginning of the pipes array.
- pipes_t::size_type active;
-
pub_t (const pub_t&);
- void operator = (const pub_t&);
+ const pub_t &operator = (const pub_t&);
};
}
diff --git a/src/pull.cpp b/src/pull.cpp
index b2413ee..a8c2466 100644
--- a/src/pull.cpp
+++ b/src/pull.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,9 +23,11 @@
#include "pull.hpp"
#include "err.hpp"
-zmq::pull_t::pull_t (class app_thread_t *parent_) :
- socket_base_t (parent_)
+zmq::pull_t::pull_t (class ctx_t *parent_, uint32_t tid_) :
+ socket_base_t (parent_, tid_),
+ fq (this)
{
+ options.type = ZMQ_PULL;
options.requires_in = true;
options.requires_out = false;
}
@@ -40,45 +43,10 @@ void zmq::pull_t::xattach_pipes (class reader_t *inpipe_,
fq.attach (inpipe_);
}
-void zmq::pull_t::xdetach_inpipe (class reader_t *pipe_)
+void zmq::pull_t::process_term (int linger_)
{
- zmq_assert (pipe_);
- fq.detach (pipe_);
-}
-
-void zmq::pull_t::xdetach_outpipe (class writer_t *pipe_)
-{
- // There are no outpipes, so this function shouldn't be called at all.
- zmq_assert (false);
-}
-
-void zmq::pull_t::xkill (class reader_t *pipe_)
-{
- fq.kill (pipe_);
-}
-
-void zmq::pull_t::xrevive (class reader_t *pipe_)
-{
- fq.revive (pipe_);
-}
-
-void zmq::pull_t::xrevive (class writer_t *pipe_)
-{
- zmq_assert (false);
-}
-
-int zmq::pull_t::xsetsockopt (int option_, const void *optval_,
- size_t optvallen_)
-{
- // No special options for this socket type.
- errno = EINVAL;
- return -1;
-}
-
-int zmq::pull_t::xsend (zmq_msg_t *msg_, int flags_)
-{
- errno = ENOTSUP;
- return -1;
+ fq.terminate ();
+ socket_base_t::process_term (linger_);
}
int zmq::pull_t::xrecv (zmq_msg_t *msg_, int flags_)
@@ -91,8 +59,3 @@ bool zmq::pull_t::xhas_in ()
return fq.has_in ();
}
-bool zmq::pull_t::xhas_out ()
-{
- return false;
-}
-
diff --git a/src/pull.hpp b/src/pull.hpp
index 7f249e9..95084ba 100644
--- a/src/pull.hpp
+++ b/src/pull.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -30,30 +31,27 @@ namespace zmq
{
public:
- pull_t (class app_thread_t *parent_);
+ pull_t (class ctx_t *parent_, uint32_t tid_);
~pull_t ();
+ protected:
+
// Overloads of functions from socket_base_t.
void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
const blob_t &peer_identity_);
- void xdetach_inpipe (class reader_t *pipe_);
- void xdetach_outpipe (class writer_t *pipe_);
- void xkill (class reader_t *pipe_);
- void xrevive (class reader_t *pipe_);
- void xrevive (class writer_t *pipe_);
- int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
- int xsend (zmq_msg_t *msg_, int flags_);
int xrecv (zmq_msg_t *msg_, int flags_);
bool xhas_in ();
- bool xhas_out ();
private:
+ // Hook into the termination process.
+ void process_term (int linger_);
+
// Fair queueing object for inbound pipes.
fq_t fq;
pull_t (const pull_t&);
- void operator = (const pull_t&);
+ const pull_t &operator = (const pull_t&);
};
diff --git a/src/push.cpp b/src/push.cpp
index 522101f..072994f 100644
--- a/src/push.cpp
+++ b/src/push.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,9 +24,11 @@
#include "err.hpp"
#include "pipe.hpp"
-zmq::push_t::push_t (class app_thread_t *parent_) :
- socket_base_t (parent_)
+zmq::push_t::push_t (class ctx_t *parent_, uint32_t tid_) :
+ socket_base_t (parent_, tid_),
+ lb (this)
{
+ options.type = ZMQ_PUSH;
options.requires_in = false;
options.requires_out = true;
}
@@ -41,41 +44,10 @@ void zmq::push_t::xattach_pipes (class reader_t *inpipe_,
lb.attach (outpipe_);
}
-void zmq::push_t::xdetach_inpipe (class reader_t *pipe_)
+void zmq::push_t::process_term (int linger_)
{
- // There are no inpipes, so this function shouldn't be called at all.
- zmq_assert (false);
-}
-
-void zmq::push_t::xdetach_outpipe (class writer_t *pipe_)
-{
- zmq_assert (pipe_);
- lb.detach (pipe_);
-}
-
-void zmq::push_t::xkill (class reader_t *pipe_)
-{
- // There are no inpipes, so this function shouldn't be called at all.
- zmq_assert (false);
-}
-
-void zmq::push_t::xrevive (class reader_t *pipe_)
-{
- // There are no inpipes, so this function shouldn't be called at all.
- zmq_assert (false);
-}
-
-void zmq::push_t::xrevive (class writer_t *pipe_)
-{
- lb.revive (pipe_);
-}
-
-int zmq::push_t::xsetsockopt (int option_, const void *optval_,
- size_t optvallen_)
-{
- // No special option for this socket type.
- errno = EINVAL;
- return -1;
+ lb.terminate ();
+ socket_base_t::process_term (linger_);
}
int zmq::push_t::xsend (zmq_msg_t *msg_, int flags_)
@@ -83,17 +55,6 @@ int zmq::push_t::xsend (zmq_msg_t *msg_, int flags_)
return lb.send (msg_, flags_);
}
-int zmq::push_t::xrecv (zmq_msg_t *msg_, int flags_)
-{
- errno = ENOTSUP;
- return -1;
-}
-
-bool zmq::push_t::xhas_in ()
-{
- return false;
-}
-
bool zmq::push_t::xhas_out ()
{
return lb.has_out ();
diff --git a/src/push.hpp b/src/push.hpp
index b3c8d87..f04b25f 100644
--- a/src/push.hpp
+++ b/src/push.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -30,30 +31,27 @@ namespace zmq
{
public:
- push_t (class app_thread_t *parent_);
+ push_t (class ctx_t *parent_, uint32_t tid_);
~push_t ();
+ protected:
+
// Overloads of functions from socket_base_t.
void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
const blob_t &peer_identity_);
- void xdetach_inpipe (class reader_t *pipe_);
- void xdetach_outpipe (class writer_t *pipe_);
- void xkill (class reader_t *pipe_);
- void xrevive (class reader_t *pipe_);
- void xrevive (class writer_t *pipe_);
- int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
int xsend (zmq_msg_t *msg_, int flags_);
- int xrecv (zmq_msg_t *msg_, int flags_);
- bool xhas_in ();
bool xhas_out ();
private:
+ // Hook into the termination process.
+ void process_term (int linger_);
+
// Load balancer managing the outbound pipes.
lb_t lb;
push_t (const push_t&);
- void operator = (const push_t&);
+ const push_t &operator = (const push_t&);
};
}
diff --git a/src/reaper.cpp b/src/reaper.cpp
new file mode 100644
index 0000000..d3ebbba
--- /dev/null
+++ b/src/reaper.cpp
@@ -0,0 +1,121 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "reaper.hpp"
+#include "socket_base.hpp"
+#include "err.hpp"
+
+zmq::reaper_t::reaper_t (class ctx_t *ctx_, uint32_t tid_) :
+ object_t (ctx_, tid_),
+ sockets (0),
+ terminating (false)
+{
+ poller = new (std::nothrow) poller_t;
+ alloc_assert (poller);
+
+ mailbox_handle = poller->add_fd (mailbox.get_fd (), this);
+ poller->set_pollin (mailbox_handle);
+}
+
+zmq::reaper_t::~reaper_t ()
+{
+ delete poller;
+}
+
+zmq::mailbox_t *zmq::reaper_t::get_mailbox ()
+{
+ return &mailbox;
+}
+
+void zmq::reaper_t::start ()
+{
+ // Start the thread.
+ poller->start ();
+}
+
+void zmq::reaper_t::stop ()
+{
+ send_stop ();
+}
+
+void zmq::reaper_t::in_event ()
+{
+ while (true) {
+
+ // Get the next command. If there is none, exit.
+ command_t cmd;
+ int rc = mailbox.recv (&cmd, false);
+ if (rc != 0 && errno == EINTR)
+ continue;
+ if (rc != 0 && errno == EAGAIN)
+ break;
+ errno_assert (rc == 0);
+
+ // Process the command.
+ cmd.destination->process_command (cmd);
+ }
+}
+
+void zmq::reaper_t::out_event ()
+{
+ zmq_assert (false);
+}
+
+void zmq::reaper_t::timer_event (int id_)
+{
+ zmq_assert (false);
+}
+
+void zmq::reaper_t::process_stop ()
+{
+ terminating = true;
+
+ // If there are no sockets beig reaped finish immediately.
+ if (!sockets) {
+ send_done ();
+ poller->rm_fd (mailbox_handle);
+ poller->stop ();
+ }
+}
+
+void zmq::reaper_t::process_reap (socket_base_t *socket_)
+{
+ // Add the socket to the poller.
+ socket_->start_reaping (poller);
+
+ // Start termination of associated I/O object hierarchy.
+ socket_->terminate ();
+ socket_->check_destroy ();
+
+ ++sockets;
+}
+
+void zmq::reaper_t::process_reaped ()
+{
+ --sockets;
+
+ // If reaped was already asked to terminate and there are no more sockets,
+ // finish immediately.
+ if (!sockets && terminating) {
+ send_done ();
+ poller->rm_fd (mailbox_handle);
+ poller->stop ();
+ }
+}
diff --git a/src/reaper.hpp b/src/reaper.hpp
new file mode 100644
index 0000000..edcc319
--- /dev/null
+++ b/src/reaper.hpp
@@ -0,0 +1,77 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_REAPER_HPP_INCLUDED__
+#define __ZMQ_REAPER_HPP_INCLUDED__
+
+#include "object.hpp"
+#include "mailbox.hpp"
+#include "poller.hpp"
+#include "i_poll_events.hpp"
+
+namespace zmq
+{
+
+ class reaper_t : public object_t, public i_poll_events
+ {
+ public:
+
+ reaper_t (class ctx_t *ctx_, uint32_t tid_);
+ ~reaper_t ();
+
+ mailbox_t *get_mailbox ();
+
+ void start ();
+ void stop ();
+
+ // i_poll_events implementation.
+ void in_event ();
+ void out_event ();
+ void timer_event (int id_);
+
+ private:
+
+ // Command handlers.
+ void process_stop ();
+ void process_reap (class socket_base_t *socket_);
+ void process_reaped ();
+
+ // Reaper thread accesses incoming commands via this mailbox.
+ mailbox_t mailbox;
+
+ // Handle associated with mailbox' file descriptor.
+ poller_t::handle_t mailbox_handle;
+
+ // I/O multiplexing is performed using a poller object.
+ poller_t *poller;
+
+ // Number of sockets being reaped at the moment.
+ int sockets;
+
+ // If true, we were already asked to terminate.
+ bool terminating;
+
+ reaper_t (const reaper_t&);
+ const reaper_t &operator = (const reaper_t&);
+ };
+
+}
+
+#endif
diff --git a/src/rep.cpp b/src/rep.cpp
index 34b77c4..46c35cb 100644
--- a/src/rep.cpp
+++ b/src/rep.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -21,160 +22,37 @@
#include "rep.hpp"
#include "err.hpp"
-#include "pipe.hpp"
-zmq::rep_t::rep_t (class app_thread_t *parent_) :
- socket_base_t (parent_),
- active (0),
- current (0),
+zmq::rep_t::rep_t (class ctx_t *parent_, uint32_t tid_) :
+ xrep_t (parent_, tid_),
sending_reply (false),
- more (false),
- reply_pipe (NULL)
+ request_begins (true)
{
- options.requires_in = true;
- options.requires_out = true;
-
- // We don't need immediate connect. We'll be able to send messages
- // (replies) only when connection is established and thus requests
- // can arrive anyway.
- options.immediate_connect = false;
+ options.type = ZMQ_REP;
}
zmq::rep_t::~rep_t ()
{
}
-void zmq::rep_t::xattach_pipes (class reader_t *inpipe_,
- class writer_t *outpipe_, const blob_t &peer_identity_)
-{
- zmq_assert (inpipe_ && outpipe_);
- zmq_assert (in_pipes.size () == out_pipes.size ());
-
- in_pipes.push_back (inpipe_);
- in_pipes.swap (active, in_pipes.size () - 1);
- out_pipes.push_back (outpipe_);
- out_pipes.swap (active, out_pipes.size () - 1);
- active++;
-}
-
-void zmq::rep_t::xdetach_inpipe (class reader_t *pipe_)
-{
- zmq_assert (sending_reply || !more || in_pipes [current] != pipe_);
-
- zmq_assert (pipe_);
- zmq_assert (in_pipes.size () == out_pipes.size ());
-
- in_pipes_t::size_type index = in_pipes.index (pipe_);
-
- if (index < active) {
- active--;
- if (current == active)
- current = 0;
- }
-
- if (out_pipes [index])
- out_pipes [index]->term ();
- in_pipes.erase (index);
- out_pipes.erase (index);
-}
-
-void zmq::rep_t::xdetach_outpipe (class writer_t *pipe_)
-{
- zmq_assert (pipe_);
- zmq_assert (in_pipes.size () == out_pipes.size ());
-
- out_pipes_t::size_type index = out_pipes.index (pipe_);
-
- // If the connection we've got the request from disconnects,
- // there's nowhere to send the reply. Forget about the reply pipe.
- // Once the reply is sent it will be dropped.
- if (sending_reply && pipe_ == reply_pipe)
- reply_pipe = NULL;
-
- if (out_pipes.index (pipe_) < active) {
- active--;
- if (current == active)
- current = 0;
- }
-
- if (in_pipes [index])
- in_pipes [index]->term ();
- in_pipes.erase (index);
- out_pipes.erase (index);
-}
-
-void zmq::rep_t::xkill (class reader_t *pipe_)
-{
- // Move the pipe to the list of inactive pipes.
- in_pipes_t::size_type index = in_pipes.index (pipe_);
- active--;
- in_pipes.swap (index, active);
- out_pipes.swap (index, active);
-}
-
-void zmq::rep_t::xrevive (class reader_t *pipe_)
-{
- // Move the pipe to the list of active pipes.
- in_pipes_t::size_type index = in_pipes.index (pipe_);
- in_pipes.swap (index, active);
- out_pipes.swap (index, active);
- active++;
-}
-
-void zmq::rep_t::xrevive (class writer_t *pipe_)
-{
-}
-
-int zmq::rep_t::xsetsockopt (int option_, const void *optval_,
- size_t optvallen_)
-{
- errno = EINVAL;
- return -1;
-}
-
int zmq::rep_t::xsend (zmq_msg_t *msg_, int flags_)
{
+ // If we are in the middle of receiving a request, we cannot send reply.
if (!sending_reply) {
errno = EFSM;
return -1;
}
- if (reply_pipe) {
+ bool more = (msg_->flags & ZMQ_MSG_MORE);
- // Push message to the reply pipe.
- bool written = reply_pipe->write (msg_);
- zmq_assert (!more || written);
+ // Push message to the reply pipe.
+ int rc = xrep_t::xsend (msg_, flags_);
+ if (rc != 0)
+ return rc;
- // The pipe is full...
- // When this happens, we simply return an error.
- // This makes REP sockets vulnerable to DoS attack when
- // misbehaving requesters stop collecting replies.
- // TODO: Tear down the underlying connection (?)
- if (!written) {
- errno = EAGAIN;
- return -1;
- }
-
- more = msg_->flags & ZMQ_MSG_MORE;
- }
- else {
-
- // If the requester have disconnected in the meantime, drop the reply.
- more = msg_->flags & ZMQ_MSG_MORE;
- zmq_msg_close (msg_);
- }
-
- // Flush the reply to the requester.
- if (!more) {
- if (reply_pipe)
- reply_pipe->flush ();
+ // If the reply is complete flip the FSM back to request receiving state.
+ if (!more)
sending_reply = false;
- reply_pipe = NULL;
- }
-
- // Detach the message from the data buffer.
- int rc = zmq_msg_init (msg_);
- zmq_assert (rc == 0);
return 0;
}
@@ -187,63 +65,44 @@ int zmq::rep_t::xrecv (zmq_msg_t *msg_, int flags_)
return -1;
}
- // Deallocate old content of the message.
- zmq_msg_close (msg_);
-
- // We haven't started reading a request yet...
- if (!more) {
+ if (request_begins) {
- // Round-robin over the pipes to get next message.
- int count;
- for (count = active; count != 0; count--) {
- if (in_pipes [current]->read (msg_))
- break;
- current++;
- if (current >= active)
- current = 0;
- }
+ // Copy the backtrace stack to the reply pipe.
+ bool bottom = false;
+ while (!bottom) {
- // No message is available. Initialise the output parameter
- // to be a 0-byte message.
- if (count == 0) {
- zmq_msg_init (msg_);
- errno = EAGAIN;
- return -1;
- }
+ // TODO: What if request can be read but reply pipe is not
+ // ready for writing?
- // We are aware of a new message now. Setup the reply pipe.
- reply_pipe = out_pipes [current];
+ // Get next part of the backtrace stack.
+ int rc = xrep_t::xrecv (msg_, flags_);
+ if (rc != 0)
+ return rc;
+ zmq_assert (msg_->flags & ZMQ_MSG_MORE);
- // Copy the routing info to the reply pipe.
- while (true) {
+ // Empty message part delimits the traceback stack.
+ bottom = (zmq_msg_size (msg_) == 0);
- // Push message to the reply pipe.
- // TODO: What if the pipe is full?
- // Tear down the underlying connection?
- bool written = reply_pipe->write (msg_);
- zmq_assert (written);
-
- // Message part of zero size delimits the traceback stack.
- if (zmq_msg_size (msg_) == 0)
- break;
-
- // Get next part of the message.
- bool fetched = in_pipes [current]->read (msg_);
- zmq_assert (fetched);
+ // Push it to the reply pipe.
+ rc = xrep_t::xsend (msg_, flags_);
+ zmq_assert (rc == 0);
}
+
+ request_begins = false;
}
- // Now the routing info is processed. Get the first part
+ // Now the routing info is safely stored. Get the first part
// of the message payload and exit.
- bool fetched = in_pipes [current]->read (msg_);
- zmq_assert (fetched);
- more = msg_->flags & ZMQ_MSG_MORE;
- if (!more) {
- current++;
- if (current >= active)
- current = 0;
+ int rc = xrep_t::xrecv (msg_, flags_);
+ if (rc != 0)
+ return rc;
+
+ // If whole request is read, flip the FSM to reply-sending state.
+ if (!(msg_->flags & ZMQ_MSG_MORE)) {
sending_reply = true;
+ request_begins = true;
}
+
return 0;
}
@@ -252,18 +111,7 @@ bool zmq::rep_t::xhas_in ()
if (sending_reply)
return false;
- if (more)
- return true;
-
- for (int count = active; count != 0; count--) {
- if (in_pipes [current]->check_read ())
- return !sending_reply;
- current++;
- if (current >= active)
- current = 0;
- }
-
- return false;
+ return xrep_t::xhas_in ();
}
bool zmq::rep_t::xhas_out ()
@@ -271,10 +119,6 @@ bool zmq::rep_t::xhas_out ()
if (!sending_reply)
return false;
- if (more)
- return true;
-
- // TODO: No check for write here...
- return sending_reply;
+ return xrep_t::xhas_out ();
}
diff --git a/src/rep.hpp b/src/rep.hpp
index aef4318..d0dd9c8 100644
--- a/src/rep.hpp
+++ b/src/rep.hpp
@@ -1,47 +1,39 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_REP_HPP_INCLUDED__
#define __ZMQ_REP_HPP_INCLUDED__
-#include "socket_base.hpp"
-#include "yarray.hpp"
+#include "xrep.hpp"
namespace zmq
{
- class rep_t : public socket_base_t
+ class rep_t : public xrep_t
{
public:
- rep_t (class app_thread_t *parent_);
+ rep_t (class ctx_t *parent_, uint32_t tid_);
~rep_t ();
// Overloads of functions from socket_base_t.
- void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
- const blob_t &peer_identity_);
- void xdetach_inpipe (class reader_t *pipe_);
- void xdetach_outpipe (class writer_t *pipe_);
- void xkill (class reader_t *pipe_);
- void xrevive (class reader_t *pipe_);
- void xrevive (class writer_t *pipe_);
- int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
int xsend (zmq_msg_t *msg_, int flags_);
int xrecv (zmq_msg_t *msg_, int flags_);
bool xhas_in ();
@@ -49,34 +41,16 @@ namespace zmq
private:
- // List in outbound and inbound pipes. Note that the two lists are
- // always in sync. I.e. outpipe with index N communicates with the
- // same session as inpipe with index N.
- typedef yarray_t <class writer_t> out_pipes_t;
- out_pipes_t out_pipes;
- typedef yarray_t <class reader_t> in_pipes_t;
- in_pipes_t in_pipes;
-
- // Number of active inpipes. All the active inpipes are located at the
- // beginning of the in_pipes array.
- in_pipes_t::size_type active;
-
- // Index of the next inbound pipe to read a request from.
- in_pipes_t::size_type current;
-
- // If true, request was already received and reply wasn't completely
- // sent yet.
+ // If true, we are in process of sending the reply. If false we are
+ // in process of receiving a request.
bool sending_reply;
- // True, if message processed at the moment (either sent or received)
- // is processed only partially.
- bool more;
-
- // Pipe we are going to send reply to.
- class writer_t *reply_pipe;
+ // If true, we are starting to receive a request. The beginning
+ // of the request is the backtrace stack.
+ bool request_begins;
rep_t (const rep_t&);
- void operator = (const rep_t&);
+ const rep_t &operator = (const rep_t&);
};
diff --git a/src/req.cpp b/src/req.cpp
index a77c061..f495492 100644
--- a/src/req.cpp
+++ b/src/req.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -21,119 +22,19 @@
#include "req.hpp"
#include "err.hpp"
-#include "pipe.hpp"
-zmq::req_t::req_t (class app_thread_t *parent_) :
- socket_base_t (parent_),
- active (0),
- current (0),
+zmq::req_t::req_t (class ctx_t *parent_, uint32_t tid_) :
+ xreq_t (parent_, tid_),
receiving_reply (false),
- reply_pipe_active (false),
- more (false),
- reply_pipe (NULL)
+ message_begins (true)
{
- options.requires_in = true;
- options.requires_out = true;
+ options.type = ZMQ_REQ;
}
zmq::req_t::~req_t ()
{
}
-void zmq::req_t::xattach_pipes (class reader_t *inpipe_,
- class writer_t *outpipe_, const blob_t &peer_identity_)
-{
- zmq_assert (inpipe_ && outpipe_);
- zmq_assert (in_pipes.size () == out_pipes.size ());
-
- in_pipes.push_back (inpipe_);
- in_pipes.swap (active, in_pipes.size () - 1);
-
- out_pipes.push_back (outpipe_);
- out_pipes.swap (active, out_pipes.size () - 1);
-
- active++;
-}
-
-void zmq::req_t::xdetach_inpipe (class reader_t *pipe_)
-{
- zmq_assert (!receiving_reply || !more || reply_pipe != pipe_);
-
- zmq_assert (pipe_);
- zmq_assert (in_pipes.size () == out_pipes.size ());
-
- // TODO: The pipe we are awaiting the reply from is detached. What now?
- // Return ECONNRESET from subsequent recv?
- if (receiving_reply && pipe_ == reply_pipe) {
- zmq_assert (false);
- }
-
- in_pipes_t::size_type index = in_pipes.index (pipe_);
-
- if (out_pipes [index])
- out_pipes [index]->term ();
- in_pipes.erase (index);
- out_pipes.erase (index);
- if (index < active) {
- active--;
- if (current == active)
- current = 0;
- }
-}
-
-void zmq::req_t::xdetach_outpipe (class writer_t *pipe_)
-{
- zmq_assert (receiving_reply || !more || out_pipes [current] != pipe_);
-
- zmq_assert (pipe_);
- zmq_assert (in_pipes.size () == out_pipes.size ());
-
- out_pipes_t::size_type index = out_pipes.index (pipe_);
-
- if (in_pipes [index])
- in_pipes [index]->term ();
- in_pipes.erase (index);
- out_pipes.erase (index);
- if (index < active) {
- active--;
- if (current == active)
- current = 0;
- }
-}
-
-void zmq::req_t::xkill (class reader_t *pipe_)
-{
- zmq_assert (receiving_reply);
- zmq_assert (pipe_ == reply_pipe);
-
- reply_pipe_active = false;
-}
-
-void zmq::req_t::xrevive (class reader_t *pipe_)
-{
- if (pipe_ == reply_pipe)
- reply_pipe_active = true;
-}
-
-void zmq::req_t::xrevive (class writer_t *pipe_)
-{
- out_pipes_t::size_type index = out_pipes.index (pipe_);
- zmq_assert (index >= active);
-
- if (in_pipes [index] != NULL) {
- in_pipes.swap (index, active);
- out_pipes.swap (index, active);
- active++;
- }
-}
-
-int zmq::req_t::xsetsockopt (int option_, const void *optval_,
- size_t optvallen_)
-{
- errno = EINVAL;
- return -1;
-}
-
int zmq::req_t::xsend (zmq_msg_t *msg_, int flags_)
{
// If we've sent a request and we still haven't got the reply,
@@ -143,98 +44,59 @@ int zmq::req_t::xsend (zmq_msg_t *msg_, int flags_)
return -1;
}
- while (active > 0) {
- if (out_pipes [current]->check_write ())
- break;
-
- zmq_assert (!more);
- active--;
- if (current < active) {
- in_pipes.swap (current, active);
- out_pipes.swap (current, active);
- }
- else
- current = 0;
- }
-
- if (active == 0) {
- errno = EAGAIN;
- return -1;
- }
-
- // If we are starting to send the request, generate a prefix.
- if (!more) {
+ // First part of the request is empty message part (stack bottom).
+ if (message_begins) {
zmq_msg_t prefix;
int rc = zmq_msg_init (&prefix);
zmq_assert (rc == 0);
- prefix.flags |= ZMQ_MSG_MORE;
- bool written = out_pipes [current]->write (&prefix);
- zmq_assert (written);
+ prefix.flags = ZMQ_MSG_MORE;
+ rc = xreq_t::xsend (&prefix, flags_);
+ if (rc != 0)
+ return rc;
+ message_begins = false;
}
- // Push the message to the selected pipe.
- bool written = out_pipes [current]->write (msg_);
- zmq_assert (written);
- more = msg_->flags & ZMQ_MSG_MORE;
- if (!more) {
- out_pipes [current]->flush ();
- receiving_reply = true;
- reply_pipe = in_pipes [current];
+ bool more = msg_->flags & ZMQ_MSG_MORE;
- // We can safely assume that the reply pipe is active as the last time
- // we've used it we've read the reply and haven't tried to read from it
- // anymore.
- reply_pipe_active = true;
+ int rc = xreq_t::xsend (msg_, flags_);
+ if (rc != 0)
+ return rc;
- // Move to the next pipe (load-balancing).
- current = (current + 1) % active;
+ // If the request was fully sent, flip the FSM into reply-receiving state.
+ if (!more) {
+ receiving_reply = true;
+ message_begins = true;
}
- // Detach the message from the data buffer.
- int rc = zmq_msg_init (msg_);
- zmq_assert (rc == 0);
-
return 0;
}
int zmq::req_t::xrecv (zmq_msg_t *msg_, int flags_)
{
- // Deallocate old content of the message.
- int rc = zmq_msg_close (msg_);
- zmq_assert (rc == 0);
-
// If request wasn't send, we can't wait for reply.
if (!receiving_reply) {
- zmq_msg_init (msg_);
errno = EFSM;
return -1;
}
- // Get the reply from the reply pipe.
- if (!reply_pipe_active || !reply_pipe->read (msg_)) {
- zmq_msg_init (msg_);
- errno = EAGAIN;
- return -1;
- }
-
- // If we are starting to receive new reply, check whether prefix
- // is well-formed and drop it.
- if (!more) {
+ // First part of the reply should be empty message part (stack bottom).
+ if (message_begins) {
+ int rc = xreq_t::xrecv (msg_, flags_);
+ if (rc != 0)
+ return rc;
zmq_assert (msg_->flags & ZMQ_MSG_MORE);
zmq_assert (zmq_msg_size (msg_) == 0);
- rc = zmq_msg_close (msg_);
- zmq_assert (rc == 0);
-
- // Get the actual reply.
- bool recvd = reply_pipe->read (msg_);
- zmq_assert (recvd);
+ message_begins = false;
}
- // If this was last part of the reply, switch to request phase.
- more = msg_->flags & ZMQ_MSG_MORE;
- if (!more) {
+ int rc = xreq_t::xrecv (msg_, flags_);
+ if (rc != 0)
+ return rc;
+
+ // If the reply is fully received, flip the FSM into request-sending state.
+ if (!(msg_->flags & ZMQ_MSG_MORE)) {
receiving_reply = false;
- reply_pipe = NULL;
+ message_begins = true;
}
return 0;
@@ -242,43 +104,18 @@ int zmq::req_t::xrecv (zmq_msg_t *msg_, int flags_)
bool zmq::req_t::xhas_in ()
{
- if (receiving_reply && more)
- return true;
-
- if (!receiving_reply || !reply_pipe_active)
- return false;
-
- zmq_assert (reply_pipe);
- if (!reply_pipe->check_read ()) {
- reply_pipe_active = false;
+ if (!receiving_reply)
return false;
- }
- return true;
+ return xreq_t::xhas_in ();
}
bool zmq::req_t::xhas_out ()
{
- if (!receiving_reply && more)
- return true;
-
if (receiving_reply)
return false;
- while (active > 0) {
- if (out_pipes [current]->check_write ())
- return true;;
-
- active--;
- if (current < active) {
- in_pipes.swap (current, active);
- out_pipes.swap (current, active);
- }
- else
- current = 0;
- }
-
- return false;
+ return xreq_t::xhas_out ();
}
diff --git a/src/req.hpp b/src/req.hpp
index 5ab7bca..3138498 100644
--- a/src/req.hpp
+++ b/src/req.hpp
@@ -1,47 +1,39 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_REQ_HPP_INCLUDED__
#define __ZMQ_REQ_HPP_INCLUDED__
-#include "socket_base.hpp"
-#include "yarray.hpp"
+#include "xreq.hpp"
namespace zmq
{
- class req_t : public socket_base_t
+ class req_t : public xreq_t
{
public:
- req_t (class app_thread_t *parent_);
+ req_t (class ctx_t *parent_, uint32_t tid_);
~req_t ();
// Overloads of functions from socket_base_t.
- void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
- const blob_t &peer_identity_);
- void xdetach_inpipe (class reader_t *pipe_);
- void xdetach_outpipe (class writer_t *pipe_);
- void xkill (class reader_t *pipe_);
- void xrevive (class reader_t *pipe_);
- void xrevive (class writer_t *pipe_);
- int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
int xsend (zmq_msg_t *msg_, int flags_);
int xrecv (zmq_msg_t *msg_, int flags_);
bool xhas_in ();
@@ -49,43 +41,16 @@ namespace zmq
private:
- // List in outbound and inbound pipes. Note that the two lists are
- // always in sync. I.e. outpipe with index N communicates with the
- // same session as inpipe with index N.
- //
- // TODO: Once we have queue limits in place, list of active outpipes
- // is to be held (presumably by stacking active outpipes at
- // the beginning of the array). We don't have to do the same thing for
- // inpipes, because we know which pipe we want to read the
- // reply from.
- typedef yarray_t <class writer_t> out_pipes_t;
- out_pipes_t out_pipes;
- typedef yarray_t <class reader_t> in_pipes_t;
- in_pipes_t in_pipes;
-
- // Number of active pipes.
- size_t active;
-
- // Req_t load-balances the requests - 'current' points to the session
- // that's processing the request at the moment.
- out_pipes_t::size_type current;
-
// If true, request was already sent and reply wasn't received yet or
// was raceived partially.
bool receiving_reply;
- // True, if read can be attempted from the reply pipe.
- bool reply_pipe_active;
-
- // True, if message processed at the moment (either sent or received)
- // is processed only partially.
- bool more;
-
- // Pipe we are awaiting the reply from.
- class reader_t *reply_pipe;
+ // If true, we are starting to send/recv a message. The first part
+ // of the message must be empty message part (backtrace stack bottom).
+ bool message_begins;
req_t (const req_t&);
- void operator = (const req_t&);
+ const req_t &operator = (const req_t&);
};
}
diff --git a/src/select.cpp b/src/select.cpp
index 59eb83e..56f9f74 100644
--- a/src/select.cpp
+++ b/src/select.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -54,9 +55,6 @@ zmq::select_t::select_t () :
zmq::select_t::~select_t ()
{
worker.stop ();
-
- // Make sure there are no fds registered on shutdown.
- zmq_assert (load.get () == 0);
}
zmq::select_t::handle_t zmq::select_t::add_fd (fd_t fd_, i_poll_events *events_)
@@ -77,7 +75,7 @@ zmq::select_t::handle_t zmq::select_t::add_fd (fd_t fd_, i_poll_events *events_)
maxfd = fd_;
// Increase the load metric of the thread.
- load.add (1);
+ adjust_load (1);
return fd_;
}
@@ -86,7 +84,7 @@ void zmq::select_t::rm_fd (handle_t handle_)
{
// Mark the descriptor as retired.
fd_set_t::iterator it;
- for (it = fds.begin (); it != fds.end (); it ++)
+ for (it = fds.begin (); it != fds.end (); ++it)
if (it->fd == handle_)
break;
zmq_assert (it != fds.end ());
@@ -107,13 +105,13 @@ void zmq::select_t::rm_fd (handle_t handle_)
// highest-numbered file descriptor.
if (handle_ == maxfd) {
maxfd = retired_fd;
- for (fd_set_t::iterator it = fds.begin (); it != fds.end (); it ++)
+ for (fd_set_t::iterator it = fds.begin (); it != fds.end (); ++it)
if (it->fd > maxfd)
maxfd = it->fd;
}
// Decrease the load metric of the thread.
- load.sub (1);
+ adjust_load (-1);
}
void zmq::select_t::set_pollin (handle_t handle_)
@@ -136,23 +134,6 @@ void zmq::select_t::reset_pollout (handle_t handle_)
FD_CLR (handle_, &source_set_out);
}
-void zmq::select_t::add_timer (i_poll_events *events_)
-{
- timers.push_back (events_);
-}
-
-void zmq::select_t::cancel_timer (i_poll_events *events_)
-{
- timers_t::iterator it = std::find (timers.begin (), timers.end (), events_);
- if (it != timers.end ())
- timers.erase (it);
-}
-
-int zmq::select_t::get_load ()
-{
- return load.get ();
-}
-
void zmq::select_t::start ()
{
worker.start (worker_routine, this);
@@ -167,19 +148,19 @@ void zmq::select_t::loop ()
{
while (!stopping) {
+ // Execute any due timers.
+ int timeout = (int) execute_timers ();
+
// Intialise the pollsets.
memcpy (&readfds, &source_set_in, sizeof source_set_in);
memcpy (&writefds, &source_set_out, sizeof source_set_out);
memcpy (&exceptfds, &source_set_err, sizeof source_set_err);
- // Compute the timout interval. Select is free to overwrite the
- // value so we have to compute it each time anew.
- timeval timeout = {max_timer_period / 1000,
- (max_timer_period % 1000) * 1000};
-
// Wait for events.
+ struct timeval tv = {(long) (timeout / 1000),
+ (long) (timeout % 1000 * 1000)};
int rc = select (maxfd + 1, &readfds, &writefds, &exceptfds,
- timers.empty () ? NULL : &timeout);
+ timeout ? &tv : NULL);
#ifdef ZMQ_HAVE_WINDOWS
wsa_assert (rc != SOCKET_ERROR);
@@ -189,20 +170,10 @@ void zmq::select_t::loop ()
errno_assert (rc != -1);
#endif
- // Handle timer.
- if (!rc) {
-
- // Use local list of timers as timer handlers may fill new timers
- // into the original array.
- timers_t t;
- std::swap (timers, t);
-
- // Trigger all the timers.
- for (timers_t::iterator it = t.begin (); it != t.end (); it ++)
- (*it)->timer_event ();
-
+ // If there are no events (i.e. it's a timeout) there's no point
+ // in checking the pollset.
+ if (rc == 0)
continue;
- }
for (fd_set_t::size_type i = 0; i < fds.size (); i ++) {
if (fds [i].fd == retired_fd)
@@ -221,15 +192,8 @@ void zmq::select_t::loop ()
// Destroy retired event sources.
if (retired) {
- fd_set_t::iterator it = fds.begin();
- while (it != fds.end()) {
- if (it->fd == retired_fd) {
- it = fds.erase(it);
- }
- else {
- it++;
- }
- }
+ fds.erase (std::remove_if (fds.begin (), fds.end (),
+ zmq::select_t::is_retired_fd), fds.end ());
retired = false;
}
}
@@ -239,3 +203,9 @@ void zmq::select_t::worker_routine (void *arg_)
{
((select_t*) arg_)->loop ();
}
+
+bool zmq::select_t::is_retired_fd (const fd_entry_t &entry)
+{
+ return (entry.fd == retired_fd);
+}
+
diff --git a/src/select.hpp b/src/select.hpp
index 01e9fa8..c88dd71 100644
--- a/src/select.hpp
+++ b/src/select.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -36,7 +37,7 @@
#include "fd.hpp"
#include "thread.hpp"
-#include "atomic_counter.hpp"
+#include "poller_base.hpp"
namespace zmq
{
@@ -44,7 +45,7 @@ namespace zmq
// Implements socket polling mechanism using POSIX.1-2001 select()
// function.
- class select_t
+ class select_t : public poller_base_t
{
public:
@@ -60,9 +61,6 @@ namespace zmq
void reset_pollin (handle_t handle_);
void set_pollout (handle_t handle_);
void reset_pollout (handle_t handle_);
- void add_timer (struct i_poll_events *events_);
- void cancel_timer (struct i_poll_events *events_);
- int get_load ();
void start ();
void stop ();
@@ -80,6 +78,9 @@ namespace zmq
struct i_poll_events *events;
};
+ // Checks if an fd_entry_t is retired.
+ static bool is_retired_fd (const fd_entry_t &entry);
+
// Set of file descriptors that are used to retreive
// information for fd_set.
typedef std::vector <fd_entry_t> fd_set_t;
@@ -99,22 +100,14 @@ namespace zmq
// If true, at least one file descriptor has retired.
bool retired;
- // List of all the engines waiting for the timer event.
- typedef std::vector <struct i_poll_events*> timers_t;
- timers_t timers;
-
// If true, thread is shutting down.
bool stopping;
// Handle of the physical thread doing the I/O work.
thread_t worker;
- // Load of the poller. Currently number of file descriptors
- // registered with the poller.
- atomic_counter_t load;
-
select_t (const select_t&);
- void operator = (const select_t&);
+ const select_t &operator = (const select_t&);
};
}
diff --git a/src/semaphore.hpp b/src/semaphore.hpp
new file mode 100644
index 0000000..edc0683
--- /dev/null
+++ b/src/semaphore.hpp
@@ -0,0 +1,189 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_SEMAPHORE_HPP_INCLUDED__
+#define __ZMQ_SEMAPHORE_HPP_INCLUDED__
+
+#include "platform.hpp"
+#include "err.hpp"
+
+#if defined ZMQ_HAVE_WINDOWS
+#include "windows.hpp"
+#elif defined ZMQ_HAVE_OPENVMS
+#include <pthread.h>
+#else
+#include <semaphore.h>
+#endif
+
+namespace zmq
+{
+ // Simple semaphore. Only single thread may be waiting at any given time.
+ // Also, the semaphore may not be posted before the previous post
+ // was matched by corresponding wait and the waiting thread was
+ // released.
+
+#if defined ZMQ_HAVE_WINDOWS
+
+ // On Windows platform simple semaphore is implemeted using event object.
+
+ class semaphore_t
+ {
+ public:
+
+ // Initialise the semaphore.
+ inline semaphore_t ()
+ {
+ ev = CreateEvent (NULL, FALSE, FALSE, NULL);
+ win_assert (ev != NULL);
+ }
+
+ // Destroy the semaphore.
+ inline ~semaphore_t ()
+ {
+ int rc = CloseHandle (ev);
+ win_assert (rc != 0);
+ }
+
+ // Wait for the semaphore.
+ inline void wait ()
+ {
+ DWORD rc = WaitForSingleObject (ev, INFINITE);
+ win_assert (rc != WAIT_FAILED);
+ }
+
+ // Post the semaphore.
+ inline void post ()
+ {
+ int rc = SetEvent (ev);
+ win_assert (rc != 0);
+ }
+
+ private:
+
+ HANDLE ev;
+
+ semaphore_t (const semaphore_t&);
+ const semaphore_t &operator = (const semaphore_t&);
+ };
+
+#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_OPENVMS
+
+ // On platforms that allow for double locking of a mutex from the same
+ // thread, simple semaphore is implemented using mutex, as it is more
+ // efficient than full-blown semaphore.
+
+ // Note that OS-level semaphore is not implemented on OSX, so the below
+ // code is not only optimisation, it's necessary to make 0MQ work on OSX.
+
+ class semaphore_t
+ {
+ public:
+
+ // Initialise the semaphore.
+ inline semaphore_t ()
+ {
+ int rc = pthread_mutex_init (&mutex, NULL);
+ posix_assert (rc);
+ rc = pthread_mutex_lock (&mutex);
+ posix_assert (rc);
+ }
+
+ // Destroy the semaphore.
+ inline ~semaphore_t ()
+ {
+ int rc = pthread_mutex_unlock (&mutex);
+ posix_assert (rc);
+ rc = pthread_mutex_destroy (&mutex);
+ posix_assert (rc);
+ }
+
+ // Wait for the semaphore.
+ inline void wait ()
+ {
+ int rc = pthread_mutex_lock (&mutex);
+ posix_assert (rc);
+ }
+
+ // Post the semaphore.
+ inline void post ()
+ {
+ int rc = pthread_mutex_unlock (&mutex);
+ posix_assert (rc);
+ }
+
+ private:
+
+ pthread_mutex_t mutex;
+
+ semaphore_t (const semaphore_t&);
+ const semaphore_t &operator = (const semaphore_t&);
+ };
+
+#else
+
+ // Default implementation maps simple semaphore to POSIX semaphore.
+
+ class semaphore_t
+ {
+ public:
+
+ // Initialise the semaphore.
+ inline semaphore_t ()
+ {
+ int rc = sem_init (&sem, 0, 0);
+ errno_assert (rc != -1);
+ }
+
+ // Destroy the semaphore.
+ inline ~semaphore_t ()
+ {
+ int rc = sem_destroy (&sem);
+ errno_assert (rc != -1);
+ }
+
+ // Wait for the semaphore.
+ inline void wait ()
+ {
+ int rc = sem_wait (&sem);
+ errno_assert (rc != -1);
+ }
+
+ // Post the semaphore.
+ inline void post ()
+ {
+ int rc = sem_post (&sem);
+ errno_assert (rc != -1);
+ }
+
+ private:
+
+ // Underlying system semaphore object.
+ sem_t sem;
+
+ semaphore_t (const semaphore_t&);
+ const semaphore_t &operator = (const semaphore_t&);
+ };
+
+#endif
+
+}
+
+#endif
+
diff --git a/src/session.cpp b/src/session.cpp
index f798877..33c25d9 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -1,77 +1,88 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <new>
-
#include "session.hpp"
+#include "socket_base.hpp"
#include "i_engine.hpp"
#include "err.hpp"
#include "pipe.hpp"
+#include "likely.hpp"
-zmq::session_t::session_t (object_t *parent_, socket_base_t *owner_,
- const options_t &options_) :
- owned_t (parent_, owner_),
+zmq::session_t::session_t (class io_thread_t *io_thread_,
+ class socket_base_t *socket_, const options_t &options_) :
+ own_t (io_thread_, options_),
+ io_object_t (io_thread_),
in_pipe (NULL),
incomplete_in (false),
- active (true),
out_pipe (NULL),
engine (NULL),
- options (options_)
+ socket (socket_),
+ io_thread (io_thread_),
+ pipes_attached (false),
+ delimiter_processed (false),
+ force_terminate (false),
+ has_linger_timer (false),
+ state (active)
{
- // It's possible to register the session at this point as it will be
- // searched for only on reconnect, i.e. no race condition (session found
- // before it is plugged into it's I/O thread) is possible.
- ordinal = owner->register_session (this);
}
-zmq::session_t::session_t (object_t *parent_, socket_base_t *owner_,
- const options_t &options_, const blob_t &peer_identity_) :
- owned_t (parent_, owner_),
- in_pipe (NULL),
- incomplete_in (false),
- active (true),
- out_pipe (NULL),
- engine (NULL),
- ordinal (0),
- peer_identity (peer_identity_),
- options (options_)
+zmq::session_t::~session_t ()
{
- if (!peer_identity.empty () && peer_identity [0] != 0) {
- if (!owner->register_session (peer_identity, this)) {
+ zmq_assert (!in_pipe);
+ zmq_assert (!out_pipe);
- // TODO: There's already a session with the specified
- // identity. We should presumably syslog it and drop the
- // session.
- zmq_assert (false);
- }
- }
+ if (engine)
+ engine->terminate ();
}
-zmq::session_t::~session_t ()
+void zmq::session_t::proceed_with_term ()
{
- zmq_assert (!in_pipe);
- zmq_assert (!out_pipe);
+ if (state == terminating)
+ return;
+
+ zmq_assert (state == pending);
+ state = terminating;
+
+ // If there's still a pending linger timer, remove it.
+ if (has_linger_timer) {
+ cancel_timer (linger_timer_id);
+ has_linger_timer = false;
+ }
+
+ if (in_pipe) {
+ register_term_acks (1);
+ in_pipe->terminate ();
+ }
+ if (out_pipe) {
+ register_term_acks (1);
+ out_pipe->terminate ();
+ }
+
+ // The session has already waited for the linger period. We don't want
+ // the child objects to linger any more thus linger is set to zero.
+ own_t::process_term (0);
}
bool zmq::session_t::read (::zmq_msg_t *msg_)
{
- if (!in_pipe || !active)
+ if (!in_pipe)
return false;
if (!in_pipe->read (msg_))
@@ -97,17 +108,8 @@ void zmq::session_t::flush ()
out_pipe->flush ();
}
-void zmq::session_t::detach (owned_t *reconnecter_)
+void zmq::session_t::clean_pipes ()
{
- // Plug in the reconnecter object if any.
- if (reconnecter_) {
- send_plug (reconnecter_);
- send_own (owner, reconnecter_);
- }
-
- // Engine is terminating itself. No need to deallocate it from here.
- engine = NULL;
-
// Get rid of half-processed messages in the out pipe. Flush any
// unflushed messages upstream.
if (out_pipe) {
@@ -127,165 +129,219 @@ void zmq::session_t::detach (owned_t *reconnecter_)
zmq_msg_close (&msg);
}
}
-
- // Terminate transient session.
- if (!ordinal && (peer_identity.empty () || peer_identity [0] == 0))
- term ();
-}
-
-zmq::io_thread_t *zmq::session_t::get_io_thread ()
-{
- return choose_io_thread (options.affinity);
-}
-
-class zmq::socket_base_t *zmq::session_t::get_owner ()
-{
- return owner;
-}
-
-uint64_t zmq::session_t::get_ordinal ()
-{
- zmq_assert (ordinal);
- return ordinal;
}
void zmq::session_t::attach_pipes (class reader_t *inpipe_,
class writer_t *outpipe_, const blob_t &peer_identity_)
{
+ zmq_assert (!pipes_attached);
+ pipes_attached = true;
+
if (inpipe_) {
zmq_assert (!in_pipe);
in_pipe = inpipe_;
- active = true;
- in_pipe->set_endpoint (this);
+ in_pipe->set_event_sink (this);
}
if (outpipe_) {
zmq_assert (!out_pipe);
out_pipe = outpipe_;
- out_pipe->set_endpoint (this);
+ out_pipe->set_event_sink (this);
+ }
+
+ // If we are already terminating, terminate the pipes straight away.
+ if (state == terminating) {
+ if (in_pipe) {
+ in_pipe->terminate ();
+ register_term_acks (1);
+ }
+ if (out_pipe) {
+ out_pipe->terminate ();
+ register_term_acks (1);
+ }
}
}
-void zmq::session_t::detach_inpipe (reader_t *pipe_)
+void zmq::session_t::delimited (reader_t *pipe_)
{
- active = false;
- in_pipe = NULL;
+ zmq_assert (in_pipe == pipe_);
+ zmq_assert (!delimiter_processed);
+ delimiter_processed = true;
+
+ // If we are in process of being closed, but still waiting for all
+ // pending messeges being sent, we can terminate here.
+ if (state == pending)
+ proceed_with_term ();
}
-void zmq::session_t::detach_outpipe (writer_t *pipe_)
+void zmq::session_t::terminated (reader_t *pipe_)
{
- out_pipe = NULL;
+ zmq_assert (in_pipe == pipe_);
+ in_pipe = NULL;
+ if (state == terminating)
+ unregister_term_ack ();
}
-void zmq::session_t::kill (reader_t *pipe_)
+void zmq::session_t::terminated (writer_t *pipe_)
{
- active = false;
+ zmq_assert (out_pipe == pipe_);
+ out_pipe = NULL;
+ if (state == terminating)
+ unregister_term_ack ();
}
-void zmq::session_t::revive (reader_t *pipe_)
+void zmq::session_t::activated (reader_t *pipe_)
{
zmq_assert (in_pipe == pipe_);
- active = true;
- if (engine)
- engine->revive ();
+
+ if (likely (engine != NULL))
+ engine->activate_out ();
+ else
+ in_pipe->check_read ();
}
-void zmq::session_t::revive (writer_t *pipe_)
+void zmq::session_t::activated (writer_t *pipe_)
{
zmq_assert (out_pipe == pipe_);
if (engine)
- engine->resume_input ();
+ engine->activate_in ();
}
void zmq::session_t::process_plug ()
{
}
-void zmq::session_t::process_unplug ()
+void zmq::session_t::process_attach (i_engine *engine_,
+ const blob_t &peer_identity_)
{
- // Unregister the session from the socket.
- if (ordinal)
- owner->unregister_session (ordinal);
- else if (!peer_identity.empty () && peer_identity [0] != 0)
- owner->unregister_session (peer_identity);
-
- // Ask associated pipes to terminate.
- if (in_pipe) {
- in_pipe->term ();
- in_pipe = NULL;
+ // If some other object (e.g. init) notifies us that the connection failed
+ // we need to start the reconnection process.
+ if (!engine_) {
+ zmq_assert (!engine);
+ detached ();
+ return;
}
- if (out_pipe) {
- out_pipe->term ();
- out_pipe = NULL;
+
+ // If we are already terminating, we destroy the engine straight away.
+ // Note that we don't have to unplug it before deleting as it's not
+ // yet plugged to the session.
+ if (state == terminating) {
+ delete engine_;
+ return;
}
+ // If the session already has an engine attached, destroy new one.
+ // Note new engine is not plugged in yet, we don't have to unplug it.
if (engine) {
- engine->unplug ();
- delete engine;
- engine = NULL;
+ log ("DPID: duplicate peer identity - disconnecting peer");
+ delete engine_;
+ return;
+ }
+
+ // Check whether the required pipes already exist. If not so, we'll
+ // create them and bind them to the socket object.
+ if (!pipes_attached) {
+ zmq_assert (!in_pipe && !out_pipe);
+ pipes_attached = true;
+ reader_t *socket_reader = NULL;
+ writer_t *socket_writer = NULL;
+
+ // Create the pipes, as required.
+ if (options.requires_in) {
+ create_pipe (socket, this, options.hwm, options.swap, &socket_reader,
+ &out_pipe);
+ out_pipe->set_event_sink (this);
+ }
+ if (options.requires_out) {
+ create_pipe (this, socket, options.hwm, options.swap, &in_pipe,
+ &socket_writer);
+ in_pipe->set_event_sink (this);
+ }
+
+ // Bind the pipes to the socket object.
+ if (socket_reader || socket_writer)
+ send_bind (socket, socket_reader, socket_writer, peer_identity_);
}
+
+ // Plug in the engine.
+ engine = engine_;
+ engine->plug (io_thread, this);
+
+ // Trigger the notfication about the attachment.
+ attached (peer_identity_);
}
-void zmq::session_t::process_attach (i_engine *engine_,
- const blob_t &peer_identity_)
+void zmq::session_t::detach ()
{
- if (!peer_identity.empty ()) {
-
- // If both IDs are temporary, no checking is needed.
- // TODO: Old ID should be reused in this case...
- if (peer_identity.empty () || peer_identity [0] != 0 ||
- peer_identity_.empty () || peer_identity_ [0] != 0) {
+ // Engine is dead. Let's forget about it.
+ engine = NULL;
- // If we already know the peer name do nothing, just check whether
- // it haven't changed.
- zmq_assert (peer_identity == peer_identity_);
- }
- }
- else if (!peer_identity_.empty ()) {
+ // Remove any half-done messages from the pipes.
+ clean_pipes ();
- // Store the peer identity.
- peer_identity = peer_identity_;
+ // Send the event to the derived class.
+ detached ();
- // If the session is not registered with the ordinal, let's register
- // it using the peer name.
- if (!ordinal) {
- if (!owner->register_session (peer_identity, this)) {
+ // Just in case, there's only a delimiter in the inbound pipe.
+ if (in_pipe)
+ in_pipe->check_read ();
+}
- // TODO: There's already a session with the specified
- // identity. We should presumably syslog it and drop the
- // session.
- zmq_assert (false);
- }
- }
+void zmq::session_t::process_term (int linger_)
+{
+ zmq_assert (state == active);
+ state = pending;
+
+ // If linger is set to zero, we can terminate the session straight away
+ // not waiting for the pending messages to be sent.
+ if (linger_ == 0) {
+ proceed_with_term ();
+ return;
}
- // Check whether the required pipes already exist. If not so, we'll
- // create them and bind them to the socket object.
- reader_t *socket_reader = NULL;
- writer_t *socket_writer = NULL;
-
- if (options.requires_in && !out_pipe) {
- pipe_t *pipe = new (std::nothrow) pipe_t (owner, this, options.hwm, options.swap);
- zmq_assert (pipe);
- out_pipe = &pipe->writer;
- out_pipe->set_endpoint (this);
- socket_reader = &pipe->reader;
+ // If there's finite linger value, set up a timer.
+ if (linger_ > 0) {
+ zmq_assert (!has_linger_timer);
+ add_timer (linger_, linger_timer_id);
+ has_linger_timer = true;
}
- if (options.requires_out && !in_pipe) {
- pipe_t *pipe = new (std::nothrow) pipe_t (this, owner, options.hwm, options.swap);
- zmq_assert (pipe);
- in_pipe = &pipe->reader;
- in_pipe->set_endpoint (this);
- socket_writer = &pipe->writer;
- }
+ // If there's no engine and there's only delimiter in the pipe it wouldn't
+ // be ever read. Thus we check for it explicitly.
+ if (in_pipe)
+ in_pipe->check_read ();
+
+ // If there's no in pipe there are no pending messages to send.
+ // We can proceed with the shutdown straight away. Also, if there is
+ // inbound pipe, but the delimiter was already processed, we can
+ // terminate immediately. Alternatively, if the derived session type have
+ // called 'terminate' we'll finish straight away.
+ if (!options.requires_out || delimiter_processed || force_terminate ||
+ (!options.immediate_connect && !in_pipe))
+ proceed_with_term ();
+}
- if (socket_reader || socket_writer)
- send_bind (owner, socket_reader, socket_writer, peer_identity);
+void zmq::session_t::timer_event (int id_)
+{
+ // Linger period expired. We can proceed with termination even though
+ // there are still pending messages to be sent.
+ zmq_assert (id_ == linger_timer_id);
+ has_linger_timer = false;
+ proceed_with_term ();
+}
- // Plug in the engine.
- zmq_assert (!engine);
- zmq_assert (engine_);
- engine = engine_;
- engine->plug (this);
+bool zmq::session_t::register_session (const blob_t &name_, session_t *session_)
+{
+ return socket->register_session (name_, session_);
+}
+
+void zmq::session_t::unregister_session (const blob_t &name_)
+{
+ socket->unregister_session (name_);
+}
+
+void zmq::session_t::terminate ()
+{
+ force_terminate = true;
+ own_t::terminate ();
}
diff --git a/src/session.hpp b/src/session.hpp
index 9bda1ad..499c074 100644
--- a/src/session.hpp
+++ b/src/session.hpp
@@ -1,73 +1,103 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_SESSION_HPP_INCLUDED__
#define __ZMQ_SESSION_HPP_INCLUDED__
+#include "own.hpp"
#include "i_inout.hpp"
-#include "i_endpoint.hpp"
-#include "owned.hpp"
-#include "options.hpp"
+#include "io_object.hpp"
#include "blob.hpp"
+#include "pipe.hpp"
namespace zmq
{
- class session_t : public owned_t, public i_inout, public i_endpoint
+ class session_t :
+ public own_t,
+ public io_object_t,
+ public i_inout,
+ public i_reader_events,
+ public i_writer_events
{
public:
- // Creates unnamed session.
- session_t (object_t *parent_, socket_base_t *owner_,
- const options_t &options_);
+ session_t (class io_thread_t *io_thread_,
+ class socket_base_t *socket_, const options_t &options_);
- // Creates named session.
- session_t (object_t *parent_, socket_base_t *owner_,
- const options_t &options_, const blob_t &peer_identity_);
-
- // i_inout interface implementation.
+ // i_inout interface implementation. Note that detach method is not
+ // implemented by generic session. Different session types may handle
+ // engine disconnection in different ways.
bool read (::zmq_msg_t *msg_);
bool write (::zmq_msg_t *msg_);
void flush ();
- void detach (owned_t *reconnecter_);
- class io_thread_t *get_io_thread ();
- class socket_base_t *get_owner ();
- uint64_t get_ordinal ();
+ void detach ();
- // i_endpoint interface implementation.
void attach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
const blob_t &peer_identity_);
- void detach_inpipe (class reader_t *pipe_);
- void detach_outpipe (class writer_t *pipe_);
- void kill (class reader_t *pipe_);
- void revive (class reader_t *pipe_);
- void revive (class writer_t *pipe_);
- private:
+ // i_reader_events interface implementation.
+ void activated (class reader_t *pipe_);
+ void terminated (class reader_t *pipe_);
+ void delimited (class reader_t *pipe_);
+
+ // i_writer_events interface implementation.
+ void activated (class writer_t *pipe_);
+ void terminated (class writer_t *pipe_);
+
+ protected:
+
+ // This function allows to shut down the session even though
+ // there are pending messages in the inbound pipe.
+ void terminate ();
+
+ // Two events for the derived session type. Attached is triggered
+ // when session is attached to a peer, detached is triggered at the
+ // beginning of the termination process when session is about to
+ // be detached from the peer.
+ virtual void attached (const blob_t &peer_identity_) = 0;
+ virtual void detached () = 0;
+
+ // Allows derives session types to (un)register session names.
+ bool register_session (const blob_t &name_, class session_t *session_);
+ void unregister_session (const blob_t &name_);
~session_t ();
+ private:
+
// Handlers for incoming commands.
void process_plug ();
- void process_unplug ();
void process_attach (struct i_engine *engine_,
const blob_t &peer_identity_);
+ void process_term (int linger_);
+
+ // i_poll_events handlers.
+ void timer_event (int id_);
+
+ // Remove any half processed messages. Flush unflushed messages.
+ // Call this function when engine disconnect to get rid of leftovers.
+ void clean_pipes ();
+
+ // Call this function to move on with the delayed process_term.
+ void proceed_with_term ();
// Inbound pipe, i.e. one the session is getting messages from.
class reader_t *in_pipe;
@@ -76,27 +106,43 @@ namespace zmq
// is still in the in pipe.
bool incomplete_in;
- // If true, in_pipe is active. Otherwise there are no messages to get.
- bool active;
-
// Outbound pipe, i.e. one the socket is sending messages to.
class writer_t *out_pipe;
+ // The protocol I/O engine connected to the session.
struct i_engine *engine;
- // Session is identified by ordinal in the case when it was created
- // before connection to the peer was established and thus we are
- // unaware of peer's identity.
- uint64_t ordinal;
+ // The socket the session belongs to.
+ class socket_base_t *socket;
+
+ // I/O thread the session is living in. It will be used to plug in
+ // the engines into the same thread.
+ class io_thread_t *io_thread;
+
+ // If true, pipes were already attached to this session.
+ bool pipes_attached;
+
+ // If true, delimiter was already read from the inbound pipe.
+ bool delimiter_processed;
+
+ // If true, we should terminate the session even though there are
+ // pending messages in the inbound pipe.
+ bool force_terminate;
+
+ // ID of the linger timer
+ enum {linger_timer_id = 0x20};
- // Identity of the peer.
- blob_t peer_identity;
+ // True is linger timer is running.
+ bool has_linger_timer;
- // Inherited socket options.
- options_t options;
+ enum {
+ active,
+ pending,
+ terminating
+ } state;
session_t (const session_t&);
- void operator = (const session_t&);
+ const session_t &operator = (const session_t&);
};
}
diff --git a/src/signaler.cpp b/src/signaler.cpp
deleted file mode 100644
index d4a9214..0000000
--- a/src/signaler.cpp
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "signaler.hpp"
-#include "platform.hpp"
-#include "err.hpp"
-#include "fd.hpp"
-#include "ip.hpp"
-
-#if defined ZMQ_HAVE_OPENVMS
-#include <netinet/tcp.h>
-#include <unistd.h>
-#elif defined ZMQ_HAVE_WINDOWS
-#include "windows.hpp"
-#else
-#include <unistd.h>
-#include <fcntl.h>
-#include <limits.h>
-#endif
-
-zmq::fd_t zmq::signaler_t::get_fd ()
-{
- return r;
-}
-
-#if defined ZMQ_HAVE_WINDOWS
-
-zmq::signaler_t::signaler_t ()
-{
- // Windows have no 'socketpair' function. CreatePipe is no good as pipe
- // handles cannot be polled on. Here we create the socketpair by hand.
-
- struct sockaddr_in addr;
- SOCKET listener;
- int addrlen = sizeof (addr);
-
- w = INVALID_SOCKET;
- r = INVALID_SOCKET;
-
- fd_t rcs = (listener = socket (AF_INET, SOCK_STREAM, 0));
- wsa_assert (rcs != INVALID_SOCKET);
-
- memset (&addr, 0, sizeof (addr));
- addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- addr.sin_port = 0;
-
- int rc = bind (listener, (const struct sockaddr*) &addr, sizeof (addr));
- wsa_assert (rc != SOCKET_ERROR);
-
- rc = getsockname (listener, (struct sockaddr*) &addr, &addrlen);
- wsa_assert (rc != SOCKET_ERROR);
-
- // Listen for incomming connections.
- rc = listen (listener, 1);
- wsa_assert (rc != SOCKET_ERROR);
-
- // Create the socket.
- w = WSASocket (AF_INET, SOCK_STREAM, 0, NULL, 0, 0);
- wsa_assert (w != INVALID_SOCKET);
-
- // Connect to the remote peer.
- rc = connect (w, (sockaddr *) &addr, sizeof (addr));
- wsa_assert (rc != SOCKET_ERROR);
-
- // Accept connection from w.
- r = accept (listener, NULL, NULL);
- wsa_assert (r != INVALID_SOCKET);
-
- // Set the read site of the pair to non-blocking mode.
- unsigned long argp = 1;
- rc = ioctlsocket (r, FIONBIO, &argp);
- wsa_assert (rc != SOCKET_ERROR);
-
- // We don't need the listening socket anymore. Close it.
- rc = closesocket (listener);
- wsa_assert (rc != SOCKET_ERROR);
-}
-
-zmq::signaler_t::~signaler_t ()
-{
- int rc = closesocket (w);
- wsa_assert (rc != SOCKET_ERROR);
-
- rc = closesocket (r);
- wsa_assert (rc != SOCKET_ERROR);
-}
-
-void zmq::signaler_t::send (const command_t &cmd_)
-{
- // TODO: Note that send is a blocking operation.
- // How should we behave if the signal cannot be written to the signaler?
- // Even worse: What if half of a command is written?
- int rc = ::send (w, (char*) &cmd_, sizeof (command_t), 0);
- win_assert (rc != SOCKET_ERROR);
- zmq_assert (rc == sizeof (command_t));
-}
-
-bool zmq::signaler_t::recv (command_t *cmd_, bool block_)
-{
- if (block_) {
-
- // Switch to blocking mode.
- unsigned long argp = 0;
- int rc = ioctlsocket (r, FIONBIO, &argp);
- wsa_assert (rc != SOCKET_ERROR);
- }
-
- bool result;
- int nbytes = ::recv (r, (char*) cmd_, sizeof (command_t), 0);
- if (nbytes == -1 && WSAGetLastError () == WSAEWOULDBLOCK) {
- result = false;
- }
- else {
- wsa_assert (nbytes != -1);
-
- // Check whether we haven't got half of a signal.
- zmq_assert (nbytes % sizeof (uint32_t) == 0);
-
- result = true;
- }
-
- if (block_) {
-
- // Switch back to non-blocking mode.
- unsigned long argp = 1;
- int rc = ioctlsocket (r, FIONBIO, &argp);
- wsa_assert (rc != SOCKET_ERROR);
- }
-
- return result;
-}
-
-#elif defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-zmq::signaler_t::signaler_t ()
-{
- int sv [2];
- int rc = socketpair (AF_UNIX, SOCK_STREAM, 0, sv);
- errno_assert (rc == 0);
- w = sv [0];
- r = sv [1];
-
- // Set the reader to non-blocking mode.
- int flags = fcntl (r, F_GETFL, 0);
- if (flags == -1)
- flags = 0;
- rc = fcntl (r, F_SETFL, flags | O_NONBLOCK);
- errno_assert (rc != -1);
-}
-
-zmq::signaler_t::~signaler_t ()
-{
- close (w);
- close (r);
-}
-
-void zmq::signaler_t::send (const command_t &cmd_)
-{
- ssize_t nbytes;
- do {
- nbytes = ::send (w, &cmd_, sizeof (command_t), 0);
- } while (nbytes == -1 && errno == EINTR);
- errno_assert (nbytes != -1);
- zmq_assert (nbytes == sizeof (command_t));
-}
-
-bool zmq::signaler_t::recv (command_t *cmd_, bool block_)
-{
- if (block_) {
-
- // Set the reader to blocking mode.
- int flags = fcntl (r, F_GETFL, 0);
- if (flags == -1)
- flags = 0;
- int rc = fcntl (r, F_SETFL, flags & ~O_NONBLOCK);
- errno_assert (rc != -1);
- }
-
- bool result;
- ssize_t nbytes;
- do {
- nbytes = ::recv (r, (char*) cmd_, sizeof (command_t), 0);
- } while (nbytes == -1 && errno == EINTR);
- if (nbytes == -1 && errno == EAGAIN) {
- result = false;
- }
- else {
- zmq_assert (nbytes != -1);
-
- // Check whether we haven't got half of command.
- zmq_assert (nbytes == sizeof (command_t));
-
- result = true;
- }
-
- if (block_) {
-
- // Set the reader to non-blocking mode.
- int flags = fcntl (r, F_GETFL, 0);
- if (flags == -1)
- flags = 0;
- int rc = fcntl (r, F_SETFL, flags | O_NONBLOCK);
- errno_assert (rc != -1);
- }
-
- return result;
-}
-
-#else
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-zmq::signaler_t::signaler_t ()
-{
- // Make sure that command can be written to the socket in atomic fashion.
- // If this wasn't guaranteed, commands from different threads would be
- // interleaved.
- zmq_assert (sizeof (command_t) <= PIPE_BUF);
-
- int sv [2];
- int rc = socketpair (AF_UNIX, SOCK_STREAM, 0, sv);
- errno_assert (rc == 0);
- w = sv [0];
- r = sv [1];
-}
-
-zmq::signaler_t::~signaler_t ()
-{
- close (w);
- close (r);
-}
-
-void zmq::signaler_t::send (const command_t &cmd_)
-{
- // TODO: Note that send is a blocking operation.
- // How should we behave if the command cannot be written to the signaler?
- ssize_t nbytes;
- do {
- nbytes = ::send (w, &cmd_, sizeof (command_t), 0);
- } while (nbytes == -1 && errno == EINTR);
- errno_assert (nbytes != -1);
-
- // This should never happen as we've already checked that command size is
- // less than PIPE_BUF.
- zmq_assert (nbytes == sizeof (command_t));
-}
-
-bool zmq::signaler_t::recv (command_t *cmd_, bool block_)
-{
- ssize_t nbytes;
- do {
- nbytes = ::recv (r, cmd_, sizeof (command_t),
- block_ ? 0 : MSG_DONTWAIT);
- } while (nbytes == -1 && errno == EINTR);
-
- // If there's no signal available return false.
- if (nbytes == -1 && errno == EAGAIN)
- return false;
-
- errno_assert (nbytes != -1);
-
- // Check whether we haven't got half of command.
- zmq_assert (nbytes == sizeof (command_t));
-
- return true;
-}
-
-#endif
-
-#if defined ZMQ_HAVE_OPENVMS
-
-int zmq::signaler_t::socketpair (int domain_, int type_, int protocol_,
- int sv_ [2])
-{
- int listener;
- sockaddr_in lcladdr;
- socklen_t lcladdr_len;
- int rc;
- int on = 1;
-
- zmq_assert (type_ == SOCK_STREAM);
-
- // Fill in the localhost address (127.0.0.1).
- memset (&lcladdr, 0, sizeof (lcladdr));
- lcladdr.sin_family = AF_INET;
- lcladdr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- lcladdr.sin_port = 0;
-
- listener = socket (AF_INET, SOCK_STREAM, 0);
- errno_assert (listener != -1);
-
- rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on));
- errno_assert (rc != -1);
-
- rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELACK, &on, sizeof (on));
- errno_assert (rc != -1);
-
- rc = bind(listener, (struct sockaddr*) &lcladdr, sizeof (lcladdr));
- errno_assert (rc != -1);
-
- lcladdr_len = sizeof (lcladdr);
-
- rc = getsockname (listener, (struct sockaddr*) &lcladdr, &lcladdr_len);
- errno_assert (rc != -1);
-
- rc = listen (listener, 1);
- errno_assert (rc != -1);
-
- sv_ [0] = socket (AF_INET, SOCK_STREAM, 0);
- errno_assert (rc != -1);
-
- rc = setsockopt (sv_ [0], IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on));
- errno_assert (rc != -1);
-
- rc = setsockopt (sv_ [0], IPPROTO_TCP, TCP_NODELACK, &on, sizeof (on));
- errno_assert (rc != -1);
-
- rc = connect (sv_ [0], (struct sockaddr*) &lcladdr, sizeof (lcladdr));
- errno_assert (rc != -1);
-
- sv_ [1] = accept (listener, NULL, NULL);
- errno_assert (sv_ [1] != -1);
-
- close (listener);
-
- return 0;
-}
-
-#endif
-
diff --git a/src/signaler.hpp b/src/signaler.hpp
deleted file mode 100644
index 64a1899..0000000
--- a/src/signaler.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __ZMQ_SIGNALER_HPP_INCLUDED__
-#define __ZMQ_SIGNALER_HPP_INCLUDED__
-
-#include <stddef.h>
-
-#include "platform.hpp"
-#include "fd.hpp"
-#include "stdint.hpp"
-#include "config.hpp"
-#include "command.hpp"
-
-namespace zmq
-{
-
- class signaler_t
- {
- public:
-
- signaler_t ();
- ~signaler_t ();
-
- fd_t get_fd ();
- void send (const command_t &cmd_);
- bool recv (command_t *cmd_, bool block_);
-
- private:
-
-#if defined ZMQ_HAVE_OPENVMS
-
- // Whilst OpenVMS supports socketpair - it maps to AF_INET only.
- // Further, it does not set the socket options TCP_NODELAY and
- // TCP_NODELACK which can lead to performance problems. We'll
- // overload the socketpair function for this class.
- //
- // The bug will be fixed in V5.6 ECO4 and beyond. In the
- // meantime, we'll create the socket pair manually.
- static int socketpair (int domain_, int type_, int protocol_,
- int sv_ [2]);
-#endif
-
- // Write & read end of the socketpair.
- fd_t w;
- fd_t r;
-
- // Disable copying of fd_signeler object.
- signaler_t (const signaler_t&);
- void operator = (const signaler_t&);
- };
-
-}
-
-#endif
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index c933954..4cefb6f 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,45 +24,203 @@
#include "../include/zmq.h"
-#include "socket_base.hpp"
-#include "app_thread.hpp"
+#include "platform.hpp"
+
+#if defined ZMQ_HAVE_WINDOWS
+#include "windows.hpp"
+#if defined _MSC_VER
+#include <intrin.h>
+#endif
+#else
+#include <unistd.h>
+#endif
+#include "socket_base.hpp"
#include "zmq_listener.hpp"
#include "zmq_connecter.hpp"
#include "io_thread.hpp"
-#include "session.hpp"
+#include "connect_session.hpp"
#include "config.hpp"
-#include "owned.hpp"
+#include "clock.hpp"
#include "pipe.hpp"
#include "err.hpp"
#include "ctx.hpp"
#include "platform.hpp"
-#include "pgm_sender.hpp"
-#include "pgm_receiver.hpp"
#include "likely.hpp"
#include "uuid.hpp"
-zmq::socket_base_t::socket_base_t (app_thread_t *parent_) :
- object_t (parent_),
- pending_term_acks (0),
+#include "pair.hpp"
+#include "pub.hpp"
+#include "sub.hpp"
+#include "req.hpp"
+#include "rep.hpp"
+#include "pull.hpp"
+#include "push.hpp"
+#include "xreq.hpp"
+#include "xrep.hpp"
+#include "xpub.hpp"
+#include "xsub.hpp"
+
+zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_,
+ uint32_t tid_)
+{
+ socket_base_t *s = NULL;
+ switch (type_) {
+
+ case ZMQ_PAIR:
+ s = new (std::nothrow) pair_t (parent_, tid_);
+ break;
+ case ZMQ_PUB:
+ s = new (std::nothrow) pub_t (parent_, tid_);
+ break;
+ case ZMQ_SUB:
+ s = new (std::nothrow) sub_t (parent_, tid_);
+ break;
+ case ZMQ_REQ:
+ s = new (std::nothrow) req_t (parent_, tid_);
+ break;
+ case ZMQ_REP:
+ s = new (std::nothrow) rep_t (parent_, tid_);
+ break;
+ case ZMQ_XREQ:
+ s = new (std::nothrow) xreq_t (parent_, tid_);
+ break;
+ case ZMQ_XREP:
+ s = new (std::nothrow) xrep_t (parent_, tid_);
+ break;
+ case ZMQ_PULL:
+ s = new (std::nothrow) pull_t (parent_, tid_);
+ break;
+ case ZMQ_PUSH:
+ s = new (std::nothrow) push_t (parent_, tid_);
+ break;
+ case ZMQ_XPUB:
+ s = new (std::nothrow) xpub_t (parent_, tid_);
+ break;
+ case ZMQ_XSUB:
+ s = new (std::nothrow) xsub_t (parent_, tid_);
+ break;
+ default:
+ errno = EINVAL;
+ return NULL;
+ }
+ alloc_assert (s);
+ return s;
+}
+
+zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_) :
+ own_t (parent_, tid_),
+ ctx_terminated (false),
+ destroyed (false),
+ last_tsc (0),
ticks (0),
- rcvmore (false),
- app_thread (parent_),
- shutting_down (false),
- sent_seqnum (0),
- processed_seqnum (0),
- next_ordinal (1)
+ rcvmore (false)
{
}
zmq::socket_base_t::~socket_base_t ()
{
+ zmq_assert (destroyed);
+
+ // Check whether there are no session leaks.
+ sessions_sync.lock ();
+ zmq_assert (sessions.empty ());
+ sessions_sync.unlock ();
+}
+
+zmq::mailbox_t *zmq::socket_base_t::get_mailbox ()
+{
+ return &mailbox;
+}
+
+void zmq::socket_base_t::stop ()
+{
+ // Called by ctx when it is terminated (zmq_term).
+ // 'stop' command is sent from the threads that called zmq_term to
+ // the thread owning the socket. This way, blocking call in the
+ // owner thread can be interrupted.
+ send_stop ();
+}
+
+int zmq::socket_base_t::parse_uri (const char *uri_,
+ std::string &protocol_, std::string &address_)
+{
+ zmq_assert (uri_ != NULL);
+
+ std::string uri (uri_);
+ std::string::size_type pos = uri.find ("://");
+ if (pos == std::string::npos) {
+ errno = EINVAL;
+ return -1;
+ }
+ protocol_ = uri.substr (0, pos);
+ address_ = uri.substr (pos + 3);
+ if (protocol_.empty () || address_.empty ()) {
+ errno = EINVAL;
+ return -1;
+ }
+ return 0;
+}
+
+int zmq::socket_base_t::check_protocol (const std::string &protocol_)
+{
+ // First check out whether the protcol is something we are aware of.
+ if (protocol_ != "inproc" && protocol_ != "ipc" && protocol_ != "tcp" &&
+ protocol_ != "pgm" && protocol_ != "epgm" && protocol_ != "sys") {
+ errno = EPROTONOSUPPORT;
+ return -1;
+ }
+
+ // If 0MQ is not compiled with OpenPGM, pgm and epgm transports
+ // are not avaialble.
+#if !defined ZMQ_HAVE_OPENPGM
+ if (protocol_ == "pgm" || protocol_ == "epgm") {
+ errno = EPROTONOSUPPORT;
+ return -1;
+ }
+#endif
+
+ // IPC transport is not available on Windows and OpenVMS.
+#if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS
+ if (protocol_ == "ipc") {
+ // Unknown protocol.
+ errno = EPROTONOSUPPORT;
+ return -1;
+ }
+#endif
+
+ // Check whether socket type and transport protocol match.
+ // Specifically, multicast protocols can't be combined with
+ // bi-directional messaging patterns (socket types).
+ if ((protocol_ == "pgm" || protocol_ == "epgm") &&
+ options.type != ZMQ_PUB && options.type != ZMQ_SUB &&
+ options.type != ZMQ_XPUB && options.type != ZMQ_XSUB) {
+ errno = ENOCOMPATPROTO;
+ return -1;
+ }
+
+ // Protocol is available.
+ return 0;
+}
+
+void zmq::socket_base_t::attach_pipes (class reader_t *inpipe_,
+ class writer_t *outpipe_, const blob_t &peer_identity_)
+{
+ // If the peer haven't specified it's identity, let's generate one.
+ if (peer_identity_.size ()) {
+ xattach_pipes (inpipe_, outpipe_, peer_identity_);
+ }
+ else {
+ blob_t identity (1, 0);
+ identity.append (uuid_t ().to_blob (), uuid_t::uuid_blob_len);
+ xattach_pipes (inpipe_, outpipe_, identity);
+ }
}
int zmq::socket_base_t::setsockopt (int option_, const void *optval_,
size_t optvallen_)
{
- if (unlikely (app_thread->is_terminated ())) {
+ if (unlikely (ctx_terminated)) {
errno = ETERM;
return -1;
}
@@ -79,7 +238,7 @@ int zmq::socket_base_t::setsockopt (int option_, const void *optval_,
int zmq::socket_base_t::getsockopt (int option_, void *optval_,
size_t *optvallen_)
{
- if (unlikely (app_thread->is_terminated ())) {
+ if (unlikely (ctx_terminated)) {
errno = ETERM;
return -1;
}
@@ -94,271 +253,227 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_,
return 0;
}
+ if (option_ == ZMQ_FD) {
+ if (*optvallen_ < sizeof (fd_t)) {
+ errno = EINVAL;
+ return -1;
+ }
+ *((fd_t*) optval_) = mailbox.get_fd ();
+ *optvallen_ = sizeof (fd_t);
+ return 0;
+ }
+
+ if (option_ == ZMQ_EVENTS) {
+ if (*optvallen_ < sizeof (uint32_t)) {
+ errno = EINVAL;
+ return -1;
+ }
+ int rc = process_commands (false, false);
+ if (rc != 0 && (errno == EINTR || errno == ETERM))
+ return -1;
+ errno_assert (rc == 0);
+ *((uint32_t*) optval_) = 0;
+ if (has_out ())
+ *((uint32_t*) optval_) |= ZMQ_POLLOUT;
+ if (has_in ())
+ *((uint32_t*) optval_) |= ZMQ_POLLIN;
+ *optvallen_ = sizeof (uint32_t);
+ return 0;
+ }
+
return options.getsockopt (option_, optval_, optvallen_);
}
int zmq::socket_base_t::bind (const char *addr_)
{
- if (unlikely (app_thread->is_terminated ())) {
+ if (unlikely (ctx_terminated)) {
errno = ETERM;
return -1;
}
// Parse addr_ string.
- std::string addr_type;
- std::string addr_args;
-
- std::string addr (addr_);
- std::string::size_type pos = addr.find ("://");
-
- if (pos == std::string::npos) {
- errno = EINVAL;
+ std::string protocol;
+ std::string address;
+ int rc = parse_uri (addr_, protocol, address);
+ if (rc != 0)
return -1;
- }
- addr_type = addr.substr (0, pos);
- addr_args = addr.substr (pos + 3);
+ rc = check_protocol (protocol);
+ if (rc != 0)
+ return -1;
- if (addr_type == "inproc")
- return register_endpoint (addr_args.c_str (), this);
+ if (protocol == "inproc" || protocol == "sys") {
+ endpoint_t endpoint = {this, options};
+ return register_endpoint (addr_, endpoint);
+ }
- if (addr_type == "tcp" || addr_type == "ipc") {
+ if (protocol == "tcp" || protocol == "ipc") {
-#if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS
- if (addr_type == "ipc") {
- errno = EPROTONOSUPPORT;
+ // Choose I/O thread to run the listerner in.
+ io_thread_t *io_thread = choose_io_thread (options.affinity);
+ if (!io_thread) {
+ errno = EMTHREAD;
return -1;
}
-#endif
+ // Create and run the listener.
zmq_listener_t *listener = new (std::nothrow) zmq_listener_t (
- choose_io_thread (options.affinity), this, options);
- zmq_assert (listener);
- int rc = listener->set_address (addr_type.c_str(), addr_args.c_str ());
+ io_thread, this, options);
+ alloc_assert (listener);
+ int rc = listener->set_address (protocol.c_str(), address.c_str ());
if (rc != 0) {
delete listener;
return -1;
}
+ launch_child (listener);
- send_plug (listener);
- send_own (this, listener);
return 0;
}
-#if defined ZMQ_HAVE_OPENPGM
- if (addr_type == "pgm" || addr_type == "epgm") {
- // In the case of PGM bind behaves the same like connect.
+ if (protocol == "pgm" || protocol == "epgm") {
+
+ // For convenience's sake, bind can be used interchageable with
+ // connect for PGM and EPGM transports.
return connect (addr_);
}
-#endif
- // Unknown protocol.
- errno = EPROTONOSUPPORT;
+ zmq_assert (false);
return -1;
}
int zmq::socket_base_t::connect (const char *addr_)
{
- if (unlikely (app_thread->is_terminated ())) {
+ if (unlikely (ctx_terminated)) {
errno = ETERM;
return -1;
}
// Parse addr_ string.
- std::string addr_type;
- std::string addr_args;
-
- std::string addr (addr_);
- std::string::size_type pos = addr.find ("://");
-
- if (pos == std::string::npos) {
- errno = EINVAL;
+ std::string protocol;
+ std::string address;
+ int rc = parse_uri (addr_, protocol, address);
+ if (rc != 0)
return -1;
- }
- addr_type = addr.substr (0, pos);
- addr_args = addr.substr (pos + 3);
+ rc = check_protocol (protocol);
+ if (rc != 0)
+ return -1;
- if (addr_type == "inproc") {
+ if (protocol == "inproc" || protocol == "sys") {
// TODO: inproc connect is specific with respect to creating pipes
// as there's no 'reconnect' functionality implemented. Once that
// is in place we should follow generic pipe creation algorithm.
- // Find the peer socket.
- socket_base_t *peer = find_endpoint (addr_args.c_str ());
- if (!peer)
+ // Find the peer endpoint.
+ endpoint_t peer = find_endpoint (addr_);
+ if (!peer.socket)
return -1;
- pipe_t *in_pipe = NULL;
- pipe_t *out_pipe = NULL;
+ reader_t *inpipe_reader = NULL;
+ writer_t *inpipe_writer = NULL;
+ reader_t *outpipe_reader = NULL;
+ writer_t *outpipe_writer = NULL;
+
+ // The total HWM for an inproc connection should be the sum of
+ // the binder's HWM and the connector's HWM. (Similarly for the
+ // SWAP.)
+ int64_t hwm;
+ if (options.hwm == 0 || peer.options.hwm == 0)
+ hwm = 0;
+ else
+ hwm = options.hwm + peer.options.hwm;
+ int64_t swap;
+ if (options.swap == 0 && peer.options.swap == 0)
+ swap = 0;
+ else
+ swap = options.swap + peer.options.swap;
// Create inbound pipe, if required.
- if (options.requires_in) {
- in_pipe = new (std::nothrow) pipe_t (this, peer, options.hwm, options.swap);
- zmq_assert (in_pipe);
- }
+ if (options.requires_in)
+ create_pipe (this, peer.socket, hwm, swap,
+ &inpipe_reader, &inpipe_writer);
// Create outbound pipe, if required.
- if (options.requires_out) {
- out_pipe = new (std::nothrow) pipe_t (peer, this, options.hwm, options.swap);
- zmq_assert (out_pipe);
- }
+ if (options.requires_out)
+ create_pipe (peer.socket, this, hwm, swap,
+ &outpipe_reader, &outpipe_writer);
// Attach the pipes to this socket object.
- attach_pipes (in_pipe ? &in_pipe->reader : NULL,
- out_pipe ? &out_pipe->writer : NULL, blob_t ());
+ attach_pipes (inpipe_reader, outpipe_writer, peer.options.identity);
// Attach the pipes to the peer socket. Note that peer's seqnum
- // was incremented in find_endpoint function. The callee is notified
- // about the fact via the last parameter.
- send_bind (peer, out_pipe ? &out_pipe->reader : NULL,
- in_pipe ? &in_pipe->writer : NULL, options.identity, false);
+ // was incremented in find_endpoint function. We don't need it
+ // increased here.
+ send_bind (peer.socket, outpipe_reader, inpipe_writer,
+ options.identity, false);
return 0;
}
- // Create unnamed session.
+ // Choose the I/O thread to run the session in.
io_thread_t *io_thread = choose_io_thread (options.affinity);
- session_t *session = new (std::nothrow) session_t (io_thread,
- this, options);
- zmq_assert (session);
+ if (!io_thread) {
+ errno = EMTHREAD;
+ return -1;
+ }
+
+ // Create session.
+ connect_session_t *session = new (std::nothrow) connect_session_t (
+ io_thread, this, options, protocol.c_str (), address.c_str ());
+ alloc_assert (session);
- // If 'immediate connect' feature is required, we'll created the pipes
+ // If 'immediate connect' feature is required, we'll create the pipes
// to the session straight away. Otherwise, they'll be created by the
// session once the connection is established.
if (options.immediate_connect) {
- pipe_t *in_pipe = NULL;
- pipe_t *out_pipe = NULL;
+ reader_t *inpipe_reader = NULL;
+ writer_t *inpipe_writer = NULL;
+ reader_t *outpipe_reader = NULL;
+ writer_t *outpipe_writer = NULL;
// Create inbound pipe, if required.
- if (options.requires_in) {
- in_pipe = new (std::nothrow) pipe_t (this, session, options.hwm, options.swap);
- zmq_assert (in_pipe);
-
- }
+ if (options.requires_in)
+ create_pipe (this, session, options.hwm, options.swap,
+ &inpipe_reader, &inpipe_writer);
// Create outbound pipe, if required.
- if (options.requires_out) {
- out_pipe = new (std::nothrow) pipe_t (session, this, options.hwm, options.swap);
- zmq_assert (out_pipe);
- }
+ if (options.requires_out)
+ create_pipe (session, this, options.hwm, options.swap,
+ &outpipe_reader, &outpipe_writer);
// Attach the pipes to the socket object.
- attach_pipes (in_pipe ? &in_pipe->reader : NULL,
- out_pipe ? &out_pipe->writer : NULL, blob_t ());
+ attach_pipes (inpipe_reader, outpipe_writer, blob_t ());
// Attach the pipes to the session object.
- session->attach_pipes (out_pipe ? &out_pipe->reader : NULL,
- in_pipe ? &in_pipe->writer : NULL, blob_t ());
+ session->attach_pipes (outpipe_reader, inpipe_writer, blob_t ());
}
- // Activate the session.
- send_plug (session);
- send_own (this, session);
-
- if (addr_type == "tcp" || addr_type == "ipc") {
-
-#if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS
- // Windows named pipes are not compatible with Winsock API.
- // There's no UNIX domain socket implementation on OpenVMS.
- if (addr_type == "ipc") {
- errno = EPROTONOSUPPORT;
- return -1;
- }
-#endif
-
- // Create the connecter object. Supply it with the session name
- // so that it can bind the new connection to the session once
- // it is established.
- zmq_connecter_t *connecter = new (std::nothrow) zmq_connecter_t (
- choose_io_thread (options.affinity), this, options,
- session->get_ordinal (), false);
- zmq_assert (connecter);
- int rc = connecter->set_address (addr_type.c_str(), addr_args.c_str ());
- if (rc != 0) {
- delete connecter;
- return -1;
- }
- send_plug (connecter);
- send_own (this, connecter);
+ // Activate the session. Make it a child of this socket.
+ launch_child (session);
- return 0;
- }
-
-#if defined ZMQ_HAVE_OPENPGM
- if (addr_type == "pgm" || addr_type == "epgm") {
-
- // If the socket type requires bi-directional communication
- // multicast is not an option (it is uni-directional).
- if (options.requires_in && options.requires_out) {
- errno = ENOCOMPATPROTO;
- return -1;
- }
-
- // For epgm, pgm transport with UDP encapsulation is used.
- bool udp_encapsulation = (addr_type == "epgm");
-
- // At this point we'll create message pipes to the session straight
- // away. There's no point in delaying it as no concept of 'connect'
- // exists with PGM anyway.
- if (options.requires_out) {
-
- // PGM sender.
- pgm_sender_t *pgm_sender = new (std::nothrow) pgm_sender_t (
- choose_io_thread (options.affinity), options);
- zmq_assert (pgm_sender);
-
- int rc = pgm_sender->init (udp_encapsulation, addr_args.c_str ());
- if (rc != 0) {
- delete pgm_sender;
- return -1;
- }
-
- send_attach (session, pgm_sender, blob_t ());
- }
- else if (options.requires_in) {
-
- // PGM receiver.
- pgm_receiver_t *pgm_receiver = new (std::nothrow) pgm_receiver_t (
- choose_io_thread (options.affinity), options);
- zmq_assert (pgm_receiver);
-
- int rc = pgm_receiver->init (udp_encapsulation, addr_args.c_str ());
- if (rc != 0) {
- delete pgm_receiver;
- return -1;
- }
-
- send_attach (session, pgm_receiver, blob_t ());
- }
- else
- zmq_assert (false);
-
- return 0;
- }
-#endif
-
- // Unknown protoco.
- errno = EPROTONOSUPPORT;
- return -1;
+ return 0;
}
int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_)
{
- // Process pending commands, if any.
- if (unlikely (!app_thread->process_commands (false, true))) {
+ if (unlikely (ctx_terminated)) {
errno = ETERM;
return -1;
}
+ // Process pending commands, if any.
+ int rc = process_commands (false, true);
+ if (unlikely (rc != 0))
+ return -1;
+
// At this point we impose the MORE flag on the message.
if (flags_ & ZMQ_SNDMORE)
msg_->flags |= ZMQ_MSG_MORE;
// Try to send the message.
- int rc = xsend (msg_, flags_);
+ rc = xsend (msg_, flags_);
if (rc == 0)
return 0;
@@ -372,10 +487,8 @@ int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_)
while (rc != 0) {
if (errno != EAGAIN)
return -1;
- if (unlikely (!app_thread->process_commands (true, false))) {
- errno = ETERM;
+ if (unlikely (process_commands (true, false) != 0))
return -1;
- }
rc = xsend (msg_, flags_);
}
return 0;
@@ -383,6 +496,11 @@ int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_)
int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
{
+ if (unlikely (ctx_terminated)) {
+ errno = ETERM;
+ return -1;
+ }
+
// Get the message.
int rc = xrecv (msg_, flags_);
int err = errno;
@@ -394,12 +512,10 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
//
// Note that 'recv' uses different command throttling algorithm (the one
// described above) from the one used by 'send'. This is because counting
- // ticks is more efficient than doing rdtsc all the time.
+ // ticks is more efficient than doing RDTSC all the time.
if (++ticks == inbound_poll_rate) {
- if (unlikely (!app_thread->process_commands (false, false))) {
- errno = ETERM;
+ if (unlikely (process_commands (false, false) != 0))
return -1;
- }
ticks = 0;
}
@@ -415,15 +531,14 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
errno = err;
// If the message cannot be fetched immediately, there are two scenarios.
- // For non-blocking recv, commands are processed in case there's a revive
- // command already waiting int a command pipe. If it's not, return EAGAIN.
+ // 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 (errno != EAGAIN)
return -1;
- if (unlikely (!app_thread->process_commands (false, false))) {
- errno = ETERM;
+ if (unlikely (process_commands (false, false) != 0))
return -1;
- }
ticks = 0;
rc = xrecv (msg_, flags_);
@@ -437,15 +552,15 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
// In blocking scenario, commands are processed over and over again until
// we are able to fetch a message.
+ bool block = (ticks != 0);
while (rc != 0) {
if (errno != EAGAIN)
return -1;
- if (unlikely (!app_thread->process_commands (true, false))) {
- errno = ETERM;
+ if (unlikely (process_commands (block, false) != 0))
return -1;
- }
rc = xrecv (msg_, flags_);
ticks = 0;
+ block = true;
}
rcvmore = msg_->flags & ZMQ_MSG_MORE;
@@ -456,74 +571,14 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
int zmq::socket_base_t::close ()
{
- shutting_down = true;
-
- // Let the thread know that the socket is no longer available.
- app_thread->remove_socket (this);
-
- // Pointer to the context must be retrieved before the socket is
- // deallocated. Afterwards it is not available.
- ctx_t *ctx = get_ctx ();
-
- // Unregister all inproc endpoints associated with this socket.
- // From this point we are sure that inc_seqnum won't be called again
- // on this object.
- ctx->unregister_endpoints (this);
-
- // Wait till all undelivered commands are delivered. This should happen
- // very quickly. There's no way to wait here for extensive period of time.
- while (processed_seqnum != sent_seqnum.get ())
- app_thread->process_commands (true, false);
-
- while (true) {
-
- // On third pass of the loop there should be no more I/O objects
- // because all connecters and listerners were destroyed during
- // the first pass and all engines delivered by delayed 'own' commands
- // are destroyed during the second pass.
- if (io_objects.empty () && !pending_term_acks)
- break;
-
- // Send termination request to all associated I/O objects.
- for (io_objects_t::iterator it = io_objects.begin ();
- it != io_objects.end (); it++)
- send_term (*it);
-
- // Move the objects to the list of pending term acks.
- pending_term_acks += io_objects.size ();
- io_objects.clear ();
-
- // Process commands till we get all the termination acknowledgements.
- while (pending_term_acks)
- app_thread->process_commands (true, false);
- }
-
- // Check whether there are no session leaks.
- sessions_sync.lock ();
- zmq_assert (named_sessions.empty ());
- zmq_assert (unnamed_sessions.empty ());
- sessions_sync.unlock ();
-
- delete this;
-
- // This function must be called after the socket is completely deallocated
- // as it may cause termination of the whole 0MQ infrastructure.
- ctx->destroy_socket ();
+ // Transfer the ownership of the socket from this application thread
+ // to the reaper thread which will take care of the rest of shutdown
+ // process.
+ send_reap (this);
return 0;
}
-void zmq::socket_base_t::inc_seqnum ()
-{
- // NB: This function may be called from a different thread!
- sent_seqnum.add (1);
-}
-
-zmq::app_thread_t *zmq::socket_base_t::get_thread ()
-{
- return app_thread;
-}
-
bool zmq::socket_base_t::has_in ()
{
return xhas_in ();
@@ -534,30 +589,30 @@ bool zmq::socket_base_t::has_out ()
return xhas_out ();
}
-bool zmq::socket_base_t::register_session (const blob_t &peer_identity_,
+bool zmq::socket_base_t::register_session (const blob_t &name_,
session_t *session_)
{
sessions_sync.lock ();
- bool registered = named_sessions.insert (
- std::make_pair (peer_identity_, session_)).second;
+ bool registered = sessions.insert (
+ sessions_t::value_type (name_, session_)).second;
sessions_sync.unlock ();
return registered;
}
-void zmq::socket_base_t::unregister_session (const blob_t &peer_identity_)
+void zmq::socket_base_t::unregister_session (const blob_t &name_)
{
sessions_sync.lock ();
- named_sessions_t::iterator it = named_sessions.find (peer_identity_);
- zmq_assert (it != named_sessions.end ());
- named_sessions.erase (it);
+ sessions_t::iterator it = sessions.find (name_);
+ zmq_assert (it != sessions.end ());
+ sessions.erase (it);
sessions_sync.unlock ();
}
-zmq::session_t *zmq::socket_base_t::find_session (const blob_t &peer_identity_)
+zmq::session_t *zmq::socket_base_t::find_session (const blob_t &name_)
{
sessions_sync.lock ();
- named_sessions_t::iterator it = named_sessions.find (peer_identity_);
- if (it == named_sessions.end ()) {
+ sessions_t::iterator it = sessions.find (name_);
+ if (it == sessions.end ()) {
sessions_sync.unlock ();
return NULL;
}
@@ -570,129 +625,164 @@ zmq::session_t *zmq::socket_base_t::find_session (const blob_t &peer_identity_)
return session;
}
-uint64_t zmq::socket_base_t::register_session (session_t *session_)
+void zmq::socket_base_t::start_reaping (poller_t *poller_)
{
- sessions_sync.lock ();
- uint64_t ordinal = next_ordinal;
- next_ordinal++;
- unnamed_sessions.insert (std::make_pair (ordinal, session_));
- sessions_sync.unlock ();
- return ordinal;
+ poller = poller_;
+ handle = poller->add_fd (mailbox.get_fd (), this);
+ poller->set_pollin (handle);
}
-void zmq::socket_base_t::unregister_session (uint64_t ordinal_)
+int zmq::socket_base_t::process_commands (bool block_, bool throttle_)
{
- sessions_sync.lock ();
- unnamed_sessions_t::iterator it = unnamed_sessions.find (ordinal_);
- zmq_assert (it != unnamed_sessions.end ());
- unnamed_sessions.erase (it);
- sessions_sync.unlock ();
-}
+ int rc;
+ command_t cmd;
+ if (block_) {
+ rc = mailbox.recv (&cmd, true);
+ if (rc == -1 && errno == EINTR)
+ return -1;
+ errno_assert (rc == 0);
+ }
+ else {
-zmq::session_t *zmq::socket_base_t::find_session (uint64_t ordinal_)
-{
- sessions_sync.lock ();
+ // Get the CPU's tick counter. If 0, the counter is not available.
+ uint64_t tsc = zmq::clock_t::rdtsc ();
+
+ // Optimised version of command processing - it doesn't have to check
+ // for incoming commands each time. It does so only if certain time
+ // elapsed since last command processing. Command delay varies
+ // depending on CPU speed: It's ~1ms on 3GHz CPU, ~2ms on 1.5GHz CPU
+ // etc. The optimisation makes sense only on platforms where getting
+ // a timestamp is a very cheap operation (tens of nanoseconds).
+ if (tsc && throttle_) {
+
+ // Check whether TSC haven't jumped backwards (in case of migration
+ // between CPU cores) and whether certain time have elapsed since
+ // last command processing. If it didn't do nothing.
+ if (tsc >= last_tsc && tsc - last_tsc <= max_command_delay)
+ return 0;
+ last_tsc = tsc;
+ }
- unnamed_sessions_t::iterator it = unnamed_sessions.find (ordinal_);
- if (it == unnamed_sessions.end ()) {
- sessions_sync.unlock ();
- return NULL;
+ // Check whether there are any commands pending for this thread.
+ rc = mailbox.recv (&cmd, false);
}
- session_t *session = it->second;
- // Prepare the session for subsequent attach command.
- session->inc_seqnum ();
+ // Process all the commands available at the moment.
+ while (true) {
+ if (rc == -1 && errno == EAGAIN)
+ break;
+ if (rc == -1 && errno == EINTR)
+ return -1;
+ errno_assert (rc == 0);
+ cmd.destination->process_command (cmd);
+ rc = mailbox.recv (&cmd, false);
+ }
- sessions_sync.unlock ();
- return session;
+ if (ctx_terminated) {
+ errno = ETERM;
+ return -1;
+ }
+
+ return 0;
}
-void zmq::socket_base_t::kill (reader_t *pipe_)
+void zmq::socket_base_t::process_stop ()
{
- xkill (pipe_);
+ // Here, someone have called zmq_term while the socket was still alive.
+ // We'll remember the fact so that any blocking call is interrupted and any
+ // further attempt to use the socket will return ETERM. The user is still
+ // responsible for calling zmq_close on the socket though!
+ ctx_terminated = true;
}
-void zmq::socket_base_t::revive (reader_t *pipe_)
+void zmq::socket_base_t::process_bind (reader_t *in_pipe_, writer_t *out_pipe_,
+ const blob_t &peer_identity_)
{
- xrevive (pipe_);
+ attach_pipes (in_pipe_, out_pipe_, peer_identity_);
}
-void zmq::socket_base_t::revive (writer_t *pipe_)
+void zmq::socket_base_t::process_unplug ()
{
- xrevive (pipe_);
}
-void zmq::socket_base_t::attach_pipes (class reader_t *inpipe_,
- class writer_t *outpipe_, const blob_t &peer_identity_)
+void zmq::socket_base_t::process_term (int linger_)
{
- if (inpipe_)
- inpipe_->set_endpoint (this);
- if (outpipe_)
- outpipe_->set_endpoint (this);
+ // Unregister all inproc endpoints associated with this socket.
+ // Doing this we make sure that no new pipes from other sockets (inproc)
+ // will be initiated.
+ unregister_endpoints (this);
- // If the peer haven't specified it's identity, let's generate one.
- if (peer_identity_.size ()) {
- xattach_pipes (inpipe_, outpipe_, peer_identity_);
- }
- else {
- blob_t identity (1, 0);
- identity.append (uuid_t ().to_blob (), uuid_t::uuid_blob_len);
- xattach_pipes (inpipe_, outpipe_, identity);
- }
+ // Continue the termination process immediately.
+ own_t::process_term (linger_);
}
-void zmq::socket_base_t::detach_inpipe (class reader_t *pipe_)
+void zmq::socket_base_t::process_destroy ()
{
- xdetach_inpipe (pipe_);
- pipe_->set_endpoint (NULL); // ?
+ destroyed = true;
}
-void zmq::socket_base_t::detach_outpipe (class writer_t *pipe_)
+int zmq::socket_base_t::xsetsockopt (int option_, const void *optval_,
+ size_t optvallen_)
{
- xdetach_outpipe (pipe_);
- pipe_->set_endpoint (NULL); // ?
+ errno = EINVAL;
+ return -1;
}
-void zmq::socket_base_t::process_own (owned_t *object_)
+bool zmq::socket_base_t::xhas_out ()
{
- io_objects.insert (object_);
+ return false;
}
-void zmq::socket_base_t::process_bind (reader_t *in_pipe_, writer_t *out_pipe_,
- const blob_t &peer_identity_)
+int zmq::socket_base_t::xsend (zmq_msg_t *msg_, int options_)
{
- attach_pipes (in_pipe_, out_pipe_, peer_identity_);
+ errno = ENOTSUP;
+ return -1;
}
-void zmq::socket_base_t::process_term_req (owned_t *object_)
+bool zmq::socket_base_t::xhas_in ()
{
- // When shutting down we can ignore termination requests from owned
- // objects. They are going to be terminated anyway.
- if (shutting_down)
- return;
-
- // If I/O object is well and alive ask it to terminate.
- io_objects_t::iterator it = std::find (io_objects.begin (),
- io_objects.end (), object_);
+ return false;
+}
- // If not found, we assume that termination request was already sent to
- // the object so we can sagely ignore the request.
- if (it == io_objects.end ())
- return;
+int zmq::socket_base_t::xrecv (zmq_msg_t *msg_, int options_)
+{
+ errno = ENOTSUP;
+ return -1;
+}
- pending_term_acks++;
- io_objects.erase (it);
- send_term (object_);
+void zmq::socket_base_t::in_event ()
+{
+ // Process any commands from other threads/sockets that may be available
+ // at the moment. Ultimately, socket will be destroyed.
+ process_commands (false, false);
+ check_destroy ();
}
-void zmq::socket_base_t::process_term_ack ()
+void zmq::socket_base_t::out_event ()
{
- zmq_assert (pending_term_acks);
- pending_term_acks--;
+ zmq_assert (false);
}
-void zmq::socket_base_t::process_seqnum ()
+void zmq::socket_base_t::timer_event (int id_)
{
- processed_seqnum++;
+ zmq_assert (false);
}
+void zmq::socket_base_t::check_destroy ()
+{
+ // If the object was already marked as destroyed, finish the deallocation.
+ if (destroyed) {
+
+ // Remove the socket from the reaper's poller.
+ poller->rm_fd (handle);
+
+ // Remove the socket from the context.
+ destroy_socket (this);
+
+ // Notify the reaper about the fact.
+ send_reaped ();
+
+ // Deallocate.
+ own_t::process_destroy ();
+ }
+}
diff --git a/src/socket_base.hpp b/src/socket_base.hpp
index 3d95cec..15ac83c 100644
--- a/src/socket_base.hpp
+++ b/src/socket_base.hpp
@@ -1,50 +1,65 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_SOCKET_BASE_HPP_INCLUDED__
#define __ZMQ_SOCKET_BASE_HPP_INCLUDED__
-#include <set>
#include <map>
#include <vector>
#include "../include/zmq.h"
-#include "i_endpoint.hpp"
-#include "object.hpp"
-#include "yarray_item.hpp"
+#include "own.hpp"
+#include "array.hpp"
#include "mutex.hpp"
-#include "options.hpp"
#include "stdint.hpp"
+#include "poller.hpp"
#include "atomic_counter.hpp"
+#include "i_poll_events.hpp"
+#include "mailbox.hpp"
#include "stdint.hpp"
#include "blob.hpp"
+#include "own.hpp"
namespace zmq
{
class socket_base_t :
- public object_t, public i_endpoint, public yarray_item_t
+ public own_t,
+ public array_item_t,
+ public i_poll_events
{
+ friend class reaper_t;
+
public:
- socket_base_t (class app_thread_t *parent_);
+ // Create a socket of a specified type.
+ static socket_base_t *create (int type_, class ctx_t *parent_,
+ uint32_t tid_);
+
+ // Returns the mailbox associated with this socket.
+ mailbox_t *get_mailbox ();
+
+ // Interrupt blocking call if the socket is stuck in one.
+ // This function can be called from a different thread!
+ void stop ();
// Interface for communication with the API layer.
int setsockopt (int option_, const void *optval_, size_t optvallen_);
@@ -55,88 +70,113 @@ namespace zmq
int recv (zmq_msg_t *msg_, int flags_);
int close ();
- // When another owned object wants to send command to this object
- // it calls this function to let it know it should not shut down
- // before the command is delivered.
- void inc_seqnum ();
-
- // This function is used by the polling mechanism to determine
- // whether the socket belongs to the application thread the poll
- // is called from.
- class app_thread_t *get_thread ();
-
// These functions are used by the polling mechanism to determine
// which events are to be reported from this socket.
bool has_in ();
bool has_out ();
- // The list of sessions cannot be accessed via inter-thread
- // commands as it is unacceptable to wait for the completion of the
- // action till user application yields control of the application
- // thread to 0MQ. Locking is used instead.
- // There are two distinct types of sessions: those identified by name
- // and those identified by ordinal number. Thus two sets of session
- // management functions.
- bool register_session (const blob_t &peer_identity_,
- class session_t *session_);
- void unregister_session (const blob_t &peer_identity_);
- class session_t *find_session (const blob_t &peer_identity_);
- uint64_t register_session (class session_t *session_);
- void unregister_session (uint64_t ordinal_);
- class session_t *find_session (uint64_t ordinal_);
-
- // i_endpoint interface implementation.
- void attach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
- const blob_t &peer_identity_);
- void detach_inpipe (class reader_t *pipe_);
- void detach_outpipe (class writer_t *pipe_);
- void kill (class reader_t *pipe_);
- void revive (class reader_t *pipe_);
- void revive (class writer_t *pipe_);
+ // Registry of named sessions.
+ bool register_session (const blob_t &name_, class session_t *session_);
+ void unregister_session (const blob_t &name_);
+ class session_t *find_session (const blob_t &name_);
+
+ // i_reader_events interface implementation.
+ void activated (class reader_t *pipe_);
+ void terminated (class reader_t *pipe_);
+
+ // i_writer_events interface implementation.
+ void activated (class writer_t *pipe_);
+ void terminated (class writer_t *pipe_);
+
+ // Using this function reaper thread ask the socket to regiter with
+ // its poller.
+ void start_reaping (poller_t *poller_);
+
+ // i_poll_events implementation. This interface is used when socket
+ // is handled by the poller in the reaper thread.
+ void in_event ();
+ void out_event ();
+ void timer_event (int id_);
+
+ // To be called after processing commands or invoking any command
+ // handlers explicitly. If required, it will deallocate the socket.
+ void check_destroy ();
protected:
- // Destructor is protected. Socket is closed using 'close' function.
+ socket_base_t (class ctx_t *parent_, uint32_t tid_);
virtual ~socket_base_t ();
- // Pipe management is done by individual socket types.
+ // Concrete algorithms for the x- methods are to be defined by
+ // individual socket types.
virtual void xattach_pipes (class reader_t *inpipe_,
class writer_t *outpipe_, const blob_t &peer_identity_) = 0;
- virtual void xdetach_inpipe (class reader_t *pipe_) = 0;
- virtual void xdetach_outpipe (class writer_t *pipe_) = 0;
- virtual void xkill (class reader_t *pipe_) = 0;
- virtual void xrevive (class reader_t *pipe_) = 0;
- virtual void xrevive (class writer_t *pipe_) = 0;
- // Actual algorithms are to be defined by individual socket types.
+ // The default implementation assumes there are no specific socket
+ // options for the particular socket type. If not so, overload this
+ // method.
virtual int xsetsockopt (int option_, const void *optval_,
- size_t optvallen_) = 0;
- virtual int xsend (zmq_msg_t *msg_, int options_) = 0;
- virtual int xrecv (zmq_msg_t *msg_, int options_) = 0;
- virtual bool xhas_in () = 0;
- virtual bool xhas_out () = 0;
+ size_t optvallen_);
+
+ // The default implementation assumes that send is not supported.
+ virtual bool xhas_out ();
+ virtual int xsend (zmq_msg_t *msg_, int options_);
+
+ // The default implementation assumes that recv in not supported.
+ virtual bool xhas_in ();
+ virtual int xrecv (zmq_msg_t *msg_, int options_);
- // Socket options.
- options_t options;
+ // We are declaring termination handler as protected so that
+ // individual socket types can hook into the termination process
+ // by overloading it.
+ void process_term (int linger_);
+
+ // Delay actual destruction of the socket.
+ void process_destroy ();
private:
+ // If true, associated context was already terminated.
+ bool ctx_terminated;
+
+ // If true, object should have been already destroyed. However,
+ // destruction is delayed while we unwind the stack to the point
+ // where it doesn't intersect the object being destroyed.
+ bool destroyed;
+
+ // Parse URI string.
+ int parse_uri (const char *uri_, std::string &protocol_,
+ std::string &address_);
+
+ // Check whether transport protocol, as specified in connect or
+ // bind, is available and compatible with the socket type.
+ int check_protocol (const std::string &protocol_);
+
+ // If no identity set generate one and call xattach_pipes ().
+ void attach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
+ const blob_t &peer_identity_);
+
+ // Processes commands sent to this socket (if any). If 'block' is
+ // set to true, returns only after at least one command was processed.
+ // If throttle argument is true, commands are processed at most once
+ // in a predefined time period.
+ int process_commands (bool block_, bool throttle_);
+
// Handlers for incoming commands.
- void process_own (class owned_t *object_);
+ void process_stop ();
void process_bind (class reader_t *in_pipe_, class writer_t *out_pipe_,
const blob_t &peer_identity_);
- void process_term_req (class owned_t *object_);
- void process_term_ack ();
- void process_seqnum ();
+ void process_unplug ();
- // List of all I/O objects owned by this socket. The socket is
- // responsible for deallocating them before it quits.
- typedef std::set <class owned_t*> io_objects_t;
- io_objects_t io_objects;
+ // Socket's mailbox object.
+ mailbox_t mailbox;
- // Number of I/O objects that were already asked to terminate
- // but haven't acknowledged it yet.
- int pending_term_acks;
+ // Reaper's poller and handle of this socket within it.
+ poller_t *poller;
+ poller_t::handle_t handle;
+
+ // Timestamp of when commands were processed the last time.
+ uint64_t last_tsc;
// Number of messages received since last command processing.
int ticks;
@@ -144,32 +184,16 @@ namespace zmq
// If true there's a half-read message in the socket.
bool rcvmore;
- // Application thread the socket lives in.
- class app_thread_t *app_thread;
-
- // If true, socket is already shutting down. No new work should be
- // started.
- bool shutting_down;
-
- // Sequence number of the last command sent to this object.
- atomic_counter_t sent_seqnum;
-
- // Sequence number of the last command processed by this object.
- uint64_t processed_seqnum;
-
- // Lists of existing sessions. This lists are never referenced from
- // within the socket, instead they are used by I/O objects owned by
+ // Lists of existing sessions. This list is never referenced from
+ // within the socket, instead it is used by objects owned by
// the socket. As those objects can live in different threads,
// the access is synchronised by mutex.
- typedef std::map <blob_t, session_t*> named_sessions_t;
- named_sessions_t named_sessions;
- typedef std::map <uint64_t, session_t*> unnamed_sessions_t;
- unnamed_sessions_t unnamed_sessions;
- uint64_t next_ordinal;
+ typedef std::map <blob_t, session_t*> sessions_t;
+ sessions_t sessions;
mutex_t sessions_sync;
socket_base_t (const socket_base_t&);
- void operator = (const socket_base_t&);
+ const socket_base_t &operator = (const socket_base_t&);
};
}
diff --git a/src/stdint.hpp b/src/stdint.hpp
index fe1bff6..73186d3 100644
--- a/src/stdint.hpp
+++ b/src/stdint.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,7 +23,7 @@
#include "platform.hpp"
-#ifdef ZMQ_HAVE_SOLARIS
+#if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS
#include <inttypes.h>
@@ -53,14 +54,6 @@ typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
#endif
-#elif defined ZMQ_HAVE_OPENVMS
-
-#include <types.h>
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-
#else
#include <stdint.h>
diff --git a/src/streamer.cpp b/src/streamer.cpp
deleted file mode 100644
index 7c03365..0000000
--- a/src/streamer.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "../include/zmq.h"
-
-#include "streamer.hpp"
-#include "socket_base.hpp"
-#include "likely.hpp"
-#include "err.hpp"
-
-int zmq::streamer (socket_base_t *insocket_, socket_base_t *outsocket_)
-{
- zmq_msg_t msg;
- int rc = zmq_msg_init (&msg);
- errno_assert (rc == 0);
-
- int64_t more;
- size_t more_sz = sizeof (more);
-
- while (true) {
- rc = insocket_->recv (&msg, 0);
- if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
- }
-
- rc = insocket_->getsockopt (ZMQ_RCVMORE, &more, &more_sz);
- if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
- }
-
- rc = outsocket_->send (&msg, more ? ZMQ_SNDMORE : 0);
- if (unlikely (rc < 0)) {
- if (errno == ETERM)
- return -1;
- errno_assert (false);
- }
- }
-
- return 0;
-}
diff --git a/src/sub.cpp b/src/sub.cpp
index eeb50cd..aef7369 100644
--- a/src/sub.cpp
+++ b/src/sub.cpp
@@ -1,191 +1,75 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <string.h>
-
#include "../include/zmq.h"
#include "sub.hpp"
-#include "err.hpp"
-zmq::sub_t::sub_t (class app_thread_t *parent_) :
- socket_base_t (parent_),
- has_message (false),
- more (false)
+zmq::sub_t::sub_t (class ctx_t *parent_, uint32_t tid_) :
+ xsub_t (parent_, tid_)
{
- options.requires_in = true;
- options.requires_out = false;
- zmq_msg_init (&message);
+ options.type = ZMQ_SUB;
}
zmq::sub_t::~sub_t ()
{
- zmq_msg_close (&message);
-}
-
-void zmq::sub_t::xattach_pipes (class reader_t *inpipe_,
- class writer_t *outpipe_, const blob_t &peer_identity_)
-{
- zmq_assert (inpipe_ && !outpipe_);
- fq.attach (inpipe_);
-}
-
-void zmq::sub_t::xdetach_inpipe (class reader_t *pipe_)
-{
- zmq_assert (pipe_);
- fq.detach (pipe_);
-}
-
-void zmq::sub_t::xdetach_outpipe (class writer_t *pipe_)
-{
- // SUB socket is read-only thus there should be no outpipes.
- zmq_assert (false);
-}
-
-void zmq::sub_t::xkill (class reader_t *pipe_)
-{
- fq.kill (pipe_);
-}
-
-void zmq::sub_t::xrevive (class reader_t *pipe_)
-{
- fq.revive (pipe_);
-}
-
-void zmq::sub_t::xrevive (class writer_t *pipe_)
-{
- zmq_assert (false);
}
int zmq::sub_t::xsetsockopt (int option_, const void *optval_,
size_t optvallen_)
{
- if (option_ == ZMQ_SUBSCRIBE) {
- subscriptions.add ((unsigned char*) optval_, optvallen_);
- return 0;
- }
-
- if (option_ == ZMQ_UNSUBSCRIBE) {
- if (!subscriptions.rm ((unsigned char*) optval_, optvallen_)) {
- errno = EINVAL;
- return -1;
- }
- return 0;
+ if (option_ != ZMQ_SUBSCRIBE && option_ != ZMQ_UNSUBSCRIBE) {
+ errno = EINVAL;
+ return -1;
}
- errno = EINVAL;
- return -1;
+ // Create the subscription message.
+ zmq_msg_t msg;
+ zmq_msg_init_size (&msg, optvallen_ + 1);
+ unsigned char *data = (unsigned char*) zmq_msg_data (&msg);
+ if (option_ == ZMQ_SUBSCRIBE)
+ *data = 1;
+ else if (option_ == ZMQ_UNSUBSCRIBE)
+ *data = 0;
+ memcpy (data + 1, optval_, optvallen_);
+
+ // Pass it further on in the stack.
+ int err = 0;
+ int rc = xsub_t::xsend (&msg, 0);
+ if (rc != 0)
+ err = errno;
+ zmq_msg_close (&msg);
+ if (rc != 0)
+ errno = err;
+ return rc;
}
-int zmq::sub_t::xsend (zmq_msg_t *msg_, int flags_)
+int zmq::sub_t::xsend (zmq_msg_t *msg_, int options_)
{
+ // Overload the XSUB's send.
errno = ENOTSUP;
return -1;
}
-int zmq::sub_t::xrecv (zmq_msg_t *msg_, int flags_)
-{
- // If there's already a message prepared by a previous call to zmq_poll,
- // return it straight ahead.
- if (has_message) {
- zmq_msg_move (msg_, &message);
- has_message = false;
- more = msg_->flags & ZMQ_MSG_MORE;
- return 0;
- }
-
- // TODO: This can result in infinite loop in the case of continuous
- // stream of non-matching messages which breaks the non-blocking recv
- // semantics.
- while (true) {
-
- // Get a message using fair queueing algorithm.
- int rc = fq.recv (msg_, flags_);
-
- // If there's no message available, return immediately.
- // The same when error occurs.
- if (rc != 0)
- return -1;
-
- // Check whether the message matches at least one subscription.
- // Non-initial parts of the message are passed
- if (more || match (msg_)) {
- more = msg_->flags & ZMQ_MSG_MORE;
- return 0;
- }
-
- // Message doesn't match. Pop any remaining parts of the message
- // from the pipe.
- while (msg_->flags & ZMQ_MSG_MORE) {
- rc = fq.recv (msg_, ZMQ_NOBLOCK);
- zmq_assert (rc == 0);
- }
- }
-}
-
-bool zmq::sub_t::xhas_in ()
-{
- // There are subsequent parts of the partly-read message available.
- if (more)
- return true;
-
- // If there's already a message prepared by a previous call to zmq_poll,
- // return straight ahead.
- if (has_message)
- return true;
-
- // TODO: This can result in infinite loop in the case of continuous
- // stream of non-matching messages.
- while (true) {
-
- // Get a message using fair queueing algorithm.
- int rc = fq.recv (&message, ZMQ_NOBLOCK);
-
- // If there's no message available, return immediately.
- // The same when error occurs.
- if (rc != 0) {
- zmq_assert (errno == EAGAIN);
- return false;
- }
-
- // Check whether the message matches at least one subscription.
- if (match (&message)) {
- has_message = true;
- return true;
- }
-
- // Message doesn't match. Pop any remaining parts of the message
- // from the pipe.
- while (message.flags & ZMQ_MSG_MORE) {
- rc = fq.recv (&message, ZMQ_NOBLOCK);
- zmq_assert (rc == 0);
- }
- }
-}
-
bool zmq::sub_t::xhas_out ()
{
+ // Overload the XSUB's send.
return false;
}
-
-bool zmq::sub_t::match (zmq_msg_t *msg_)
-{
- return subscriptions.check ((unsigned char*) zmq_msg_data (msg_),
- zmq_msg_size (msg_));
-}
diff --git a/src/sub.hpp b/src/sub.hpp
index 7b997c9..d1f467d 100644
--- a/src/sub.hpp
+++ b/src/sub.hpp
@@ -1,79 +1,48 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_SUB_HPP_INCLUDED__
#define __ZMQ_SUB_HPP_INCLUDED__
-#include "../include/zmq.h"
-
-#include "prefix_tree.hpp"
-#include "socket_base.hpp"
-#include "fq.hpp"
+#include "xsub.hpp"
namespace zmq
{
- class sub_t : public socket_base_t
+ class sub_t : public xsub_t
{
public:
- sub_t (class app_thread_t *parent_);
+ sub_t (class ctx_t *parent_, uint32_t tid_);
~sub_t ();
protected:
- // Overloads of functions from socket_base_t.
- void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
- const blob_t &peer_identity_);
- void xdetach_inpipe (class reader_t *pipe_);
- void xdetach_outpipe (class writer_t *pipe_);
- void xkill (class reader_t *pipe_);
- void xrevive (class reader_t *pipe_);
- void xrevive (class writer_t *pipe_);
int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
- int xsend (zmq_msg_t *msg_, int flags_);
- int xrecv (zmq_msg_t *msg_, int flags_);
- bool xhas_in ();
- bool xhas_out ();
+ int xsend (zmq_msg_t *msg_, int options_);
+ bool xhas_out ();
private:
- // Check whether the message matches at least one subscription.
- bool match (zmq_msg_t *msg_);
-
- // Fair queueing object for inbound pipes.
- fq_t fq;
-
- // The repository of subscriptions.
- prefix_tree_t subscriptions;
-
- // If true, 'message' contains a matching message to return on the
- // next recv call.
- bool has_message;
- zmq_msg_t message;
-
- // If true, part of a multipart message was already received, but
- // there are following parts still waiting.
- bool more;
-
sub_t (const sub_t&);
- void operator = (const sub_t&);
+ const sub_t &operator = (const sub_t&);
};
}
diff --git a/src/msg_store.cpp b/src/swap.cpp
index aaf6dbe..936f30e 100644
--- a/src/msg_store.cpp
+++ b/src/swap.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -35,32 +36,33 @@
#include <sstream>
#include <algorithm>
+#include "swap.hpp"
+#include "config.hpp"
#include "atomic_counter.hpp"
-#include "msg_store.hpp"
#include "err.hpp"
-zmq::msg_store_t::msg_store_t (int64_t filesize_, size_t block_size_) :
+zmq::swap_t::swap_t (int64_t filesize_) :
fd (-1),
filesize (filesize_),
file_pos (0),
write_pos (0),
read_pos (0),
- block_size (block_size_),
+ block_size (swap_block_size),
write_buf_start_addr (0)
{
zmq_assert (filesize > 0);
zmq_assert (block_size > 0);
buf1 = new (std::nothrow) char [block_size];
- zmq_assert (buf1);
+ alloc_assert (buf1);
buf2 = new (std::nothrow) char [block_size];
- zmq_assert (buf2);
+ alloc_assert (buf2);
read_buf = write_buf = buf1;
}
-zmq::msg_store_t::~msg_store_t ()
+zmq::swap_t::~swap_t ()
{
delete [] buf1;
delete [] buf2;
@@ -83,7 +85,7 @@ zmq::msg_store_t::~msg_store_t ()
errno_assert (rc == 0);
}
-int zmq::msg_store_t::init ()
+int zmq::swap_t::init ()
{
static zmq::atomic_counter_t seqnum (0);
@@ -116,7 +118,7 @@ int zmq::msg_store_t::init ()
return 0;
}
-bool zmq::msg_store_t::store (zmq_msg_t *msg_)
+bool zmq::swap_t::store (zmq_msg_t *msg_)
{
size_t msg_size = zmq_msg_size (msg_);
@@ -138,7 +140,7 @@ bool zmq::msg_store_t::store (zmq_msg_t *msg_)
return true;
}
-void zmq::msg_store_t::fetch (zmq_msg_t *msg_)
+void zmq::swap_t::fetch (zmq_msg_t *msg_)
{
// There must be at least one message available.
zmq_assert (read_pos != write_pos);
@@ -157,12 +159,12 @@ void zmq::msg_store_t::fetch (zmq_msg_t *msg_)
copy_from_file (zmq_msg_data (msg_), msg_size);
}
-void zmq::msg_store_t::commit ()
+void zmq::swap_t::commit ()
{
commit_pos = write_pos;
}
-void zmq::msg_store_t::rollback ()
+void zmq::swap_t::rollback ()
{
if (commit_pos == write_pos || read_pos == write_pos)
return;
@@ -183,17 +185,30 @@ void zmq::msg_store_t::rollback ()
write_pos = commit_pos;
}
-bool zmq::msg_store_t::empty ()
+bool zmq::swap_t::empty ()
{
return read_pos == write_pos;
}
-bool zmq::msg_store_t::full ()
+/*
+bool zmq::swap_t::full ()
{
- return buffer_space () == 1;
+ // Check that at least the message size can be written to the swap.
+ return buffer_space () < (int64_t) (sizeof (size_t) + 1);
}
+*/
+
+bool zmq::swap_t::fits (zmq_msg_t *msg_)
+{
+ // Check whether whole binary representation of the message
+ // fits into the swap.
+ size_t msg_size = zmq_msg_size (msg_);
+ if (buffer_space () <= (int64_t) (sizeof msg_size + 1 + msg_size))
+ return false;
+ return true;
+ }
-void zmq::msg_store_t::copy_from_file (void *buffer_, size_t count_)
+void zmq::swap_t::copy_from_file (void *buffer_, size_t count_)
{
char *dest_ptr = (char *) buffer_;
size_t chunk_size, remainder = count_;
@@ -217,7 +232,7 @@ void zmq::msg_store_t::copy_from_file (void *buffer_, size_t count_)
}
}
-void zmq::msg_store_t::copy_to_file (const void *buffer_, size_t count_)
+void zmq::swap_t::copy_to_file (const void *buffer_, size_t count_)
{
char *source_ptr = (char *) buffer_;
size_t chunk_size, remainder = count_;
@@ -246,7 +261,7 @@ void zmq::msg_store_t::copy_to_file (const void *buffer_, size_t count_)
}
}
-void zmq::msg_store_t::fill_buf (char *buf, int64_t pos)
+void zmq::swap_t::fill_buf (char *buf, int64_t pos)
{
if (file_pos != pos) {
#ifdef ZMQ_HAVE_WINDOWS
@@ -264,7 +279,8 @@ void zmq::msg_store_t::fill_buf (char *buf, int64_t pos)
#ifdef ZMQ_HAVE_WINDOWS
int rc = _read (fd, &buf [octets_stored], octets_total - octets_stored);
#else
- ssize_t rc = read (fd, &buf [octets_stored], octets_total - octets_stored);
+ ssize_t rc = read (fd, &buf [octets_stored],
+ octets_total - octets_stored);
#endif
errno_assert (rc > 0);
octets_stored += rc;
@@ -272,7 +288,7 @@ void zmq::msg_store_t::fill_buf (char *buf, int64_t pos)
file_pos += octets_total;
}
-void zmq::msg_store_t::save_write_buf ()
+void zmq::swap_t::save_write_buf ()
{
if (file_pos != write_buf_start_addr) {
#ifdef ZMQ_HAVE_WINDOWS
@@ -288,9 +304,11 @@ void zmq::msg_store_t::save_write_buf ()
while (octets_stored < octets_total) {
#ifdef ZMQ_HAVE_WINDOWS
- int rc = _write (fd, &write_buf [octets_stored], octets_total - octets_stored);
+ int rc = _write (fd, &write_buf [octets_stored],
+ octets_total - octets_stored);
#else
- ssize_t rc = write (fd, &write_buf [octets_stored], octets_total - octets_stored);
+ ssize_t rc = write (fd, &write_buf [octets_stored],
+ octets_total - octets_stored);
#endif
errno_assert (rc > 0);
octets_stored += rc;
@@ -298,7 +316,7 @@ void zmq::msg_store_t::save_write_buf ()
file_pos += octets_total;
}
-int64_t zmq::msg_store_t::buffer_space ()
+int64_t zmq::swap_t::buffer_space ()
{
if (write_pos < read_pos)
return read_pos - write_pos;
diff --git a/src/msg_store.hpp b/src/swap.hpp
index 765fc60..ad2bcc3 100644
--- a/src/msg_store.hpp
+++ b/src/swap.hpp
@@ -1,24 +1,25 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __ZMQ_MSG_STORE_HPP_INCLUDED__
-#define __ZMQ_MSG_STORE_HPP_INCLUDED__
+#ifndef __ZMQ_SWAP_HPP_INCLUDED__
+#define __ZMQ_SWAP_HPP_INCLUDED__
#include "../include/zmq.h"
@@ -28,39 +29,43 @@
namespace zmq
{
- // This class implements a message store. Messages are retrieved from
- // the store in the same order as they entered it.
+ // This class implements a message swap. Messages are retrieved from
+ // the swap in the same order as they entered it.
- class msg_store_t
+ class swap_t
{
public:
enum { default_block_size = 8192 };
- // Creates message store.
- msg_store_t (int64_t filesize_, size_t block_size_ = default_block_size);
+ // Creates the swap.
+ swap_t (int64_t filesize_);
- ~msg_store_t ();
+ ~swap_t ();
int init ();
- // Stores the message into the message store. The function
- // returns false if the message store is full; true otherwise.
+ // Stores the message into the swap. The function
+ // returns false if the swap is full; true otherwise.
bool store (zmq_msg_t *msg_);
- // Fetches the oldest message from the message store. It is an error
- // to call this function when the message store is empty.
+ // Fetches the oldest message from the swap. It is an error
+ // to call this function when the swap is empty.
void fetch (zmq_msg_t *msg_);
void commit ();
void rollback ();
- // Returns true if the message store is empty; false otherwise.
+ // Returns true if the swap is empty; false otherwise.
bool empty ();
- // Returns true if and only if the store is full.
- bool full ();
+
+// // Returns true if and only if the swap is full.
+// bool full ();
+
+ // Returns true if the message fits into swap.
+ bool fits (zmq_msg_t *msg_);
private:
@@ -107,6 +112,10 @@ namespace zmq
char *write_buf;
int64_t write_buf_start_addr;
+
+ // Disable copying of the swap object.
+ swap_t (const swap_t&);
+ const swap_t &operator = (const swap_t&);
};
}
diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp
index dee71be..0c1581d 100644
--- a/src/tcp_connecter.cpp
+++ b/src/tcp_connecter.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/tcp_connecter.hpp b/src/tcp_connecter.hpp
index f1a124f..06641e5 100644
--- a/src/tcp_connecter.hpp
+++ b/src/tcp_connecter.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -72,7 +73,7 @@ namespace zmq
fd_t s;
tcp_connecter_t (const tcp_connecter_t&);
- void operator = (const tcp_connecter_t&);
+ const tcp_connecter_t &operator = (const tcp_connecter_t&);
};
}
diff --git a/src/tcp_listener.cpp b/src/tcp_listener.cpp
index a62bc04..205ddc1 100644
--- a/src/tcp_listener.cpp
+++ b/src/tcp_listener.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -30,6 +31,7 @@
#ifdef ZMQ_HAVE_WINDOWS
zmq::tcp_listener_t::tcp_listener_t () :
+ has_file (false),
s (retired_fd)
{
memset (&addr, 0, sizeof (addr));
@@ -42,7 +44,8 @@ zmq::tcp_listener_t::~tcp_listener_t ()
close ();
}
-int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
+int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_,
+ int backlog_)
{
// IPC protocol is not supported on Windows platform.
if (strcmp (protocol_, "tcp") != 0 ) {
@@ -81,7 +84,7 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
}
// Listen for incomming connections.
- rc = listen (s, 1);
+ rc = listen (s, backlog_);
if (rc == SOCKET_ERROR) {
wsa_error_to_errno ();
return -1;
@@ -150,6 +153,7 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
#endif
zmq::tcp_listener_t::tcp_listener_t () :
+ has_file (false),
s (retired_fd)
{
memset (&addr, 0, sizeof (addr));
@@ -161,7 +165,8 @@ zmq::tcp_listener_t::~tcp_listener_t ()
close ();
}
-int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
+int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_,
+ int backlog_)
{
if (strcmp (protocol_, "tcp") == 0 ) {
@@ -196,14 +201,20 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
// Bind the socket to the network interface and port.
rc = bind (s, (struct sockaddr*) &addr, addr_len);
if (rc != 0) {
- close ();
+ int err = errno;
+ if (close () != 0)
+ return -1;
+ errno = err;
return -1;
}
// Listen for incomming connections.
- rc = listen (s, tcp_connection_backlog);
+ rc = listen (s, backlog_);
if (rc != 0) {
- close ();
+ int err = errno;
+ if (close () != 0)
+ return -1;
+ errno = err;
return -1;
}
@@ -234,16 +245,23 @@ int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_)
errno_assert (rc != -1);
// Bind the socket to the file path.
- rc = bind (s, (struct sockaddr*) &addr, sizeof (sockaddr_un));
+ rc = bind (s, (struct sockaddr*) &addr, addr_len);
if (rc != 0) {
- close ();
+ int err = errno;
+ if (close () != 0)
+ return -1;
+ errno = err;
return -1;
}
+ has_file = true;
// Listen for incomming connections.
- rc = listen (s, tcp_connection_backlog);
+ rc = listen (s, backlog_);
if (rc != 0) {
- close ();
+ int err = errno;
+ if (close () != 0)
+ return -1;
+ errno = err;
return -1;
}
@@ -268,7 +286,7 @@ int zmq::tcp_listener_t::close ()
// If there's an underlying UNIX domain socket, get rid of the file it
// is associated with.
struct sockaddr_un *su = (struct sockaddr_un*) &addr;
- if (AF_UNIX == su->sun_family) {
+ if (AF_UNIX == su->sun_family && has_file) {
rc = ::unlink(su->sun_path);
if (rc != 0)
return -1;
diff --git a/src/tcp_listener.hpp b/src/tcp_listener.hpp
index 3b60719..27e3092 100644
--- a/src/tcp_listener.hpp
+++ b/src/tcp_listener.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -36,7 +37,8 @@ namespace zmq
~tcp_listener_t ();
// Start listening on the interface.
- int set_address (const char *protocol_, const char *addr_);
+ int set_address (const char *protocol_, const char *addr_,
+ int backlog_);
// Close the listening socket.
int close ();
@@ -56,11 +58,14 @@ namespace zmq
sockaddr_storage addr;
socklen_t addr_len;
+ // True, if the undelying file for UNIX domain socket exists.
+ bool has_file;
+
// Underlying socket.
fd_t s;
tcp_listener_t (const tcp_listener_t&);
- void operator = (const tcp_listener_t&);
+ const tcp_listener_t &operator = (const tcp_listener_t&);
};
}
diff --git a/src/tcp_socket.cpp b/src/tcp_socket.cpp
index c83bba6..f1b1d19 100644
--- a/src/tcp_socket.cpp
+++ b/src/tcp_socket.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/tcp_socket.hpp b/src/tcp_socket.hpp
index 3aae060..3cb5739 100644
--- a/src/tcp_socket.hpp
+++ b/src/tcp_socket.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -63,7 +64,7 @@ namespace zmq
// Disable copy construction of tcp_socket.
tcp_socket_t (const tcp_socket_t&);
- void operator = (const tcp_socket_t&);
+ const tcp_socket_t &operator = (const tcp_socket_t&);
};
}
diff --git a/src/thread.cpp b/src/thread.cpp
index 602ca8b..12a72e2 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,12 +24,22 @@
#ifdef ZMQ_HAVE_WINDOWS
+extern "C"
+{
+ static unsigned int __stdcall thread_routine (void *arg_)
+ {
+ zmq::thread_t *self = (zmq::thread_t*) arg_;
+ self->tfn (self->arg);
+ return 0;
+ }
+}
+
void zmq::thread_t::start (thread_fn *tfn_, void *arg_)
{
tfn = tfn_;
arg =arg_;
descriptor = (HANDLE) _beginthreadex (NULL, 0,
- &zmq::thread_t::thread_routine, this, 0 , NULL);
+ &::thread_routine, this, 0 , NULL);
win_assert (descriptor != NULL);
}
@@ -38,27 +49,30 @@ void zmq::thread_t::stop ()
win_assert (rc != WAIT_FAILED);
}
-zmq::thread_t::id_t zmq::thread_t::id ()
-{
- return GetCurrentThreadId ();
-}
+#else
-bool zmq::thread_t::equal (id_t id1_, id_t id2_)
-{
- return id1_ == id2_;
-}
+#include <signal.h>
-unsigned int __stdcall zmq::thread_t::thread_routine (void *arg_)
+extern "C"
{
- thread_t *self = (thread_t*) arg_;
- self->tfn (self->arg);
- return 0;
+ static void *thread_routine (void *arg_)
+ {
+ #if !defined ZMQ_HAVE_OPENVMS
+ // Following code will guarantee more predictable latecnies as it'll
+ // disallow any signal handling in the I/O thread.
+ sigset_t signal_set;
+ int rc = sigfillset (&signal_set);
+ errno_assert (rc == 0);
+ rc = pthread_sigmask (SIG_BLOCK, &signal_set, NULL);
+ errno_assert (rc == 0);
+ #endif
+
+ zmq::thread_t *self = (zmq::thread_t*) arg_;
+ self->tfn (self->arg);
+ return NULL;
+ }
}
-#else
-
-#include <signal.h>
-
void zmq::thread_t::start (thread_fn *tfn_, void *arg_)
{
tfn = tfn_;
@@ -73,33 +87,6 @@ void zmq::thread_t::stop ()
errno_assert (rc == 0);
}
-zmq::thread_t::id_t zmq::thread_t::id ()
-{
- return pthread_self ();
-}
-
-bool zmq::thread_t::equal (id_t id1_, id_t id2_)
-{
- return pthread_equal (id1_, id2_) != 0;
-}
-
-void *zmq::thread_t::thread_routine (void *arg_)
-{
-#if !defined ZMQ_HAVE_OPENVMS
- // Following code will guarantee more predictable latecnies as it'll
- // disallow any signal handling in the I/O thread.
- sigset_t signal_set;
- int rc = sigfillset (&signal_set);
- errno_assert (rc == 0);
- rc = pthread_sigmask (SIG_BLOCK, &signal_set, NULL);
- errno_assert (rc == 0);
-#endif
-
- thread_t *self = (thread_t*) arg_;
- self->tfn (self->arg);
- return NULL;
-}
-
#endif
diff --git a/src/thread.hpp b/src/thread.hpp
index 432770c..f3f5f8d 100644
--- a/src/thread.hpp
+++ b/src/thread.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -55,30 +56,21 @@ namespace zmq
// Waits for thread termination.
void stop ();
-#ifdef ZMQ_HAVE_WINDOWS
- typedef DWORD id_t;
-#else
- typedef pthread_t id_t;
-#endif
-
- static id_t id ();
- static bool equal (id_t id1_, id_t id2_);
+ // These are internal members. They should be private, however then
+ // they would not be accessible from the main C routine of the thread.
+ thread_fn *tfn;
+ void *arg;
private:
#ifdef ZMQ_HAVE_WINDOWS
- static unsigned int __stdcall thread_routine (void *arg_);
HANDLE descriptor;
#else
- static void *thread_routine (void *arg_);
pthread_t descriptor;
#endif
- thread_fn *tfn;
- void *arg;
-
thread_t (const thread_t&);
- void operator = (const thread_t&);
+ const thread_t &operator = (const thread_t&);
};
}
diff --git a/src/transient_session.cpp b/src/transient_session.cpp
new file mode 100644
index 0000000..a08f541
--- /dev/null
+++ b/src/transient_session.cpp
@@ -0,0 +1,41 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "transient_session.hpp"
+
+zmq::transient_session_t::transient_session_t (class io_thread_t *io_thread_,
+ class socket_base_t *socket_, const options_t &options_) :
+ session_t (io_thread_, socket_, options_)
+{
+}
+
+zmq::transient_session_t::~transient_session_t ()
+{
+}
+
+void zmq::transient_session_t::attached (const blob_t &peer_identity_)
+{
+}
+
+void zmq::transient_session_t::detached ()
+{
+ // There's no way to reestablish a transient session. Tear it down.
+ terminate ();
+}
diff --git a/src/transient_session.hpp b/src/transient_session.hpp
new file mode 100644
index 0000000..03f058d
--- /dev/null
+++ b/src/transient_session.hpp
@@ -0,0 +1,52 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_TRANSIENT_SESSION_HPP_INCLUDED__
+#define __ZMQ_TRANSIENT_SESSION_HPP_INCLUDED__
+
+#include "session.hpp"
+
+namespace zmq
+{
+
+ // Transient session is created by the listener when the connected peer
+ // stays anonymous. Transient session is destroyed on disconnect.
+
+ class transient_session_t : public session_t
+ {
+ public:
+
+ transient_session_t (class io_thread_t *io_thread_,
+ class socket_base_t *socket_, const options_t &options_);
+ ~transient_session_t ();
+
+ private:
+
+ // Handlers for events from session base class.
+ void attached (const blob_t &peer_identity_);
+ void detached ();
+
+ transient_session_t (const transient_session_t&);
+ const transient_session_t &operator = (const transient_session_t&);
+ };
+
+}
+
+#endif
diff --git a/src/prefix_tree.cpp b/src/trie.cpp
index 6d4f084..4198ff3 100644
--- a/src/prefix_tree.cpp
+++ b/src/trie.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -28,16 +29,16 @@
#endif
#include "err.hpp"
-#include "prefix_tree.hpp"
+#include "trie.hpp"
-zmq::prefix_tree_t::prefix_tree_t () :
+zmq::trie_t::trie_t () :
refcnt (0),
min (0),
count (0)
{
}
-zmq::prefix_tree_t::~prefix_tree_t ()
+zmq::trie_t::~trie_t ()
{
if (count == 1)
delete next.node;
@@ -49,7 +50,7 @@ zmq::prefix_tree_t::~prefix_tree_t ()
}
}
-void zmq::prefix_tree_t::add (unsigned char *prefix_, size_t size_)
+void zmq::trie_t::add (unsigned char *prefix_, size_t size_)
{
// We are at the node corresponding to the prefix. We are done.
if (!size_) {
@@ -69,11 +70,11 @@ void zmq::prefix_tree_t::add (unsigned char *prefix_, size_t size_)
}
else if (count == 1) {
unsigned char oldc = min;
- prefix_tree_t *oldp = next.node;
+ trie_t *oldp = next.node;
count = (min < c ? c - min : min - c) + 1;
- next.table = (prefix_tree_t**)
- malloc (sizeof (prefix_tree_t*) * count);
- zmq_assert (next.table);
+ next.table = (trie_t**)
+ malloc (sizeof (trie_t*) * count);
+ alloc_assert (next.table);
for (unsigned short i = 0; i != count; ++i)
next.table [i] = 0;
min = std::min (min, c);
@@ -84,8 +85,8 @@ void zmq::prefix_tree_t::add (unsigned char *prefix_, size_t size_)
// The new character is above the current character range.
unsigned short old_count = count;
count = c - min + 1;
- next.table = (prefix_tree_t**) realloc ((void*) next.table,
- sizeof (prefix_tree_t*) * count);
+ next.table = (trie_t**) realloc ((void*) next.table,
+ sizeof (trie_t*) * count);
zmq_assert (next.table);
for (unsigned short i = old_count; i != count; i++)
next.table [i] = NULL;
@@ -95,11 +96,11 @@ void zmq::prefix_tree_t::add (unsigned char *prefix_, size_t size_)
// The new character is below the current character range.
unsigned short old_count = count;
count = (min + old_count) - c;
- next.table = (prefix_tree_t**) realloc ((void*) next.table,
- sizeof (prefix_tree_t*) * count);
+ next.table = (trie_t**) realloc ((void*) next.table,
+ sizeof (trie_t*) * count);
zmq_assert (next.table);
memmove (next.table + min - c, next.table,
- old_count * sizeof (prefix_tree_t*));
+ old_count * sizeof (trie_t*));
for (unsigned short i = 0; i != min - c; i++)
next.table [i] = NULL;
min = c;
@@ -109,21 +110,21 @@ void zmq::prefix_tree_t::add (unsigned char *prefix_, size_t size_)
// If next node does not exist, create one.
if (count == 1) {
if (!next.node) {
- next.node = new (std::nothrow) prefix_tree_t;
- zmq_assert (next.node);
+ next.node = new (std::nothrow) trie_t;
+ alloc_assert (next.node);
}
next.node->add (prefix_ + 1, size_ - 1);
}
else {
if (!next.table [c - min]) {
- next.table [c - min] = new (std::nothrow) prefix_tree_t;
- zmq_assert (next.table [c - min]);
+ next.table [c - min] = new (std::nothrow) trie_t;
+ alloc_assert (next.table [c - min]);
}
next.table [c - min]->add (prefix_ + 1, size_ - 1);
}
}
-bool zmq::prefix_tree_t::rm (unsigned char *prefix_, size_t size_)
+bool zmq::trie_t::rm (unsigned char *prefix_, size_t size_)
{
if (!size_) {
if (!refcnt)
@@ -136,7 +137,7 @@ bool zmq::prefix_tree_t::rm (unsigned char *prefix_, size_t size_)
if (!count || c < min || c >= min + count)
return false;
- prefix_tree_t *next_node =
+ trie_t *next_node =
count == 1 ? next.node : next.table [c - min];
if (!next_node)
@@ -145,11 +146,11 @@ bool zmq::prefix_tree_t::rm (unsigned char *prefix_, size_t size_)
return next_node->rm (prefix_ + 1, size_ - 1);
}
-bool zmq::prefix_tree_t::check (unsigned char *data_, size_t size_)
+bool zmq::trie_t::check (unsigned char *data_, size_t size_)
{
// This function is on critical path. It deliberately doesn't use
// recursion to get a bit better performance.
- prefix_tree_t *current = this;
+ trie_t *current = this;
while (true) {
// We've found a corresponding subscription!
diff --git a/src/prefix_tree.hpp b/src/trie.hpp
index bf1c4b9..dbf1cb1 100644
--- a/src/prefix_tree.hpp
+++ b/src/trie.hpp
@@ -1,24 +1,25 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __ZMQ_PREFIX_TREE_HPP_INCLUDED__
-#define __ZMQ_PREFIX_TREE_HPP_INCLUDED__
+#ifndef __ZMQ_TRIE_HPP_INCLUDED__
+#define __ZMQ_TRIE_HPP_INCLUDED__
#include <stddef.h>
@@ -27,12 +28,12 @@
namespace zmq
{
- class prefix_tree_t
+ class trie_t
{
public:
- prefix_tree_t ();
- ~prefix_tree_t ();
+ trie_t ();
+ ~trie_t ();
void add (unsigned char *prefix_, size_t size_);
bool rm (unsigned char *prefix_, size_t size_);
@@ -44,9 +45,12 @@ namespace zmq
unsigned char min;
unsigned short count;
union {
- class prefix_tree_t *node;
- class prefix_tree_t **table;
+ class trie_t *node;
+ class trie_t **table;
} next;
+
+ trie_t (const trie_t&);
+ const trie_t &operator = (const trie_t&);
};
}
diff --git a/src/uuid.cpp b/src/uuid.cpp
index a119be0..d8cc2e8 100644
--- a/src/uuid.cpp
+++ b/src/uuid.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,13 +30,6 @@ zmq::uuid_t::uuid_t ()
ret = UuidToString (&uuid, &string_buf);
zmq_assert (ret == RPC_S_OK);
- /*
- HRESULT hr = CoCreateGUID (&uuid);
- zmq_assert (hr == S_OK);
- int rc = StringFromGUID2 (uuid, string_buf, 40);
- zmq_assert (rc != 0);
- */
-
create_blob ();
}
diff --git a/src/uuid.hpp b/src/uuid.hpp
index a528baf..5eab6c8 100644
--- a/src/uuid.hpp
+++ b/src/uuid.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/windows.hpp b/src/windows.hpp
index 8fc98b0..5133875 100644
--- a/src/windows.hpp
+++ b/src/windows.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/wire.hpp b/src/wire.hpp
index 9534cf6..bc9dfe5 100644
--- a/src/wire.hpp
+++ b/src/wire.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/xpub.cpp b/src/xpub.cpp
new file mode 100644
index 0000000..ed56183
--- /dev/null
+++ b/src/xpub.cpp
@@ -0,0 +1,76 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "../include/zmq.h"
+
+#include "xpub.hpp"
+#include "err.hpp"
+#include "pipe.hpp"
+
+zmq::xpub_t::xpub_t (class ctx_t *parent_, uint32_t tid_) :
+ socket_base_t (parent_, tid_),
+ dist (this)
+{
+ options.type = ZMQ_XPUB;
+ options.requires_in = false;
+ options.requires_out = true;
+}
+
+zmq::xpub_t::~xpub_t ()
+{
+}
+
+void zmq::xpub_t::xattach_pipes (class reader_t *inpipe_,
+ class writer_t *outpipe_, const blob_t &peer_identity_)
+{
+ zmq_assert (!inpipe_ && outpipe_);
+ dist.attach (outpipe_);
+}
+
+void zmq::xpub_t::process_term (int linger_)
+{
+ // Terminate the outbound pipes.
+ dist.terminate ();
+
+ // Continue with the termination immediately.
+ socket_base_t::process_term (linger_);
+}
+
+int zmq::xpub_t::xsend (zmq_msg_t *msg_, int flags_)
+{
+ return dist.send (msg_, flags_);
+}
+
+bool zmq::xpub_t::xhas_out ()
+{
+ return dist.has_out ();
+}
+
+int zmq::xpub_t::xrecv (zmq_msg_t *msg_, int flags_)
+{
+ errno = EAGAIN;
+ return -1;
+}
+
+bool zmq::xpub_t::xhas_in ()
+{
+ return false;
+}
+
diff --git a/src/xpub.hpp b/src/xpub.hpp
new file mode 100644
index 0000000..e945198
--- /dev/null
+++ b/src/xpub.hpp
@@ -0,0 +1,61 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_XPUB_HPP_INCLUDED__
+#define __ZMQ_XPUB_HPP_INCLUDED__
+
+#include "socket_base.hpp"
+#include "array.hpp"
+#include "pipe.hpp"
+#include "dist.hpp"
+
+namespace zmq
+{
+
+ class xpub_t : public socket_base_t
+ {
+ public:
+
+ xpub_t (class ctx_t *parent_, uint32_t tid_);
+ ~xpub_t ();
+
+ // Implementations of virtual functions from socket_base_t.
+ void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
+ const blob_t &peer_identity_);
+ int xsend (zmq_msg_t *msg_, int flags_);
+ bool xhas_out ();
+ int xrecv (zmq_msg_t *msg_, int flags_);
+ bool xhas_in ();
+
+ private:
+
+ // Hook into the termination process.
+ void process_term (int linger_);
+
+ // Distributor of messages holding the list of outbound pipes.
+ dist_t dist;
+
+ xpub_t (const xpub_t&);
+ const xpub_t &operator = (const xpub_t&);
+ };
+
+}
+
+#endif
diff --git a/src/xrep.cpp b/src/xrep.cpp
index f50e32e..7f0da4d 100644
--- a/src/xrep.cpp
+++ b/src/xrep.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,14 +24,16 @@
#include "err.hpp"
#include "pipe.hpp"
-zmq::xrep_t::xrep_t (class app_thread_t *parent_) :
- socket_base_t (parent_),
+zmq::xrep_t::xrep_t (class ctx_t *parent_, uint32_t tid_) :
+ socket_base_t (parent_, tid_),
current_in (0),
prefetched (false),
more_in (false),
current_out (NULL),
- more_out (false)
+ more_out (false),
+ terminating (false)
{
+ options.type = ZMQ_XREP;
options.requires_in = true;
options.requires_out = true;
@@ -41,42 +44,76 @@ zmq::xrep_t::xrep_t (class app_thread_t *parent_) :
zmq::xrep_t::~xrep_t ()
{
- for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end (); it++)
- it->reader->term ();
- for (outpipes_t::iterator it = outpipes.begin (); it != outpipes.end ();
- it++)
- it->second.writer->term ();
+ zmq_assert (inpipes.empty ());
+ zmq_assert (outpipes.empty ());
+}
+
+void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_,
+ const blob_t &peer_identity_)
+{
+ if (outpipe_) {
+
+ outpipe_->set_event_sink (this);
+
+ // TODO: What if new connection has same peer identity as the old one?
+ outpipe_t outpipe = {outpipe_, true};
+ bool ok = outpipes.insert (outpipes_t::value_type (
+ peer_identity_, outpipe)).second;
+ zmq_assert (ok);
+
+ if (terminating) {
+ register_term_acks (1);
+ outpipe_->terminate ();
+ }
+ }
+
+ if (inpipe_) {
+
+ inpipe_->set_event_sink (this);
+
+ inpipe_t inpipe = {inpipe_, peer_identity_, true};
+ inpipes.push_back (inpipe);
+
+ if (terminating) {
+ register_term_acks (1);
+ inpipe_->terminate ();
+ }
+ }
}
-void zmq::xrep_t::xattach_pipes (class reader_t *inpipe_,
- class writer_t *outpipe_, const blob_t &peer_identity_)
+void zmq::xrep_t::process_term (int linger_)
{
- zmq_assert (inpipe_ && outpipe_);
+ terminating = true;
- // TODO: What if new connection has same peer identity as the old one?
- outpipe_t outpipe = {outpipe_, true};
- bool ok = outpipes.insert (std::make_pair (
- peer_identity_, outpipe)).second;
- zmq_assert (ok);
+ register_term_acks (inpipes.size () + outpipes.size ());
- inpipe_t inpipe = {inpipe_, peer_identity_, true};
- inpipes.push_back (inpipe);
+ for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end ();
+ ++it)
+ it->reader->terminate ();
+ for (outpipes_t::iterator it = outpipes.begin (); it != outpipes.end ();
+ ++it)
+ it->second.writer->terminate ();
+
+ socket_base_t::process_term (linger_);
}
-void zmq::xrep_t::xdetach_inpipe (class reader_t *pipe_)
+void zmq::xrep_t::terminated (reader_t *pipe_)
{
-// TODO:!
for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end ();
- it++) {
+ ++it) {
if (it->reader == pipe_) {
inpipes.erase (it);
+ if (terminating)
+ unregister_term_ack ();
+ if (current_in >= inpipes.size ())
+ current_in = 0;
return;
}
}
zmq_assert (false);
}
-void zmq::xrep_t::xdetach_outpipe (class writer_t *pipe_)
+void zmq::xrep_t::terminated (writer_t *pipe_)
{
for (outpipes_t::iterator it = outpipes.begin ();
it != outpipes.end (); ++it) {
@@ -84,29 +121,22 @@ void zmq::xrep_t::xdetach_outpipe (class writer_t *pipe_)
outpipes.erase (it);
if (pipe_ == current_out)
current_out = NULL;
+ if (terminating)
+ unregister_term_ack ();
return;
}
}
zmq_assert (false);
}
-void zmq::xrep_t::xkill (class reader_t *pipe_)
+void zmq::xrep_t::delimited (reader_t *pipe_)
{
- for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end ();
- it++) {
- if (it->reader == pipe_) {
- zmq_assert (it->active);
- it->active = false;
- return;
- }
- }
- zmq_assert (false);
}
-void zmq::xrep_t::xrevive (class reader_t *pipe_)
+void zmq::xrep_t::activated (reader_t *pipe_)
{
for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end ();
- it++) {
+ ++it) {
if (it->reader == pipe_) {
zmq_assert (!it->active);
it->active = true;
@@ -116,7 +146,7 @@ void zmq::xrep_t::xrevive (class reader_t *pipe_)
zmq_assert (false);
}
-void zmq::xrep_t::xrevive (class writer_t *pipe_)
+void zmq::xrep_t::activated (writer_t *pipe_)
{
for (outpipes_t::iterator it = outpipes.begin ();
it != outpipes.end (); ++it) {
@@ -129,13 +159,6 @@ void zmq::xrep_t::xrevive (class writer_t *pipe_)
zmq_assert (false);
}
-int zmq::xrep_t::xsetsockopt (int option_, const void *optval_,
- size_t optvallen_)
-{
- errno = EINVAL;
- return -1;
-}
-
int zmq::xrep_t::xsend (zmq_msg_t *msg_, int flags_)
{
// If this is the first part of the message it's the identity of the
@@ -144,23 +167,40 @@ int zmq::xrep_t::xsend (zmq_msg_t *msg_, int flags_)
zmq_assert (!current_out);
// If we have malformed message (prefix with no subsequent message)
- // then just silently drop the message.
- if ((msg_->flags & ZMQ_MSG_MORE) == 0)
- return 0;
+ // then just silently ignore it.
+ if (msg_->flags & ZMQ_MSG_MORE) {
- more_out = true;
+ more_out = true;
- // Find the pipe associated with the identity stored in the prefix.
- // If there's no such pipe just silently drop the message.
- blob_t identity ((unsigned char*) zmq_msg_data (msg_),
- zmq_msg_size (msg_));
- outpipes_t::iterator it = outpipes.find (identity);
- if (it == outpipes.end ())
- return 0;
-
- // Remember the outgoing pipe.
- current_out = it->second.writer;
+ // Find the pipe associated with the identity stored in the prefix.
+ // If there's no such pipe just silently ignore the message.
+ blob_t identity ((unsigned char*) zmq_msg_data (msg_),
+ zmq_msg_size (msg_));
+ outpipes_t::iterator it = outpipes.find (identity);
+
+ if (it != outpipes.end ()) {
+ current_out = it->second.writer;
+ zmq_msg_t empty;
+ int rc = zmq_msg_init (&empty);
+ zmq_assert (rc == 0);
+ if (!current_out->check_write (&empty)) {
+ it->second.active = false;
+ more_out = false;
+ current_out = NULL;
+ rc = zmq_msg_close (&empty);
+ zmq_assert (rc == 0);
+ errno = EAGAIN;
+ return -1;
+ }
+ rc = zmq_msg_close (&empty);
+ zmq_assert (rc == 0);
+ }
+ }
+ int rc = zmq_msg_close (msg_);
+ zmq_assert (rc == 0);
+ rc = zmq_msg_init (msg_);
+ zmq_assert (rc == 0);
return 0;
}
@@ -233,7 +273,9 @@ int zmq::xrep_t::xrecv (zmq_msg_t *msg_, int flags_)
return 0;
}
- // If me don't have a message, move to next pipe.
+ // If me don't have a message, mark the pipe as passive and
+ // move to next pipe.
+ inpipes [current_in].active = false;
current_in++;
if (current_in >= inpipes.size ())
current_in = 0;
@@ -260,6 +302,10 @@ bool zmq::xrep_t::xhas_in ()
if (inpipes [current_in].active &&
inpipes [current_in].reader->check_read ())
return true;
+
+ // If me don't have a message, mark the pipe as passive and
+ // move to next pipe.
+ inpipes [current_in].active = false;
current_in++;
if (current_in >= inpipes.size ())
current_in = 0;
diff --git a/src/xrep.hpp b/src/xrep.hpp
index da1b3d8..d7fbe9f 100644
--- a/src/xrep.hpp
+++ b/src/xrep.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -25,27 +26,25 @@
#include "socket_base.hpp"
#include "blob.hpp"
+#include "pipe.hpp"
namespace zmq
{
// TODO: This class uses O(n) scheduling. Rewrite it to use O(1) algorithm.
- class xrep_t : public socket_base_t
+ class xrep_t :
+ public socket_base_t,
+ public i_reader_events,
+ public i_writer_events
{
public:
- xrep_t (class app_thread_t *parent_);
+ xrep_t (class ctx_t *parent_, uint32_t tid_);
~xrep_t ();
// Overloads of functions from socket_base_t.
- void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
+ void xattach_pipes (reader_t *inpipe_, writer_t *outpipe_,
const blob_t &peer_identity_);
- void xdetach_inpipe (class reader_t *pipe_);
- void xdetach_outpipe (class writer_t *pipe_);
- void xkill (class reader_t *pipe_);
- void xrevive (class reader_t *pipe_);
- void xrevive (class writer_t *pipe_);
- int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
int xsend (zmq_msg_t *msg_, int flags_);
int xrecv (zmq_msg_t *msg_, int flags_);
bool xhas_in ();
@@ -53,6 +52,18 @@ namespace zmq
private:
+ // Hook into the termination process.
+ void process_term (int linger_);
+
+ // i_reader_events interface implementation.
+ void activated (reader_t *pipe_);
+ void terminated (reader_t *pipe_);
+ void delimited (reader_t *pipe_);
+
+ // i_writer_events interface implementation.
+ void activated (writer_t *pipe_);
+ void terminated (writer_t *pipe_);
+
struct inpipe_t
{
class reader_t *reader;
@@ -92,8 +103,11 @@ namespace zmq
// If true, more outgoing message parts are expected.
bool more_out;
+ // If true, termination process is already underway.
+ bool terminating;
+
xrep_t (const xrep_t&);
- void operator = (const xrep_t&);
+ const xrep_t &operator = (const xrep_t&);
};
}
diff --git a/src/xreq.cpp b/src/xreq.cpp
index 66e5cc3..96f1bba 100644
--- a/src/xreq.cpp
+++ b/src/xreq.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,9 +23,12 @@
#include "xreq.hpp"
#include "err.hpp"
-zmq::xreq_t::xreq_t (class app_thread_t *parent_) :
- socket_base_t (parent_)
+zmq::xreq_t::xreq_t (class ctx_t *parent_, uint32_t tid_) :
+ socket_base_t (parent_, tid_),
+ fq (this),
+ lb (this)
{
+ options.type = ZMQ_XREQ;
options.requires_in = true;
options.requires_out = true;
}
@@ -41,38 +45,11 @@ void zmq::xreq_t::xattach_pipes (class reader_t *inpipe_,
lb.attach (outpipe_);
}
-void zmq::xreq_t::xdetach_inpipe (class reader_t *pipe_)
+void zmq::xreq_t::process_term (int linger_)
{
- zmq_assert (pipe_);
- fq.detach (pipe_);
-}
-
-void zmq::xreq_t::xdetach_outpipe (class writer_t *pipe_)
-{
- zmq_assert (pipe_);
- lb.detach (pipe_);
-}
-
-void zmq::xreq_t::xkill (class reader_t *pipe_)
-{
- fq.kill (pipe_);
-}
-
-void zmq::xreq_t::xrevive (class reader_t *pipe_)
-{
- fq.revive (pipe_);
-}
-
-void zmq::xreq_t::xrevive (class writer_t *pipe_)
-{
- lb.revive (pipe_);
-}
-
-int zmq::xreq_t::xsetsockopt (int option_, const void *optval_,
- size_t optvallen_)
-{
- errno = EINVAL;
- return -1;
+ fq.terminate ();
+ lb.terminate ();
+ socket_base_t::process_term (linger_);
}
int zmq::xreq_t::xsend (zmq_msg_t *msg_, int flags_)
diff --git a/src/xreq.hpp b/src/xreq.hpp
index 8ee0bb9..73af21f 100644
--- a/src/xreq.hpp
+++ b/src/xreq.hpp
@@ -1,19 +1,21 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -31,18 +33,14 @@ namespace zmq
{
public:
- xreq_t (class app_thread_t *parent_);
+ xreq_t (class ctx_t *parent_, uint32_t tid_);
~xreq_t ();
+ protected:
+
// Overloads of functions from socket_base_t.
void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
const blob_t &peer_identity_);
- void xdetach_inpipe (class reader_t *pipe_);
- void xdetach_outpipe (class writer_t *pipe_);
- void xkill (class reader_t *pipe_);
- void xrevive (class reader_t *pipe_);
- void xrevive (class writer_t *pipe_);
- int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
int xsend (zmq_msg_t *msg_, int flags_);
int xrecv (zmq_msg_t *msg_, int flags_);
bool xhas_in ();
@@ -50,13 +48,16 @@ namespace zmq
private:
+ // Hook into the termination process.
+ void process_term (int linger_);
+
// Messages are fair-queued from inbound pipes. And load-balanced to
// the outbound pipes.
fq_t fq;
lb_t lb;
xreq_t (const xreq_t&);
- void operator = (const xreq_t&);
+ const xreq_t &operator = (const xreq_t&);
};
}
diff --git a/src/xsub.cpp b/src/xsub.cpp
new file mode 100644
index 0000000..8c77925
--- /dev/null
+++ b/src/xsub.cpp
@@ -0,0 +1,172 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include <string.h>
+
+#include "../include/zmq.h"
+
+#include "xsub.hpp"
+#include "err.hpp"
+
+zmq::xsub_t::xsub_t (class ctx_t *parent_, uint32_t tid_) :
+ socket_base_t (parent_, tid_),
+ fq (this),
+ has_message (false),
+ more (false)
+{
+ options.type = ZMQ_XSUB;
+ options.requires_in = true;
+ options.requires_out = false;
+ zmq_msg_init (&message);
+}
+
+zmq::xsub_t::~xsub_t ()
+{
+ zmq_msg_close (&message);
+}
+
+void zmq::xsub_t::xattach_pipes (class reader_t *inpipe_,
+ class writer_t *outpipe_, const blob_t &peer_identity_)
+{
+ zmq_assert (inpipe_ && !outpipe_);
+ fq.attach (inpipe_);
+}
+
+void zmq::xsub_t::process_term (int linger_)
+{
+ fq.terminate ();
+ socket_base_t::process_term (linger_);
+}
+
+int zmq::xsub_t::xsend (zmq_msg_t *msg_, int options_)
+{
+ size_t size = zmq_msg_size (msg_);
+ unsigned char *data = (unsigned char*) zmq_msg_data (msg_);
+
+ // Malformed subscriptions are dropped silently.
+ if (size >= 1) {
+
+ // Process a subscription.
+ if (*data == 1)
+ subscriptions.add (data + 1, size - 1);
+
+ // Process an unsubscription. Invalid unsubscription is ignored.
+ if (*data == 0)
+ subscriptions.rm (data + 1, size - 1);
+ }
+
+ int rc = zmq_msg_close (msg_);
+ zmq_assert (rc == 0);
+ rc = zmq_msg_init (msg_);
+ zmq_assert (rc == 0);
+ return 0;
+}
+
+bool zmq::xsub_t::xhas_out ()
+{
+ // Subscription can be added/removed anytime.
+ return true;
+}
+
+int zmq::xsub_t::xrecv (zmq_msg_t *msg_, int flags_)
+{
+ // If there's already a message prepared by a previous call to zmq_poll,
+ // return it straight ahead.
+ if (has_message) {
+ zmq_msg_move (msg_, &message);
+ has_message = false;
+ more = msg_->flags & ZMQ_MSG_MORE;
+ return 0;
+ }
+
+ // TODO: This can result in infinite loop in the case of continuous
+ // stream of non-matching messages which breaks the non-blocking recv
+ // semantics.
+ while (true) {
+
+ // Get a message using fair queueing algorithm.
+ int rc = fq.recv (msg_, flags_);
+
+ // If there's no message available, return immediately.
+ // The same when error occurs.
+ if (rc != 0)
+ return -1;
+
+ // Check whether the message matches at least one subscription.
+ // Non-initial parts of the message are passed
+ if (more || match (msg_)) {
+ more = msg_->flags & ZMQ_MSG_MORE;
+ return 0;
+ }
+
+ // Message doesn't match. Pop any remaining parts of the message
+ // from the pipe.
+ while (msg_->flags & ZMQ_MSG_MORE) {
+ rc = fq.recv (msg_, ZMQ_NOBLOCK);
+ zmq_assert (rc == 0);
+ }
+ }
+}
+
+bool zmq::xsub_t::xhas_in ()
+{
+ // There are subsequent parts of the partly-read message available.
+ if (more)
+ return true;
+
+ // If there's already a message prepared by a previous call to zmq_poll,
+ // return straight ahead.
+ if (has_message)
+ return true;
+
+ // TODO: This can result in infinite loop in the case of continuous
+ // stream of non-matching messages.
+ while (true) {
+
+ // Get a message using fair queueing algorithm.
+ int rc = fq.recv (&message, ZMQ_NOBLOCK);
+
+ // If there's no message available, return immediately.
+ // The same when error occurs.
+ if (rc != 0) {
+ zmq_assert (errno == EAGAIN);
+ return false;
+ }
+
+ // Check whether the message matches at least one subscription.
+ if (match (&message)) {
+ has_message = true;
+ return true;
+ }
+
+ // Message doesn't match. Pop any remaining parts of the message
+ // from the pipe.
+ while (message.flags & ZMQ_MSG_MORE) {
+ rc = fq.recv (&message, ZMQ_NOBLOCK);
+ zmq_assert (rc == 0);
+ }
+ }
+}
+
+bool zmq::xsub_t::match (zmq_msg_t *msg_)
+{
+ return subscriptions.check ((unsigned char*) zmq_msg_data (msg_),
+ zmq_msg_size (msg_));
+}
diff --git a/src/xsub.hpp b/src/xsub.hpp
new file mode 100644
index 0000000..6bd55ad
--- /dev/null
+++ b/src/xsub.hpp
@@ -0,0 +1,80 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_XSUB_HPP_INCLUDED__
+#define __ZMQ_XSUB_HPP_INCLUDED__
+
+#include "../include/zmq.h"
+
+#include "trie.hpp"
+#include "socket_base.hpp"
+#include "fq.hpp"
+
+namespace zmq
+{
+
+ class xsub_t : public socket_base_t
+ {
+ public:
+
+ xsub_t (class ctx_t *parent_, uint32_t tid_);
+ ~xsub_t ();
+
+ protected:
+
+ // Overloads of functions from socket_base_t.
+ void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
+ const blob_t &peer_identity_);
+ int xsend (zmq_msg_t *msg_, int options_);
+ bool xhas_out ();
+ int xrecv (zmq_msg_t *msg_, int flags_);
+ bool xhas_in ();
+
+ private:
+
+ // Hook into the termination process.
+ void process_term (int linger_);
+
+ // Check whether the message matches at least one subscription.
+ bool match (zmq_msg_t *msg_);
+
+ // Fair queueing object for inbound pipes.
+ fq_t fq;
+
+ // The repository of subscriptions.
+ trie_t subscriptions;
+
+ // If true, 'message' contains a matching message to return on the
+ // next recv call.
+ bool has_message;
+ zmq_msg_t message;
+
+ // If true, part of a multipart message was already received, but
+ // there are following parts still waiting.
+ bool more;
+
+ xsub_t (const xsub_t&);
+ const xsub_t &operator = (const xsub_t&);
+ };
+
+}
+
+#endif
+
diff --git a/src/yarray_item.hpp b/src/yarray_item.hpp
deleted file mode 100644
index db24dda..0000000
--- a/src/yarray_item.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __ZMQ_YARRAY_ITEM_INCLUDED__
-#define __ZMQ_YARRAY_ITEM_INCLUDED__
-
-namespace zmq
-{
-
- // Base class for objects stored in yarray. Note that each object can
- // be stored in at most one yarray.
-
- class yarray_item_t
- {
- public:
-
- inline yarray_item_t () :
- yarray_index (-1)
- {
- }
-
- // The destructor doesn't have to be virtual. It is mad virtual
- // just to keep ICC and code checking tools from complaining.
- inline virtual ~yarray_item_t ()
- {
- }
-
- inline void set_yarray_index (int index_)
- {
- yarray_index = index_;
- }
-
- inline int get_yarray_index ()
- {
- return yarray_index;
- }
-
- private:
-
- int yarray_index;
-
- yarray_item_t (const yarray_item_t&);
- void operator = (const yarray_item_t&);
- };
-
-}
-
-#endif
diff --git a/src/ypipe.hpp b/src/ypipe.hpp
index 1785b71..da4e85a 100644
--- a/src/ypipe.hpp
+++ b/src/ypipe.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -200,7 +201,7 @@ namespace zmq
// Disable copying of ypipe object.
ypipe_t (const ypipe_t&);
- void operator = (const ypipe_t&);
+ const ypipe_t &operator = (const ypipe_t&);
};
}
diff --git a/src/yqueue.hpp b/src/yqueue.hpp
index 9eaceb5..e436ea4 100644
--- a/src/yqueue.hpp
+++ b/src/yqueue.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -50,7 +51,7 @@ namespace zmq
inline yqueue_t ()
{
begin_chunk = (chunk_t*) malloc (sizeof (chunk_t));
- zmq_assert (begin_chunk);
+ alloc_assert (begin_chunk);
begin_pos = 0;
back_chunk = NULL;
back_pos = 0;
@@ -105,7 +106,7 @@ namespace zmq
sc->prev = end_chunk;
} else {
end_chunk->next = (chunk_t*) malloc (sizeof (chunk_t));
- zmq_assert (end_chunk->next);
+ alloc_assert (end_chunk->next);
end_chunk->next->prev = end_chunk;
}
end_chunk = end_chunk->next;
@@ -189,7 +190,7 @@ namespace zmq
// Disable copying of yqueue.
yqueue_t (const yqueue_t&);
- void operator = (const yqueue_t&);
+ const yqueue_t &operator = (const yqueue_t&);
};
}
diff --git a/src/zmq.cpp b/src/zmq.cpp
index 5770e04..929e51c 100644
--- a/src/zmq.cpp
+++ b/src/zmq.cpp
@@ -1,22 +1,37 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "platform.hpp"
+
+// On AIX, poll.h has to be included before zmq.h to get consistent
+// definition of pollfd structure (AIX uses 'reqevents' and 'retnevents'
+// instead of 'events' and 'revents' and defines macros to map from POSIX-y
+// names to AIX-specific names).
+#if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
+ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\
+ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\
+ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\
+ defined ZMQ_HAVE_NETBSD
+#include <poll.h>
+#endif
+
#include "../include/zmq.h"
#include "../include/zmq_utils.h"
@@ -25,34 +40,30 @@
#include <stdlib.h>
#include <new>
-#include "forwarder.hpp"
-#include "queue.hpp"
-#include "streamer.hpp"
+#include "device.hpp"
#include "socket_base.hpp"
-#include "app_thread.hpp"
#include "msg_content.hpp"
-#include "platform.hpp"
#include "stdint.hpp"
#include "config.hpp"
+#include "likely.hpp"
+#include "clock.hpp"
#include "ctx.hpp"
#include "err.hpp"
#include "fd.hpp"
-#if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
- defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\
- defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\
- defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\
- defined ZMQ_HAVE_NETBSD
-#include <poll.h>
-#endif
-
#if !defined ZMQ_HAVE_WINDOWS
#include <unistd.h>
-#include <sys/time.h>
#endif
#if defined ZMQ_HAVE_OPENPGM
+#define __PGM_WININT_H__
#include <pgm/pgm.h>
+
+// TODO: OpenPGM redefines bool -- remove this once OpenPGM is fixed.
+#if defined bool
+#undef bool
+#endif
+
#endif
void zmq_version (int *major_, int *minor_, int *patch_)
@@ -64,43 +75,7 @@ void zmq_version (int *major_, int *minor_, int *patch_)
const char *zmq_strerror (int errnum_)
{
- switch (errnum_) {
-#if defined ZMQ_HAVE_WINDOWS
- case ENOTSUP:
- return "Not supported";
- case EPROTONOSUPPORT:
- return "Protocol not supported";
- case ENOBUFS:
- return "No buffer space available";
- case ENETDOWN:
- return "Network is down";
- case EADDRINUSE:
- return "Address in use";
- case EADDRNOTAVAIL:
- return "Address not available";
- case ECONNREFUSED:
- return "Connection refused";
- case EINPROGRESS:
- return "Operation in progress";
-#endif
- case EMTHREAD:
- return "Number of preallocated application threads exceeded";
- case EFSM:
- return "Operation cannot be accomplished in current state";
- case ENOCOMPATPROTO:
- return "The protocol is not compatible with the socket type";
- case ETERM:
- return "Context was terminated";
- default:
-#if defined _MSC_VER
-#pragma warning (push)
-#pragma warning (disable:4996)
-#endif
- return strerror (errnum_);
-#if defined _MSC_VER
-#pragma warning (pop)
-#endif
- }
+ return zmq::errno_to_string (errnum_);
}
int zmq_msg_init (zmq_msg_t *msg_)
@@ -141,7 +116,7 @@ int zmq_msg_init_data (zmq_msg_t *msg_, void *data_, size_t size_,
zmq_free_fn *ffn_, void *hint_)
{
msg_->content = (zmq::msg_content_t*) malloc (sizeof (zmq::msg_content_t));
- zmq_assert (msg_->content);
+ alloc_assert (msg_->content);
msg_->flags = 0;
zmq::msg_content_t *content = (zmq::msg_content_t*) msg_->content;
content->data = data_;
@@ -155,24 +130,30 @@ int zmq_msg_init_data (zmq_msg_t *msg_, void *data_, size_t size_,
int zmq_msg_close (zmq_msg_t *msg_)
{
// For VSMs and delimiters there are no resources to free.
- if (msg_->content == (zmq::msg_content_t*) ZMQ_DELIMITER ||
- msg_->content == (zmq::msg_content_t*) ZMQ_VSM)
- return 0;
+ if (msg_->content != (zmq::msg_content_t*) ZMQ_DELIMITER &&
+ msg_->content != (zmq::msg_content_t*) ZMQ_VSM) {
- // If the content is not shared, or if it is shared and the reference.
- // count has dropped to zero, deallocate it.
- zmq::msg_content_t *content = (zmq::msg_content_t*) msg_->content;
- if (!(msg_->flags & ZMQ_MSG_SHARED) || !content->refcnt.sub (1)) {
+ // If the content is not shared, or if it is shared and the reference.
+ // count has dropped to zero, deallocate it.
+ zmq::msg_content_t *content = (zmq::msg_content_t*) msg_->content;
+ if (!(msg_->flags & ZMQ_MSG_SHARED) || !content->refcnt.sub (1)) {
- // We used "placement new" operator to initialize the reference.
- // counter so we call its destructor now.
- content->refcnt.~atomic_counter_t ();
+ // We used "placement new" operator to initialize the reference.
+ // counter so we call its destructor now.
+ content->refcnt.~atomic_counter_t ();
- if (content->ffn)
- content->ffn (content->data, content->hint);
- free (content);
+ if (content->ffn)
+ content->ffn (content->data, content->hint);
+ free (content);
+ }
}
+ // As a safety measure, let's make the deallocated message look like
+ // an empty message.
+ msg_->content = (zmq::msg_content_t*) ZMQ_VSM;
+ msg_->flags = 0;
+ msg_->vsm_size = 0;
+
return 0;
}
@@ -235,38 +216,47 @@ void *zmq_init (int io_threads_)
}
#if defined ZMQ_HAVE_OPENPGM
- // Unfortunately, OpenPGM doesn't support refcounted init/shutdown, thus,
- // let's fail if it was initialised beforehand.
- zmq_assert (!pgm_supported ());
// Init PGM transport. Ensure threading and timer are enabled. Find PGM
// protocol ID. Note that if you want to use gettimeofday and sleep for
// openPGM timing, set environment variables PGM_TIMER to "GTOD" and
// PGM_SLEEP to "USLEEP".
- GError *pgm_error = NULL;
- int rc = pgm_init (&pgm_error);
- if (rc != TRUE) {
- if (pgm_error->domain == PGM_IF_ERROR && (
- pgm_error->code == PGM_IF_ERROR_INVAL ||
- pgm_error->code == PGM_IF_ERROR_XDEV ||
- pgm_error->code == PGM_IF_ERROR_NODEV ||
- pgm_error->code == PGM_IF_ERROR_NOTUNIQ ||
- pgm_error->code == PGM_IF_ERROR_ADDRFAMILY ||
- pgm_error->code == PGM_IF_ERROR_FAMILY ||
- pgm_error->code == PGM_IF_ERROR_NODATA ||
- pgm_error->code == PGM_IF_ERROR_NONAME ||
- pgm_error->code == PGM_IF_ERROR_SERVICE)) {
- g_error_free (pgm_error);
+ pgm_error_t *pgm_error = NULL;
+ const bool ok = pgm_init (&pgm_error);
+ if (ok != TRUE) {
+
+ // Invalid parameters don't set pgm_error_t
+ zmq_assert (pgm_error != NULL);
+ if (pgm_error->domain == PGM_ERROR_DOMAIN_TIME && (
+ pgm_error->code == PGM_ERROR_FAILED)) {
+
+ // Failed to access RTC or HPET device.
+ pgm_error_free (pgm_error);
errno = EINVAL;
return NULL;
}
+
+ // PGM_ERROR_DOMAIN_ENGINE: WSAStartup errors or missing WSARecvMsg.
zmq_assert (false);
}
#endif
+#ifdef ZMQ_HAVE_WINDOWS
+ // Intialise Windows sockets. Note that WSAStartup can be called multiple
+ // times given that WSACleanup will be called for each WSAStartup.
+ // We do this before the ctx constructor since its embedded mailbox_t
+ // object needs Winsock to be up and running.
+ WORD version_requested = MAKEWORD (2, 2);
+ WSADATA wsa_data;
+ int rc = WSAStartup (version_requested, &wsa_data);
+ zmq_assert (rc == 0);
+ zmq_assert (LOBYTE (wsa_data.wVersion) == 2 &&
+ HIBYTE (wsa_data.wVersion) == 2);
+#endif
+
// Create 0MQ context.
zmq::ctx_t *ctx = new (std::nothrow) zmq::ctx_t ((uint32_t) io_threads_);
- zmq_assert (ctx);
+ alloc_assert (ctx);
return (void*) ctx;
}
@@ -277,9 +267,15 @@ int zmq_term (void *ctx_)
return -1;
}
- int rc = ((zmq::ctx_t*) ctx_)->term ();
+ int rc = ((zmq::ctx_t*) ctx_)->terminate ();
int en = errno;
+#ifdef ZMQ_HAVE_WINDOWS
+ // On Windows, uninitialise socket layer.
+ rc = WSACleanup ();
+ wsa_assert (rc != SOCKET_ERROR);
+#endif
+
#if defined ZMQ_HAVE_OPENPGM
// Shut down the OpenPGM library.
if (pgm_shutdown () != TRUE)
@@ -366,158 +362,203 @@ int zmq_recv (void *s_, zmq_msg_t *msg_, int flags_)
return (((zmq::socket_base_t*) s_)->recv (msg_, flags_));
}
-int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
-{
-#if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
+#if defined ZMQ_FORCE_SELECT
+#define ZMQ_POLL_BASED_ON_SELECT
+#elif defined ZMQ_FORCE_POLL
+#define ZMQ_POLL_BASED_ON_POLL
+#elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\
defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\
defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\
defined ZMQ_HAVE_NETBSD
+#define ZMQ_POLL_BASED_ON_POLL
+#elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS
+#define ZMQ_POLL_BASED_ON_SELECT
+#endif
+
+int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
+{
+#if defined ZMQ_POLL_BASED_ON_POLL
+ if (unlikely (nitems_ < 0)) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (unlikely (nitems_ == 0)) {
+ if (timeout_ == 0)
+ return 0;
+#if defined ZMQ_HAVE_WINDOWS
+ Sleep (timeout_ > 0 ? timeout_ / 1000 : INFINITE);
+ return 0;
+#else
+ return usleep (timeout_);
+#endif
+ }
if (!items_) {
errno = EFAULT;
return -1;
}
- pollfd *pollfds = (pollfd*) malloc (nitems_ * sizeof (pollfd));
- zmq_assert (pollfds);
- int npollfds = 0;
- int nsockets = 0;
- zmq::app_thread_t *app_thread = NULL;
+ zmq::clock_t clock;
+ uint64_t now = 0;
+ uint64_t end = 0;
+
+ pollfd *pollfds = (pollfd*) malloc (nitems_ * sizeof (pollfd));
+ alloc_assert (pollfds);
+ // Build pollset for poll () system call.
for (int i = 0; i != nitems_; i++) {
- // 0MQ sockets.
+ // If the poll item is a 0MQ socket, we poll on the file descriptor
+ // retrieved by the ZMQ_FD socket option.
if (items_ [i].socket) {
-
- // Get the app_thread the socket is living in. If there are two
- // sockets in the same pollset with different app threads, fail.
- zmq::socket_base_t *s = (zmq::socket_base_t*) items_ [i].socket;
- if (app_thread) {
- if (app_thread != s->get_thread ()) {
- free (pollfds);
- errno = EFAULT;
- return -1;
- }
+ size_t zmq_fd_size = sizeof (zmq::fd_t);
+ if (zmq_getsockopt (items_ [i].socket, ZMQ_FD, &pollfds [i].fd,
+ &zmq_fd_size) == -1) {
+ free (pollfds);
+ return -1;
}
- else
- app_thread = s->get_thread ();
-
- nsockets++;
- continue;
+ pollfds [i].events = items_ [i].events ? POLLIN : 0;
}
-
- // Raw file descriptors.
- pollfds [npollfds].fd = items_ [i].fd;
- pollfds [npollfds].events =
- (items_ [i].events & ZMQ_POLLIN ? POLLIN : 0) |
- (items_ [i].events & ZMQ_POLLOUT ? POLLOUT : 0);
- npollfds++;
- }
-
- // If there's at least one 0MQ socket in the pollset we have to poll
- // for 0MQ commands. If ZMQ_POLL was not set, fail.
- if (nsockets) {
- pollfds [npollfds].fd = app_thread->get_signaler ()->get_fd ();
- if (pollfds [npollfds].fd == zmq::retired_fd) {
- free (pollfds);
- errno = ENOTSUP;
- return -1;
+ // Else, the poll item is a raw file descriptor. Just convert the
+ // events to normal POLLIN/POLLOUT for poll ().
+ else {
+ pollfds [i].fd = items_ [i].fd;
+ pollfds [i].events =
+ (items_ [i].events & ZMQ_POLLIN ? POLLIN : 0) |
+ (items_ [i].events & ZMQ_POLLOUT ? POLLOUT : 0);
}
- pollfds [npollfds].events = POLLIN;
- npollfds++;
- }
-
- // First iteration just check for events, don't block. Waiting would
- // prevent exiting on any events that may already been signaled on
- // 0MQ sockets.
- int rc = poll (pollfds, npollfds, 0);
- if (rc == -1 && errno == EINTR && timeout_ >= 0) {
- free (pollfds);
- return 0;
}
- errno_assert (rc >= 0 || (rc == -1 && errno == EINTR));
- int timeout = timeout_ > 0 ? timeout_ / 1000 : -1;
+ bool first_pass = true;
int nevents = 0;
while (true) {
- // Process 0MQ commands if needed.
- if (nsockets && pollfds [npollfds -1].revents & POLLIN)
- if (!app_thread->process_commands (false, false)) {
+ // Compute the timeout for the subsequent poll.
+ int timeout;
+ if (first_pass)
+ timeout = 0;
+ else if (timeout_ < 0)
+ timeout = -1;
+ else
+ timeout = end - now;
+
+ // Wait for events.
+ while (true) {
+ int rc = poll (pollfds, nitems_, timeout);
+ if (rc == -1 && errno == EINTR) {
free (pollfds);
- errno = ETERM;
return -1;
}
+ errno_assert (rc >= 0);
+ break;
+ }
// Check for the events.
- int pollfd_pos = 0;
for (int i = 0; i != nitems_; i++) {
- // If the poll item is a raw file descriptor, simply convert
+ items_ [i].revents = 0;
+
+ // The poll item is a 0MQ socket. Retrieve pending events
+ // using the ZMQ_EVENTS socket option.
+ if (items_ [i].socket) {
+ size_t zmq_events_size = sizeof (uint32_t);
+ uint32_t zmq_events;
+ if (zmq_getsockopt (items_ [i].socket, ZMQ_EVENTS, &zmq_events,
+ &zmq_events_size) == -1) {
+ free (pollfds);
+ return -1;
+ }
+ if ((items_ [i].events & ZMQ_POLLOUT) &&
+ (zmq_events & ZMQ_POLLOUT))
+ items_ [i].revents |= ZMQ_POLLOUT;
+ if ((items_ [i].events & ZMQ_POLLIN) &&
+ (zmq_events & ZMQ_POLLIN))
+ items_ [i].revents |= ZMQ_POLLIN;
+ }
+ // Else, the poll item is a raw file descriptor, simply convert
// the events to zmq_pollitem_t-style format.
- if (!items_ [i].socket) {
- items_ [i].revents = 0;
- if (pollfds [pollfd_pos].revents & POLLIN)
+ else {
+ if (pollfds [i].revents & POLLIN)
items_ [i].revents |= ZMQ_POLLIN;
- if (pollfds [pollfd_pos].revents & POLLOUT)
+ if (pollfds [i].revents & POLLOUT)
items_ [i].revents |= ZMQ_POLLOUT;
- if (pollfds [pollfd_pos].revents & ~(POLLIN | POLLOUT))
+ if (pollfds [i].revents & ~(POLLIN | POLLOUT))
items_ [i].revents |= ZMQ_POLLERR;
-
- if (items_ [i].revents)
- nevents++;
- pollfd_pos++;
- continue;
}
- // The poll item is a 0MQ socket.
- zmq::socket_base_t *s = (zmq::socket_base_t*) items_ [i].socket;
- items_ [i].revents = 0;
- if ((items_ [i].events & ZMQ_POLLOUT) && s->has_out ())
- items_ [i].revents |= ZMQ_POLLOUT;
- if ((items_ [i].events & ZMQ_POLLIN) && s->has_in ())
- items_ [i].revents |= ZMQ_POLLIN;
if (items_ [i].revents)
nevents++;
}
- // If there's at least one event, or if we are asked not to block,
- // return immediately.
- if (nevents || !timeout_)
+ // If timout is zero, exit immediately whether there are events or not.
+ if (timeout_ == 0)
break;
- // Wait for events. Ignore interrupts if there's infinite timeout.
- while (true) {
- rc = poll (pollfds, npollfds, timeout);
- if (rc == -1 && errno == EINTR) {
- if (timeout_ < 0)
- continue;
- else {
- rc = 0;
- break;
- }
- }
- errno_assert (rc >= 0);
+ // If there are events to return, we can exit immediately.
+ if (nevents)
break;
+
+ // At this point we are meant to wait for events but there are none.
+ // If timeout is infinite we can just loop until we get some events.
+ if (timeout_ < 0) {
+ if (first_pass)
+ first_pass = false;
+ continue;
}
-
- // If timeout was hit with no events signaled, return zero.
- if (rc == 0)
- break;
- // If timeout was already applied, we don't want to poll anymore.
- // Setting timeout to zero will cause termination of the function
- // once the events we've got are processed.
- if (timeout > 0)
- timeout = 0;
+ // The timeout is finite and there are no events. In the first pass
+ // we get a timestamp of when the polling have begun. (We assume that
+ // first pass have taken negligible time). We also compute the time
+ // when the polling should time out.
+ if (first_pass) {
+ now = clock.now_ms ();
+ end = now + (timeout_ / 1000);
+ if (now == end)
+ break;
+ first_pass = false;
+ continue;
+ }
+
+ // Find out whether timeout have expired.
+ now = clock.now_ms ();
+ if (now >= end)
+ break;
}
free (pollfds);
return nevents;
-#elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS
+#elif defined ZMQ_POLL_BASED_ON_SELECT
+
+ if (unlikely (nitems_ < 0)) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (unlikely (nitems_ == 0)) {
+ if (timeout_ == 0)
+ return 0;
+#if defined ZMQ_HAVE_WINDOWS
+ Sleep (timeout_ > 0 ? timeout_ / 1000 : INFINITE);
+ return 0;
+#else
+ return usleep (timeout_);
+#endif
+ }
+
+ if (!items_) {
+ errno = EFAULT;
+ return -1;
+ }
+
+ zmq::clock_t clock;
+ uint64_t now = 0;
+ uint64_t end = 0;
+
+ // Ensure we do not attempt to select () on more than FD_SETSIZE
+ // file descriptors.
+ zmq_assert (nitems_ <= FD_SETSIZE);
fd_set pollset_in;
FD_ZERO (&pollset_in);
@@ -526,166 +567,163 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
fd_set pollset_err;
FD_ZERO (&pollset_err);
- zmq::app_thread_t *app_thread = NULL;
- int nsockets = 0;
- zmq::fd_t maxfd = zmq::retired_fd;
- zmq::fd_t notify_fd = zmq::retired_fd;
-
- // Ensure we do not attempt to select () on more than FD_SETSIZE
- // file descriptors.
- zmq_assert (nitems_ <= FD_SETSIZE);
+ zmq::fd_t maxfd = 0;
+ // Build the fd_sets for passing to select ().
for (int i = 0; i != nitems_; i++) {
- // 0MQ sockets.
+ // If the poll item is a 0MQ socket we are interested in input on the
+ // notification file descriptor retrieved by the ZMQ_FD socket option.
if (items_ [i].socket) {
-
- // Get the app_thread the socket is living in. If there are two
- // sockets in the same pollset with different app threads, fail.
- zmq::socket_base_t *s = (zmq::socket_base_t*) items_ [i].socket;
- if (app_thread) {
- if (app_thread != s->get_thread ()) {
- errno = EFAULT;
- return -1;
- }
+ size_t zmq_fd_size = sizeof (zmq::fd_t);
+ zmq::fd_t notify_fd;
+ if (zmq_getsockopt (items_ [i].socket, ZMQ_FD, &notify_fd,
+ &zmq_fd_size) == -1)
+ return -1;
+ if (items_ [i].events) {
+ FD_SET (notify_fd, &pollset_in);
+ if (maxfd < notify_fd)
+ maxfd = notify_fd;
}
- else
- app_thread = s->get_thread ();
-
- nsockets++;
- continue;
}
-
- // Raw file descriptors.
- if (items_ [i].events & ZMQ_POLLIN)
- FD_SET (items_ [i].fd, &pollset_in);
- if (items_ [i].events & ZMQ_POLLOUT)
- FD_SET (items_ [i].fd, &pollset_out);
- if (items_ [i].events & ZMQ_POLLERR)
- FD_SET (items_ [i].fd, &pollset_err);
- if (maxfd == zmq::retired_fd || maxfd < items_ [i].fd)
- maxfd = items_ [i].fd;
- }
-
- // If there's at least one 0MQ socket in the pollset we have to poll
- // for 0MQ commands. If ZMQ_POLL was not set, fail.
- if (nsockets) {
- notify_fd = app_thread->get_signaler ()->get_fd ();
- if (notify_fd == zmq::retired_fd) {
- errno = ENOTSUP;
- return -1;
+ // Else, the poll item is a raw file descriptor. Convert the poll item
+ // events to the appropriate fd_sets.
+ else {
+ if (items_ [i].events & ZMQ_POLLIN)
+ FD_SET (items_ [i].fd, &pollset_in);
+ if (items_ [i].events & ZMQ_POLLOUT)
+ FD_SET (items_ [i].fd, &pollset_out);
+ if (items_ [i].events & ZMQ_POLLERR)
+ FD_SET (items_ [i].fd, &pollset_err);
+ if (maxfd < items_ [i].fd)
+ maxfd = items_ [i].fd;
}
- FD_SET (notify_fd, &pollset_in);
- if (maxfd == zmq::retired_fd || maxfd < notify_fd)
- maxfd = notify_fd;
}
- bool block = (timeout_ < 0);
- timeval timeout = {timeout_ / 1000000, timeout_ % 1000000};
- timeval zero_timeout = {0, 0};
+ bool first_pass = true;
int nevents = 0;
-
- // First iteration just check for events, don't block. Waiting would
- // prevent exiting on any events that may already been signaled on
- // 0MQ sockets.
fd_set inset, outset, errset;
- memcpy (&inset, &pollset_in, sizeof (fd_set));
- memcpy (&outset, &pollset_out, sizeof (fd_set));
- memcpy (&errset, &pollset_err, sizeof (fd_set));
- int rc = select (maxfd, &inset, &outset, &errset, &zero_timeout);
-#if defined ZMQ_HAVE_WINDOWS
- wsa_assert (rc != SOCKET_ERROR);
-#else
- if (rc == -1 && errno == EINTR && timeout_ >= 0)
- return 0;
- errno_assert (rc >= 0 || (rc == -1 && errno == EINTR));
-#endif
while (true) {
- // Process 0MQ commands if needed.
- if (nsockets && FD_ISSET (notify_fd, &inset))
- if (!app_thread->process_commands (false, false)) {
- errno = ETERM;
+ // Compute the timeout for the subsequent poll.
+ timeval timeout;
+ timeval *ptimeout;
+ if (first_pass) {
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 0;
+ ptimeout = &timeout;
+ }
+ else if (timeout_ < 0)
+ ptimeout = NULL;
+ else {
+ timeout.tv_sec = (long) ((end - now) / 1000);
+ timeout.tv_usec = (long) ((end - now) % 1000 * 1000);
+ ptimeout = &timeout;
+ }
+
+ // Wait for events. Ignore interrupts if there's infinite timeout.
+ while (true) {
+ memcpy (&inset, &pollset_in, sizeof (fd_set));
+ memcpy (&outset, &pollset_out, sizeof (fd_set));
+ memcpy (&errset, &pollset_err, sizeof (fd_set));
+ int rc = select (maxfd + 1, &inset, &outset, &errset, ptimeout);
+#if defined ZMQ_HAVE_WINDOWS
+ wsa_assert (rc != SOCKET_ERROR);
+#else
+ if (rc == -1 && errno == EINTR)
return -1;
- }
+ errno_assert (rc >= 0);
+#endif
+ break;
+ }
// Check for the events.
for (int i = 0; i != nitems_; i++) {
- // If the poll item is a raw file descriptor, simply convert
+ items_ [i].revents = 0;
+
+ // The poll item is a 0MQ socket. Retrieve pending events
+ // using the ZMQ_EVENTS socket option.
+ if (items_ [i].socket) {
+ size_t zmq_events_size = sizeof (uint32_t);
+ uint32_t zmq_events;
+ if (zmq_getsockopt (items_ [i].socket, ZMQ_EVENTS, &zmq_events,
+ &zmq_events_size) == -1)
+ return -1;
+ if ((items_ [i].events & ZMQ_POLLOUT) &&
+ (zmq_events & ZMQ_POLLOUT))
+ items_ [i].revents |= ZMQ_POLLOUT;
+ if ((items_ [i].events & ZMQ_POLLIN) &&
+ (zmq_events & ZMQ_POLLIN))
+ items_ [i].revents |= ZMQ_POLLIN;
+ }
+ // Else, the poll item is a raw file descriptor, simply convert
// the events to zmq_pollitem_t-style format.
- if (!items_ [i].socket) {
- items_ [i].revents = 0;
+ else {
if (FD_ISSET (items_ [i].fd, &inset))
items_ [i].revents |= ZMQ_POLLIN;
if (FD_ISSET (items_ [i].fd, &outset))
items_ [i].revents |= ZMQ_POLLOUT;
if (FD_ISSET (items_ [i].fd, &errset))
items_ [i].revents |= ZMQ_POLLERR;
- if (items_ [i].revents)
- nevents++;
- continue;
}
- // The poll item is a 0MQ socket.
- zmq::socket_base_t *s = (zmq::socket_base_t*) items_ [i].socket;
- items_ [i].revents = 0;
- if ((items_ [i].events & ZMQ_POLLOUT) && s->has_out ())
- items_ [i].revents |= ZMQ_POLLOUT;
- if ((items_ [i].events & ZMQ_POLLIN) && s->has_in ())
- items_ [i].revents |= ZMQ_POLLIN;
if (items_ [i].revents)
nevents++;
}
- // If there's at least one event, or if we are asked not to block,
- // return immediately.
- if (nevents || (timeout.tv_sec == 0 && timeout.tv_usec == 0))
+ // If timout is zero, exit immediately whether there are events or not.
+ if (timeout_ == 0)
break;
- // Wait for events. Ignore interrupts if there's infinite timeout.
- while (true) {
- memcpy (&inset, &pollset_in, sizeof (fd_set));
- memcpy (&outset, &pollset_out, sizeof (fd_set));
- memcpy (&errset, &pollset_err, sizeof (fd_set));
- rc = select (maxfd, &inset, &outset, &errset,
- block ? NULL : &timeout);
-#if defined ZMQ_HAVE_WINDOWS
- wsa_assert (rc != SOCKET_ERROR);
-#else
- if (rc == -1 && errno == EINTR) {
- if (timeout_ < 0)
- continue;
- else {
- rc = 0;
- break;
- }
- }
- errno_assert (rc >= 0);
-#endif
+ // If there are events to return, we can exit immediately.
+ if (nevents)
break;
+
+ // At this point we are meant to wait for events but there are none.
+ // If timeout is infinite we can just loop until we get some events.
+ if (timeout_ < 0) {
+ if (first_pass)
+ first_pass = false;
+ continue;
+ }
+
+ // The timeout is finite and there are no events. In the first pass
+ // we get a timestamp of when the polling have begun. (We assume that
+ // first pass have taken negligible time). We also compute the time
+ // when the polling should time out.
+ if (first_pass) {
+ now = clock.now_ms ();
+ end = now + (timeout_ / 1000);
+ if (now == end)
+ break;
+ first_pass = false;
+ continue;
}
-
- // If timeout was hit with no events signaled, return zero.
- if (rc == 0)
- break;
- // If timeout was already applied, we don't want to poll anymore.
- // Setting timeout to zero will cause termination of the function
- // once the events we've got are processed.
- if (!block)
- timeout = zero_timeout;
+ // Find out whether timeout have expired.
+ now = clock.now_ms ();
+ if (now >= end)
+ break;
}
return nevents;
#else
+ // Exotic platforms that support neither poll() nor select().
errno = ENOTSUP;
return -1;
#endif
}
+#if defined ZMQ_POLL_BASED_ON_SELECT
+#undef ZMQ_POLL_BASED_ON_SELECT
+#endif
+#if defined ZMQ_POLL_BASED_ON_POLL
+#undef ZMQ_POLL_BASED_ON_POLL
+#endif
+
int zmq_errno ()
{
return errno;
@@ -697,80 +735,42 @@ int zmq_device (int device_, void *insocket_, void *outsocket_)
errno = EFAULT;
return -1;
}
- switch (device_) {
- case ZMQ_FORWARDER:
- return zmq::forwarder ((zmq::socket_base_t*) insocket_,
- (zmq::socket_base_t*) outsocket_);
- case ZMQ_QUEUE:
- return zmq::queue ((zmq::socket_base_t*) insocket_,
- (zmq::socket_base_t*) outsocket_);
- case ZMQ_STREAMER:
- return zmq::streamer ((zmq::socket_base_t*) insocket_,
- (zmq::socket_base_t*) outsocket_);
- default:
- return EINVAL;
+
+ if (device_ != ZMQ_FORWARDER && device_ != ZMQ_QUEUE &&
+ device_ != ZMQ_STREAMER) {
+ errno = EINVAL;
+ return -1;
}
+
+ return zmq::device ((zmq::socket_base_t*) insocket_,
+ (zmq::socket_base_t*) outsocket_);
}
////////////////////////////////////////////////////////////////////////////////
// 0MQ utils - to be used by perf tests
////////////////////////////////////////////////////////////////////////////////
-#if defined ZMQ_HAVE_WINDOWS
-
-static uint64_t now ()
-{
- // Get the high resolution counter's accuracy.
- LARGE_INTEGER ticksPerSecond;
- QueryPerformanceFrequency (&ticksPerSecond);
-
- // What time is it?
- LARGE_INTEGER tick;
- QueryPerformanceCounter (&tick);
-
- // Convert the tick number into the number of seconds
- // since the system was started.
- double ticks_div = (double) (ticksPerSecond.QuadPart / 1000000);
- return (uint64_t) (tick.QuadPart / ticks_div);
-}
-
void zmq_sleep (int seconds_)
{
+#if defined ZMQ_HAVE_WINDOWS
Sleep (seconds_ * 1000);
-}
-
#else
-
-static uint64_t now ()
-{
- struct timeval tv;
- int rc;
-
- rc = gettimeofday (&tv, NULL);
- assert (rc == 0);
- return (tv.tv_sec * (uint64_t) 1000000 + tv.tv_usec);
-}
-
-void zmq_sleep (int seconds_)
-{
sleep (seconds_);
-}
-
#endif
+}
void *zmq_stopwatch_start ()
{
uint64_t *watch = (uint64_t*) malloc (sizeof (uint64_t));
- assert (watch);
- *watch = now ();
+ alloc_assert (watch);
+ *watch = zmq::clock_t::now_us ();
return (void*) watch;
}
unsigned long zmq_stopwatch_stop (void *watch_)
{
- uint64_t end = now ();
+ uint64_t end = zmq::clock_t::now_us ();
uint64_t start = *(uint64_t*) watch_;
free (watch_);
return (unsigned long) (end - start);
}
-
diff --git a/src/zmq_connecter.cpp b/src/zmq_connecter.cpp
index ebd7572..fb77cdc 100644
--- a/src/zmq_connecter.cpp
+++ b/src/zmq_connecter.cpp
@@ -1,73 +1,69 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <new>
+#include "platform.hpp"
+#if defined ZMQ_HAVE_WINDOWS
+#include "windows.hpp"
+#else
+#include <sys/types.h>
+#include <unistd.h>
+#endif
+
#include "zmq_connecter.hpp"
#include "zmq_engine.hpp"
#include "zmq_init.hpp"
#include "io_thread.hpp"
#include "err.hpp"
-zmq::zmq_connecter_t::zmq_connecter_t (io_thread_t *parent_,
- socket_base_t *owner_, const options_t &options_,
- uint64_t session_ordinal_, bool wait_) :
- owned_t (parent_, owner_),
- io_object_t (parent_),
+zmq::zmq_connecter_t::zmq_connecter_t (class io_thread_t *io_thread_,
+ class session_t *session_, const options_t &options_,
+ const char *protocol_, const char *address_, bool wait_) :
+ own_t (io_thread_, options_),
+ io_object_t (io_thread_),
handle_valid (false),
wait (wait_),
- session_ordinal (session_ordinal_),
- options (options_)
+ session (session_),
+ current_reconnect_ivl(options.reconnect_ivl)
{
+ int rc = tcp_connecter.set_address (protocol_, address_);
+ zmq_assert (rc == 0);
}
zmq::zmq_connecter_t::~zmq_connecter_t ()
{
-}
-
-int zmq::zmq_connecter_t::set_address (const char *protocol_,
- const char *address_)
-{
- int rc = tcp_connecter.set_address (protocol_, address_);
- if (rc != 0)
- return rc;
- protocol = protocol_;
- address = address_;
- return 0;
+ if (wait)
+ cancel_timer (reconnect_timer_id);
+ if (handle_valid)
+ rm_fd (handle);
}
void zmq::zmq_connecter_t::process_plug ()
{
if (wait)
- add_timer ();
+ add_reconnect_timer();
else
start_connecting ();
}
-void zmq::zmq_connecter_t::process_unplug ()
-{
- if (wait)
- cancel_timer ();
- if (handle_valid)
- rm_fd (handle);
-}
-
void zmq::zmq_connecter_t::in_event ()
{
// We are not polling for incomming data, so we are actually called
@@ -86,25 +82,28 @@ void zmq::zmq_connecter_t::out_event ()
if (fd == retired_fd) {
tcp_connecter.close ();
wait = true;
- add_timer ();
+ add_reconnect_timer();
return;
}
+ // Choose I/O thread to run connecter in. Given that we are already
+ // running in an I/O thread, there must be at least one available.
+ io_thread_t *io_thread = choose_io_thread (options.affinity);
+ zmq_assert (io_thread);
+
// Create an init object.
- zmq_init_t *init = new (std::nothrow) zmq_init_t (
- choose_io_thread (options.affinity), owner,
- fd, options, true, protocol.c_str (), address.c_str (),
- session_ordinal);
- zmq_assert (init);
- send_plug (init);
- send_own (owner, init);
-
- // Ask owner socket to shut the connecter down.
- term ();
+ zmq_init_t *init = new (std::nothrow) zmq_init_t (io_thread, NULL,
+ session, fd, options);
+ alloc_assert (init);
+ launch_sibling (init);
+
+ // Shut the connecter down.
+ terminate ();
}
-void zmq::zmq_connecter_t::timer_event ()
+void zmq::zmq_connecter_t::timer_event (int id_)
{
+ zmq_assert (id_ == reconnect_timer_id);
wait = false;
start_connecting ();
}
@@ -132,5 +131,36 @@ void zmq::zmq_connecter_t::start_connecting ()
// Handle any other error condition by eventual reconnect.
wait = true;
- add_timer ();
+ add_reconnect_timer();
+}
+
+void zmq::zmq_connecter_t::add_reconnect_timer()
+{
+ add_timer (get_new_reconnect_ivl(), reconnect_timer_id);
+}
+
+int zmq::zmq_connecter_t::get_new_reconnect_ivl ()
+{
+#if defined ZMQ_HAVE_WINDOWS
+ int pid = (int) GetCurrentProcessId ();
+#else
+ int pid = (int) getpid ();
+#endif
+
+ // The new interval is the current interval + random value.
+ int this_interval = current_reconnect_ivl +
+ ((pid * 13) % options.reconnect_ivl);
+
+ // Only change the current reconnect interval if the maximum reconnect
+ // interval was set and if it's larger than the reconnect interval.
+ if (options.reconnect_ivl_max > 0 &&
+ options.reconnect_ivl_max > options.reconnect_ivl) {
+
+ // Calculate the next interval
+ current_reconnect_ivl = current_reconnect_ivl * 2;
+ if(current_reconnect_ivl >= options.reconnect_ivl_max) {
+ current_reconnect_ivl = options.reconnect_ivl_max;
+ }
+ }
+ return this_interval;
}
diff --git a/src/zmq_connecter.hpp b/src/zmq_connecter.hpp
index 328dd6a..31a6d9b 100644
--- a/src/zmq_connecter.hpp
+++ b/src/zmq_connecter.hpp
@@ -1,61 +1,69 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_ZMQ_CONNECTER_HPP_INCLUDED__
#define __ZMQ_ZMQ_CONNECTER_HPP_INCLUDED__
-#include <string>
-
-#include "owned.hpp"
+#include "own.hpp"
#include "io_object.hpp"
#include "tcp_connecter.hpp"
-#include "options.hpp"
#include "stdint.hpp"
namespace zmq
{
- class zmq_connecter_t : public owned_t, public io_object_t
+ class zmq_connecter_t : public own_t, public io_object_t
{
public:
- zmq_connecter_t (class io_thread_t *parent_, socket_base_t *owner_,
- const options_t &options_, uint64_t session_ordinal_, bool wait_);
+ // If 'wait' is true connecter first waits for a while, then starts
+ // connection process.
+ zmq_connecter_t (class io_thread_t *io_thread_,
+ class session_t *session_, const options_t &options_,
+ const char *protocol_, const char *address_, bool delay_);
~zmq_connecter_t ();
- // Set address to connect to.
- int set_address (const char *protocol_, const char *address_);
-
private:
+ // ID of the timer used to delay the reconnection.
+ enum {reconnect_timer_id = 1};
+
// Handlers for incoming commands.
void process_plug ();
- void process_unplug ();
// Handlers for I/O events.
void in_event ();
void out_event ();
- void timer_event ();
+ void timer_event (int id_);
// Internal function to start the actual connection establishment.
void start_connecting ();
+ // Internal function to add a reconnect timer
+ void add_reconnect_timer();
+
+ // Internal function to return a reconnect backoff delay.
+ // Will modify the current_reconnect_ivl used for next call
+ // Returns the currently used interval
+ int get_new_reconnect_ivl ();
+
// Actual connecting socket.
tcp_connecter_t tcp_connecter;
@@ -69,18 +77,14 @@ namespace zmq
// If true, connecter is waiting a while before trying to connect.
bool wait;
- // Ordinal of the session to attach to.
- uint64_t session_ordinal;
-
- // Associated socket options.
- options_t options;
+ // Reference to the session we belong to.
+ class session_t *session;
- // Protocol and address to connect to.
- std::string protocol;
- std::string address;
+ // Current reconnect ivl, updated for backoff strategy
+ int current_reconnect_ivl;
zmq_connecter_t (const zmq_connecter_t&);
- void operator = (const zmq_connecter_t&);
+ const zmq_connecter_t &operator = (const zmq_connecter_t&);
};
}
diff --git a/src/zmq_decoder.hpp b/src/zmq_decoder.hpp
deleted file mode 100644
index c1e3e3e..0000000
--- a/src/zmq_decoder.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __ZMQ_ZMQ_DECODER_HPP_INCLUDED__
-#define __ZMQ_ZMQ_DECODER_HPP_INCLUDED__
-
-#include "../include/zmq.h"
-
-#include "decoder.hpp"
-#include "blob.hpp"
-
-namespace zmq
-{
- // Decoder for 0MQ backend protocol. Converts data batches into messages.
-
- class zmq_decoder_t : public decoder_t <zmq_decoder_t>
- {
- public:
-
- zmq_decoder_t (size_t bufsize_);
- ~zmq_decoder_t ();
-
- void set_inout (struct i_inout *destination_);
-
- private:
-
- bool one_byte_size_ready ();
- bool eight_byte_size_ready ();
- bool flags_ready ();
- bool message_ready ();
-
- struct i_inout *destination;
- unsigned char tmpbuf [8];
- ::zmq_msg_t in_progress;
-
- zmq_decoder_t (const zmq_decoder_t&);
- void operator = (const zmq_decoder_t&);
- };
-
-}
-
-#endif
-
diff --git a/src/zmq_encoder.hpp b/src/zmq_encoder.hpp
deleted file mode 100644
index 61899f4..0000000
--- a/src/zmq_encoder.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- Copyright (c) 2007-2010 iMatix Corporation
-
- This file is part of 0MQ.
-
- 0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU 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
- Lesser GNU General Public License for more details.
-
- You should have received a copy of the Lesser GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __ZMQ_ZMQ_ENCODER_HPP_INCLUDED__
-#define __ZMQ_ZMQ_ENCODER_HPP_INCLUDED__
-
-#include "../include/zmq.h"
-
-#include "encoder.hpp"
-
-namespace zmq
-{
- // Encoder for 0MQ backend protocol. Converts messages into data batches.
-
- class zmq_encoder_t : public encoder_t <zmq_encoder_t>
- {
- public:
-
- zmq_encoder_t (size_t bufsize_);
- ~zmq_encoder_t ();
-
- void set_inout (struct i_inout *source_);
-
- private:
-
- bool size_ready ();
- bool message_ready ();
-
- struct i_inout *source;
- ::zmq_msg_t in_progress;
- unsigned char tmpbuf [10];
-
- zmq_encoder_t (const zmq_encoder_t&);
- void operator = (const zmq_encoder_t&);
- };
-}
-
-#endif
-
diff --git a/src/zmq_engine.cpp b/src/zmq_engine.cpp
index 41b10c8..57a8baf 100644
--- a/src/zmq_engine.cpp
+++ b/src/zmq_engine.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -32,10 +33,7 @@
#include "config.hpp"
#include "err.hpp"
-zmq::zmq_engine_t::zmq_engine_t (io_thread_t *parent_, fd_t fd_,
- const options_t &options_, bool reconnect_,
- const char *protocol_, const char *address_) :
- io_object_t (parent_),
+zmq::zmq_engine_t::zmq_engine_t (fd_t fd_, const options_t &options_) :
inpos (NULL),
insize (0),
decoder (in_batch_size),
@@ -43,14 +41,10 @@ zmq::zmq_engine_t::zmq_engine_t (io_thread_t *parent_, fd_t fd_,
outsize (0),
encoder (out_batch_size),
inout (NULL),
+ ephemeral_inout (NULL),
options (options_),
- reconnect (reconnect_)
+ plugged (false)
{
- if (reconnect) {
- protocol = protocol_;
- address = address_;
- }
-
// Initialise the underlying socket.
int rc = tcp_socket.open (fd_, options.sndbuf, options.rcvbuf);
zmq_assert (rc == 0);
@@ -58,33 +52,56 @@ zmq::zmq_engine_t::zmq_engine_t (io_thread_t *parent_, fd_t fd_,
zmq::zmq_engine_t::~zmq_engine_t ()
{
+ zmq_assert (!plugged);
}
-void zmq::zmq_engine_t::plug (i_inout *inout_)
+void zmq::zmq_engine_t::plug (io_thread_t *io_thread_, i_inout *inout_)
{
- zmq_assert (!inout);
+ zmq_assert (!plugged);
+ plugged = true;
+ ephemeral_inout = NULL;
+ // Connect to session/init object.
+ zmq_assert (!inout);
+ zmq_assert (inout_);
encoder.set_inout (inout_);
decoder.set_inout (inout_);
+ inout = inout_;
+ // Connect to I/O threads poller object.
+ io_object_t::plug (io_thread_);
handle = add_fd (tcp_socket.get_fd ());
set_pollin (handle);
set_pollout (handle);
- inout = inout_;
-
// Flush all the data that may have been already received downstream.
in_event ();
}
void zmq::zmq_engine_t::unplug ()
{
+ zmq_assert (plugged);
+ plugged = false;
+
+ // Cancel all fd subscriptions.
rm_fd (handle);
+
+ // Disconnect from I/O threads poller object.
+ io_object_t::unplug ();
+
+ // Disconnect from init/session object.
encoder.set_inout (NULL);
decoder.set_inout (NULL);
+ ephemeral_inout = inout;
inout = NULL;
}
+void zmq::zmq_engine_t::terminate ()
+{
+ unplug ();
+ delete this;
+}
+
void zmq::zmq_engine_t::in_event ()
{
bool disconnection = false;
@@ -106,23 +123,36 @@ void zmq::zmq_engine_t::in_event ()
// Push the data to the decoder.
size_t processed = decoder.process_buffer (inpos, insize);
- // Stop polling for input if we got stuck.
- if (processed < insize) {
-
- // This may happen if queue limits are in effect or when
- // init object reads all required information from the socket
- // and rejects to read more data.
- reset_pollin (handle);
+ if (unlikely (processed == (size_t) -1)) {
+ disconnection = true;
}
+ else {
+
+ // Stop polling for input if we got stuck.
+ if (processed < insize) {
- // Adjust the buffer.
- inpos += processed;
- insize -= processed;
+ // This may happen if queue limits are in effect or when
+ // init object reads all required information from the socket
+ // and rejects to read more data.
+ if (plugged)
+ reset_pollin (handle);
+ }
+
+ // Adjust the buffer.
+ inpos += processed;
+ insize -= processed;
+ }
// Flush all messages the decoder may have produced.
- inout->flush ();
+ // If IO handler has unplugged engine, flush transient IO handler.
+ if (unlikely (!plugged)) {
+ zmq_assert (ephemeral_inout);
+ ephemeral_inout->flush ();
+ } else {
+ inout->flush ();
+ }
- if (disconnection)
+ if (inout && disconnection)
error ();
}
@@ -133,7 +163,14 @@ void zmq::zmq_engine_t::out_event ()
outpos = NULL;
encoder.get_data (&outpos, &outsize);
-
+
+ // If IO handler has unplugged engine, flush transient IO handler.
+ if (unlikely (!plugged)) {
+ zmq_assert (ephemeral_inout);
+ ephemeral_inout->flush ();
+ return;
+ }
+
// If there is no data to send, stop polling for output.
if (outsize == 0) {
reset_pollout (handle);
@@ -155,7 +192,7 @@ void zmq::zmq_engine_t::out_event ()
outsize -= nbytes;
}
-void zmq::zmq_engine_t::revive ()
+void zmq::zmq_engine_t::activate_out ()
{
set_pollout (handle);
@@ -166,30 +203,18 @@ void zmq::zmq_engine_t::revive ()
out_event ();
}
-void zmq::zmq_engine_t::resume_input ()
+void zmq::zmq_engine_t::activate_in ()
{
set_pollin (handle);
+ // Speculative read.
in_event ();
}
void zmq::zmq_engine_t::error ()
{
zmq_assert (inout);
-
- zmq_connecter_t *reconnecter = NULL;
- if (reconnect) {
-
- // Create a connecter object to attempt reconnect.
- // Ask it to wait for a while before reconnecting.
- reconnecter = new (std::nothrow) zmq_connecter_t (
- inout->get_io_thread (), inout->get_owner (),
- options, inout->get_ordinal (), true);
- zmq_assert (reconnecter);
- reconnecter->set_address (protocol.c_str(), address.c_str ());
- }
-
- inout->detach (reconnecter);
+ inout->detach ();
unplug ();
delete this;
}
diff --git a/src/zmq_engine.hpp b/src/zmq_engine.hpp
index d89dccc..47073cc 100644
--- a/src/zmq_engine.hpp
+++ b/src/zmq_engine.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,8 +28,8 @@
#include "i_engine.hpp"
#include "io_object.hpp"
#include "tcp_socket.hpp"
-#include "zmq_encoder.hpp"
-#include "zmq_decoder.hpp"
+#include "encoder.hpp"
+#include "decoder.hpp"
#include "options.hpp"
namespace zmq
@@ -38,16 +39,15 @@ namespace zmq
{
public:
- zmq_engine_t (class io_thread_t *parent_, fd_t fd_,
- const options_t &options_, bool reconnect_,
- const char *protocol_, const char *address_);
+ zmq_engine_t (fd_t fd_, const options_t &options_);
~zmq_engine_t ();
// i_engine interface implementation.
- void plug (struct i_inout *inout_);
+ void plug (class io_thread_t *io_thread_, struct i_inout *inout_);
void unplug ();
- void revive ();
- void resume_input ();
+ void terminate ();
+ void activate_in ();
+ void activate_out ();
// i_poll_events interface implementation.
void in_event ();
@@ -63,22 +63,23 @@ namespace zmq
unsigned char *inpos;
size_t insize;
- zmq_decoder_t decoder;
+ decoder_t decoder;
unsigned char *outpos;
size_t outsize;
- zmq_encoder_t encoder;
+ encoder_t encoder;
i_inout *inout;
+ // Detached transient inout handler.
+ i_inout *ephemeral_inout;
+
options_t options;
- bool reconnect;
- std::string protocol;
- std::string address;
+ bool plugged;
zmq_engine_t (const zmq_engine_t&);
- void operator = (const zmq_engine_t&);
+ const zmq_engine_t &operator = (const zmq_engine_t&);
};
}
diff --git a/src/zmq_init.cpp b/src/zmq_init.cpp
index 5824f5c..cf65d69 100644
--- a/src/zmq_init.cpp
+++ b/src/zmq_init.cpp
@@ -1,50 +1,56 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include "zmq_init.hpp"
+#include "transient_session.hpp"
+#include "named_session.hpp"
+#include "socket_base.hpp"
#include "zmq_engine.hpp"
#include "io_thread.hpp"
#include "session.hpp"
#include "uuid.hpp"
+#include "blob.hpp"
#include "err.hpp"
-zmq::zmq_init_t::zmq_init_t (io_thread_t *parent_, socket_base_t *owner_,
- fd_t fd_, const options_t &options_, bool reconnect_,
- const char *protocol_, const char *address_, uint64_t session_ordinal_) :
- owned_t (parent_, owner_),
+zmq::zmq_init_t::zmq_init_t (io_thread_t *io_thread_,
+ socket_base_t *socket_, session_t *session_, fd_t fd_,
+ const options_t &options_) :
+ own_t (io_thread_, options_),
+ ephemeral_engine (NULL),
sent (false),
received (false),
- session_ordinal (session_ordinal_),
- options (options_)
+ socket (socket_),
+ session (session_),
+ io_thread (io_thread_)
{
// Create the engine object for this connection.
- engine = new (std::nothrow) zmq_engine_t (parent_, fd_, options,
- reconnect_, protocol_, address_);
- zmq_assert (engine);
+ engine = new (std::nothrow) zmq_engine_t (fd_, options);
+ alloc_assert (engine);
}
zmq::zmq_init_t::~zmq_init_t ()
{
if (engine)
- delete engine;
+ engine->terminate ();
}
bool zmq::zmq_init_t::read (::zmq_msg_t *msg_)
@@ -60,9 +66,8 @@ bool zmq::zmq_init_t::read (::zmq_msg_t *msg_)
options.identity.size ());
sent = true;
- // If initialisation is done, pass the engine to the session and
- // destroy the init object.
- finalise ();
+ // Try finalize initialization.
+ finalise_initialisation ();
return true;
}
@@ -85,9 +90,14 @@ bool zmq::zmq_init_t::write (::zmq_msg_t *msg_)
peer_identity.assign ((const unsigned char*) zmq_msg_data (msg_),
zmq_msg_size (msg_));
}
+ int rc = zmq_msg_close (msg_);
+ zmq_assert (rc == 0);
received = true;
+ // Try finalize initialization.
+ finalise_initialisation ();
+
return true;
}
@@ -97,46 +107,30 @@ void zmq::zmq_init_t::flush ()
if (!received)
return;
- // If initialisation is done, pass the engine to the session and
- // destroy the init object.
- finalise ();
+ // Initialization is done, dispatch engine.
+ if (ephemeral_engine)
+ dispatch_engine ();
}
-void zmq::zmq_init_t::detach (owned_t *reconnecter_)
+void zmq::zmq_init_t::detach ()
{
// This function is called by engine when disconnection occurs.
- // If required, launch the reconnecter.
- if (reconnecter_) {
- send_plug (reconnecter_);
- send_own (owner, reconnecter_);
- }
+ // If there is an associated session, send it a null engine to let it know
+ // that connection process was unsuccesful.
+ if (session)
+ send_attach (session, NULL, blob_t (), true);
// The engine will destroy itself, so let's just drop the pointer here and
// start termination of the init object.
engine = NULL;
- term ();
-}
-
-zmq::io_thread_t *zmq::zmq_init_t::get_io_thread ()
-{
- return choose_io_thread (options.affinity);
-}
-
-class zmq::socket_base_t *zmq::zmq_init_t::get_owner ()
-{
- return owner;
-}
-
-uint64_t zmq::zmq_init_t::get_ordinal ()
-{
- return session_ordinal;
+ terminate ();
}
void zmq::zmq_init_t::process_plug ()
{
zmq_assert (engine);
- engine->plug (this);
+ engine->plug (io_thread, this);
}
void zmq::zmq_init_t::process_unplug ()
@@ -145,51 +139,78 @@ void zmq::zmq_init_t::process_unplug ()
engine->unplug ();
}
-void zmq::zmq_init_t::finalise ()
+void zmq::zmq_init_t::finalise_initialisation ()
+{
+ // Unplug and prepare to dispatch engine.
+ if (sent && received) {
+ ephemeral_engine = engine;
+ engine = NULL;
+ ephemeral_engine->unplug ();
+ return;
+ }
+}
+
+void zmq::zmq_init_t::dispatch_engine ()
{
if (sent && received) {
- // Disconnect the engine from the init object.
- engine->unplug ();
+ // Engine must be detached.
+ zmq_assert (!engine);
+ zmq_assert (ephemeral_engine);
+
+ // If we know what session we belong to, it's easy, just send the
+ // engine to that session and destroy the init object. Note that we
+ // know about the session only if this object is owned by it. Thus,
+ // lifetime of this object in contained in the lifetime of the session
+ // so the pointer cannot become invalid without notice.
+ if (session) {
+ send_attach (session, ephemeral_engine, peer_identity, true);
+ terminate ();
+ return;
+ }
- session_t *session = NULL;
-
- // If we have the session ordinal, let's use it to find the session.
- // If it is not found, it means socket is already being shut down
- // and the session have been deallocated.
- // TODO: We should check whether the name of the peer haven't changed
- // upon reconnection.
- if (session_ordinal) {
- session = owner->find_session (session_ordinal);
- if (!session) {
- term ();
- return;
- }
+ // All the cases below are listener-based. Therefore we need the socket
+ // reference so that new sessions can bind to that socket.
+ zmq_assert (socket);
+
+ // We have no associated session. If the peer has no identity we'll
+ // create a transient session for the connection. Note that
+ // seqnum is incremented to account for attach command before the
+ // session is launched. That way we are sure it won't terminate before
+ // being attached.
+ if (peer_identity [0] == 0) {
+ session = new (std::nothrow) transient_session_t (io_thread,
+ socket, options);
+ alloc_assert (session);
+ session->inc_seqnum ();
+ launch_sibling (session);
+ send_attach (session, ephemeral_engine, peer_identity, false);
+ terminate ();
+ return;
}
- else {
-
- // If the peer has a unique name, find the associated session.
- // If it does not exist, create it.
- zmq_assert (!peer_identity.empty ());
- session = owner->find_session (peer_identity);
- if (!session) {
- session = new (std::nothrow) session_t (
- choose_io_thread (options.affinity), owner, options,
- peer_identity);
- zmq_assert (session);
- send_plug (session);
- send_own (owner, session);
-
- // Reserve a sequence number for following 'attach' command.
- session->inc_seqnum ();
- }
+
+ // Try to find the session corresponding to the peer's identity.
+ // If found, send the engine to that session and destroy this object.
+ // Note that session's seqnum is incremented by find_session rather
+ // than by send_attach.
+ session = socket->find_session (peer_identity);
+ if (session) {
+ send_attach (session, ephemeral_engine, peer_identity, false);
+ terminate ();
+ return;
}
- // No need to increment seqnum as it was already incremented above.
- send_attach (session, engine, peer_identity, false);
-
- // Destroy the init object.
- engine = NULL;
- term ();
+ // There's no such named session. We have to create one. Note that
+ // seqnum is incremented to account for attach command before the
+ // session is launched. That way we are sure it won't terminate before
+ // being attached.
+ session = new (std::nothrow) named_session_t (io_thread, socket,
+ options, peer_identity);
+ alloc_assert (session);
+ session->inc_seqnum ();
+ launch_sibling (session);
+ send_attach (session, ephemeral_engine, peer_identity, false);
+ terminate ();
+ return;
}
}
diff --git a/src/zmq_init.hpp b/src/zmq_init.hpp
index 6f935c2..d90915a 100644
--- a/src/zmq_init.hpp
+++ b/src/zmq_init.hpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,10 +23,9 @@
#include "i_inout.hpp"
#include "i_engine.hpp"
-#include "owned.hpp"
+#include "own.hpp"
#include "fd.hpp"
#include "stdint.hpp"
-#include "options.hpp"
#include "stdint.hpp"
#include "blob.hpp"
@@ -34,54 +34,58 @@ namespace zmq
// The class handles initialisation phase of 0MQ wire-level protocol.
- class zmq_init_t : public owned_t, public i_inout
+ class zmq_init_t : public own_t, public i_inout
{
public:
- zmq_init_t (class io_thread_t *parent_, socket_base_t *owner_,
- fd_t fd_, const options_t &options_, bool reconnect_,
- const char *protocol_, const char *address_,
- uint64_t session_ordinal_);
+ zmq_init_t (class io_thread_t *io_thread_, class socket_base_t *socket_,
+ class session_t *session_, fd_t fd_, const options_t &options_);
~zmq_init_t ();
private:
- void finalise ();
+ void finalise_initialisation ();
+ void dispatch_engine ();
// i_inout interface implementation.
bool read (::zmq_msg_t *msg_);
bool write (::zmq_msg_t *msg_);
void flush ();
- void detach (owned_t *reconnecter_);
- class io_thread_t *get_io_thread ();
- class socket_base_t *get_owner ();
- uint64_t get_ordinal ();
+ void detach ();
// Handlers for incoming commands.
void process_plug ();
void process_unplug ();
- // Associated wite-protocol engine.
+ // Associated wire-protocol engine.
i_engine *engine;
+ // Detached transient engine.
+ i_engine *ephemeral_engine;
+
// True if our own identity was already sent to the peer.
bool sent;
// True if peer's identity was already received.
bool received;
+ // Socket the object belongs to.
+ class socket_base_t *socket;
+
+ // Reference to the session the init object belongs to.
+ // If the associated session is unknown and should be found
+ // depending on peer identity this value is NULL.
+ class session_t *session;
+
// Identity of the peer socket.
blob_t peer_identity;
- // TCP connecter creates session before the name of the peer is known.
- // Thus we know only its ordinal number.
- uint64_t session_ordinal;
-
- // Associated socket options.
- options_t options;
+ // I/O thread the object is living in. It will be used to plug
+ // the engine into the same I/O thread.
+ class io_thread_t *io_thread;
zmq_init_t (const zmq_init_t&);
- void operator = (const zmq_init_t&);
+ const zmq_init_t &operator = (const zmq_init_t&);
};
}
diff --git a/src/zmq_listener.cpp b/src/zmq_listener.cpp
index d7cf292..e3f3bd8 100644
--- a/src/zmq_listener.cpp
+++ b/src/zmq_listener.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -24,11 +25,11 @@
#include "io_thread.hpp"
#include "err.hpp"
-zmq::zmq_listener_t::zmq_listener_t (io_thread_t *parent_,
- socket_base_t *owner_, const options_t &options_) :
- owned_t (parent_, owner_),
- io_object_t (parent_),
- options (options_)
+zmq::zmq_listener_t::zmq_listener_t (io_thread_t *io_thread_,
+ socket_base_t *socket_, const options_t &options_) :
+ own_t (io_thread_, options_),
+ io_object_t (io_thread_),
+ socket (socket_)
{
}
@@ -38,7 +39,7 @@ zmq::zmq_listener_t::~zmq_listener_t ()
int zmq::zmq_listener_t::set_address (const char *protocol_, const char *addr_)
{
- return tcp_listener.set_address (protocol_, addr_);
+ return tcp_listener.set_address (protocol_, addr_, options.backlog);
}
void zmq::zmq_listener_t::process_plug ()
@@ -48,9 +49,10 @@ void zmq::zmq_listener_t::process_plug ()
set_pollin (handle);
}
-void zmq::zmq_listener_t::process_unplug ()
+void zmq::zmq_listener_t::process_term (int linger_)
{
rm_fd (handle);
+ own_t::process_term (linger_);
}
void zmq::zmq_listener_t::in_event ()
@@ -62,14 +64,15 @@ void zmq::zmq_listener_t::in_event ()
if (fd == retired_fd)
return;
- // Create an init object.
+ // Choose I/O thread to run connecter in. Given that we are already
+ // running in an I/O thread, there must be at least one available.
io_thread_t *io_thread = choose_io_thread (options.affinity);
- zmq_init_t *init = new (std::nothrow) zmq_init_t (
- io_thread, owner, fd, options, false, NULL, NULL, 0);
- zmq_assert (init);
- send_plug (init);
- send_own (owner, init);
-}
-
+ zmq_assert (io_thread);
+ // Create and launch an init object.
+ zmq_init_t *init = new (std::nothrow) zmq_init_t (io_thread, socket,
+ NULL, fd, options);
+ alloc_assert (init);
+ launch_child (init);
+}
diff --git a/src/zmq_listener.hpp b/src/zmq_listener.hpp
index c990b02..82f4590 100644
--- a/src/zmq_listener.hpp
+++ b/src/zmq_listener.hpp
@@ -1,40 +1,40 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_ZMQ_LISTENER_HPP_INCLUDED__
#define __ZMQ_ZMQ_LISTENER_HPP_INCLUDED__
-#include "owned.hpp"
+#include "own.hpp"
#include "io_object.hpp"
#include "tcp_listener.hpp"
-#include "options.hpp"
#include "stdint.hpp"
namespace zmq
{
- class zmq_listener_t : public owned_t, public io_object_t
+ class zmq_listener_t : public own_t, public io_object_t
{
public:
- zmq_listener_t (class io_thread_t *parent_, socket_base_t *owner_,
- const options_t &options_);
+ zmq_listener_t (class io_thread_t *io_thread_,
+ class socket_base_t *socket_, const options_t &options_);
~zmq_listener_t ();
// Set address to listen on.
@@ -44,7 +44,7 @@ namespace zmq
// Handlers for incoming commands.
void process_plug ();
- void process_unplug ();
+ void process_term (int linger_);
// Handlers for I/O events.
void in_event ();
@@ -55,11 +55,11 @@ namespace zmq
// Handle corresponding to the listening socket.
handle_t handle;
- // Associated socket options.
- options_t options;
+ // Socket the listerner belongs to.
+ class socket_base_t *socket;
zmq_listener_t (const zmq_listener_t&);
- void operator = (const zmq_listener_t&);
+ const zmq_listener_t &operator = (const zmq_listener_t&);
};
}
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..ebbc46c
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,30 @@
+INCLUDES = -I$(top_builddir)/include
+LDADD = $(top_builddir)/src/libzmq.la
+
+noinst_PROGRAMS = test_pair_inproc \
+ test_pair_tcp \
+ test_reqrep_inproc \
+ test_reqrep_tcp \
+ test_hwm
+
+if !ON_MINGW
+noinst_PROGRAMS += test_shutdown_stress \
+ test_pair_ipc \
+ test_reqrep_ipc
+endif
+
+test_pair_inproc_SOURCES = test_pair_inproc.cpp testutil.hpp
+test_pair_tcp_SOURCES = test_pair_tcp.cpp testutil.hpp
+
+test_reqrep_inproc_SOURCES = test_reqrep_inproc.cpp testutil.hpp
+test_reqrep_tcp_SOURCES = test_reqrep_tcp.cpp testutil.hpp
+
+test_hwm_SOURCES = test_hwm.cpp
+
+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
+endif
+
+TESTS = $(noinst_PROGRAMS)
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..f6c9c15
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,707 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = test_pair_inproc$(EXEEXT) test_pair_tcp$(EXEEXT) \
+ test_reqrep_inproc$(EXEEXT) test_reqrep_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
+
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
+ $(top_srcdir)/config/ltoptions.m4 \
+ $(top_srcdir)/config/ltsugar.m4 \
+ $(top_srcdir)/config/ltversion.m4 \
+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/platform.hpp
+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)
+PROGRAMS = $(noinst_PROGRAMS)
+am_test_hwm_OBJECTS = test_hwm.$(OBJEXT)
+test_hwm_OBJECTS = $(am_test_hwm_OBJECTS)
+test_hwm_LDADD = $(LDADD)
+test_hwm_DEPENDENCIES = $(top_builddir)/src/libzmq.la
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am_test_pair_inproc_OBJECTS = test_pair_inproc.$(OBJEXT)
+test_pair_inproc_OBJECTS = $(am_test_pair_inproc_OBJECTS)
+test_pair_inproc_LDADD = $(LDADD)
+test_pair_inproc_DEPENDENCIES = $(top_builddir)/src/libzmq.la
+am__test_pair_ipc_SOURCES_DIST = test_pair_ipc.cpp testutil.hpp
+@ON_MINGW_FALSE@am_test_pair_ipc_OBJECTS = test_pair_ipc.$(OBJEXT)
+test_pair_ipc_OBJECTS = $(am_test_pair_ipc_OBJECTS)
+test_pair_ipc_LDADD = $(LDADD)
+test_pair_ipc_DEPENDENCIES = $(top_builddir)/src/libzmq.la
+am_test_pair_tcp_OBJECTS = test_pair_tcp.$(OBJEXT)
+test_pair_tcp_OBJECTS = $(am_test_pair_tcp_OBJECTS)
+test_pair_tcp_LDADD = $(LDADD)
+test_pair_tcp_DEPENDENCIES = $(top_builddir)/src/libzmq.la
+am_test_reqrep_inproc_OBJECTS = test_reqrep_inproc.$(OBJEXT)
+test_reqrep_inproc_OBJECTS = $(am_test_reqrep_inproc_OBJECTS)
+test_reqrep_inproc_LDADD = $(LDADD)
+test_reqrep_inproc_DEPENDENCIES = $(top_builddir)/src/libzmq.la
+am__test_reqrep_ipc_SOURCES_DIST = test_reqrep_ipc.cpp testutil.hpp
+@ON_MINGW_FALSE@am_test_reqrep_ipc_OBJECTS = \
+@ON_MINGW_FALSE@ test_reqrep_ipc.$(OBJEXT)
+test_reqrep_ipc_OBJECTS = $(am_test_reqrep_ipc_OBJECTS)
+test_reqrep_ipc_LDADD = $(LDADD)
+test_reqrep_ipc_DEPENDENCIES = $(top_builddir)/src/libzmq.la
+am_test_reqrep_tcp_OBJECTS = test_reqrep_tcp.$(OBJEXT)
+test_reqrep_tcp_OBJECTS = $(am_test_reqrep_tcp_OBJECTS)
+test_reqrep_tcp_LDADD = $(LDADD)
+test_reqrep_tcp_DEPENDENCIES = $(top_builddir)/src/libzmq.la
+am__test_shutdown_stress_SOURCES_DIST = test_shutdown_stress.cpp
+@ON_MINGW_FALSE@am_test_shutdown_stress_OBJECTS = \
+@ON_MINGW_FALSE@ test_shutdown_stress.$(OBJEXT)
+test_shutdown_stress_OBJECTS = $(am_test_shutdown_stress_OBJECTS)
+test_shutdown_stress_LDADD = $(LDADD)
+test_shutdown_stress_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
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+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)
+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)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+ASCIIDOC = @ASCIIDOC@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@
+LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
+LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LTVER = @LTVER@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMLTO = @XMLTO@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_zmq_have_asciidoc = @ac_zmq_have_asciidoc@
+ac_zmq_have_xmlto = @ac_zmq_have_xmlto@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pgm_basename = @pgm_basename@
+pgm_srcdir = @pgm_srcdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = -I$(top_builddir)/include
+LDADD = $(top_builddir)/src/libzmq.la
+test_pair_inproc_SOURCES = test_pair_inproc.cpp testutil.hpp
+test_pair_tcp_SOURCES = test_pair_tcp.cpp testutil.hpp
+test_reqrep_inproc_SOURCES = test_reqrep_inproc.cpp testutil.hpp
+test_reqrep_tcp_SOURCES = test_reqrep_tcp.cpp testutil.hpp
+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
+TESTS = $(noinst_PROGRAMS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+test_hwm$(EXEEXT): $(test_hwm_OBJECTS) $(test_hwm_DEPENDENCIES)
+ @rm -f test_hwm$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_hwm_OBJECTS) $(test_hwm_LDADD) $(LIBS)
+test_pair_inproc$(EXEEXT): $(test_pair_inproc_OBJECTS) $(test_pair_inproc_DEPENDENCIES)
+ @rm -f test_pair_inproc$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_pair_inproc_OBJECTS) $(test_pair_inproc_LDADD) $(LIBS)
+test_pair_ipc$(EXEEXT): $(test_pair_ipc_OBJECTS) $(test_pair_ipc_DEPENDENCIES)
+ @rm -f test_pair_ipc$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_pair_ipc_OBJECTS) $(test_pair_ipc_LDADD) $(LIBS)
+test_pair_tcp$(EXEEXT): $(test_pair_tcp_OBJECTS) $(test_pair_tcp_DEPENDENCIES)
+ @rm -f test_pair_tcp$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_pair_tcp_OBJECTS) $(test_pair_tcp_LDADD) $(LIBS)
+test_reqrep_inproc$(EXEEXT): $(test_reqrep_inproc_OBJECTS) $(test_reqrep_inproc_DEPENDENCIES)
+ @rm -f test_reqrep_inproc$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_inproc_OBJECTS) $(test_reqrep_inproc_LDADD) $(LIBS)
+test_reqrep_ipc$(EXEEXT): $(test_reqrep_ipc_OBJECTS) $(test_reqrep_ipc_DEPENDENCIES)
+ @rm -f test_reqrep_ipc$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_ipc_OBJECTS) $(test_reqrep_ipc_LDADD) $(LIBS)
+test_reqrep_tcp$(EXEEXT): $(test_reqrep_tcp_OBJECTS) $(test_reqrep_tcp_DEPENDENCIES)
+ @rm -f test_reqrep_tcp$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_tcp_OBJECTS) $(test_reqrep_tcp_LDADD) $(LIBS)
+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)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hwm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pair_inproc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pair_ipc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pair_tcp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_inproc.Po@am__quote@
+@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@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-generic clean-libtool clean-noinstPROGRAMS ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/test_hwm.cpp b/tests/test_hwm.cpp
new file mode 100644
index 0000000..d73c25f
--- /dev/null
+++ b/tests/test_hwm.cpp
@@ -0,0 +1,68 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "testutil.hpp"
+#include "../src/stdint.hpp"
+
+using namespace std;
+using namespace zmqtestutil;
+
+int main (int argc, char *argv [])
+{
+ uint64_t hwm = 5;
+ int linger = 0;
+
+ zmq::context_t context (1);
+ zmq::socket_t s1 (context, ZMQ_PULL);
+ zmq::socket_t s2 (context, ZMQ_PUSH);
+
+ s2.setsockopt (ZMQ_LINGER, &linger, sizeof (int));
+ s2.setsockopt (ZMQ_HWM, &hwm, sizeof (uint64_t));
+
+ s1.bind ("tcp://127.0.0.1:5858");
+ s2.connect ("tcp://127.0.0.1:5858");
+
+ for (int i = 0; i < 10; i++)
+ {
+ zmq::message_t msg (sizeof ("test") - 1);
+ memcpy (msg.data (), "test", sizeof ("test") - 1);
+
+ bool sent = s2.send (msg, ZMQ_NOBLOCK);
+
+ // Anything below HWM should be sent
+ if (i < 5) {
+ assert (sent);
+ } else {
+ assert (!sent && errno == EAGAIN);
+ }
+ }
+
+ // There should be now 5 messages pending, consume one
+ zmq::message_t msg;
+
+ bool received = s1.recv (&msg, 0);
+ assert (received);
+
+ // Now it should be possible to send one more
+ bool sent = s2.send (msg, 0);
+ assert (sent);
+
+ return 0;
+}
diff --git a/src/streamer.hpp b/tests/test_pair_inproc.cpp
index 8827cff..5736674 100644
--- a/src/streamer.hpp
+++ b/tests/test_pair_inproc.cpp
@@ -1,31 +1,31 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 Lesser GNU General Public License as published by
+ 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
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __ZMQ_STREAMER_HPP_INCLUDED__
-#define __ZMQ_STREAMER_HPP_INCLUDED__
+#include "testutil.hpp"
-namespace zmq
-{
-
- int streamer (class socket_base_t *insocket_,
- class socket_base_t *outsocket_);
+using namespace std;
+using namespace zmqtestutil;
+int main (int argc, char *argv [])
+{
+ const char *transport = "inproc://tester" ;
+ basic_tests (transport, ZMQ_PAIR, ZMQ_PAIR);
+ return 0 ;
}
-
-#endif
diff --git a/tests/test_pair_ipc.cpp b/tests/test_pair_ipc.cpp
new file mode 100644
index 0000000..f8a4270
--- /dev/null
+++ b/tests/test_pair_ipc.cpp
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "testutil.hpp"
+
+using namespace std;
+using namespace zmqtestutil;
+
+int main (int argc, char *argv [])
+{
+ const char *transport = "ipc:///tmp/tester" ;
+ basic_tests (transport, ZMQ_PAIR, ZMQ_PAIR);
+ return 0 ;
+}
diff --git a/tests/test_pair_tcp.cpp b/tests/test_pair_tcp.cpp
new file mode 100644
index 0000000..e902f7f
--- /dev/null
+++ b/tests/test_pair_tcp.cpp
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "testutil.hpp"
+
+using namespace std;
+using namespace zmqtestutil;
+
+int main (int argc, char *argv [])
+{
+ const char *transport = "tcp://127.0.0.1:5555" ;
+ basic_tests (transport, ZMQ_PAIR, ZMQ_PAIR);
+ return 0 ;
+}
diff --git a/tests/test_reqrep_inproc.cpp b/tests/test_reqrep_inproc.cpp
new file mode 100644
index 0000000..b46f89c
--- /dev/null
+++ b/tests/test_reqrep_inproc.cpp
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "testutil.hpp"
+
+using namespace std;
+using namespace zmqtestutil;
+
+int main (int argc, char *argv [])
+{
+ const char *transport = "inproc://tester" ;
+ basic_tests (transport, ZMQ_REQ, ZMQ_REP);
+ return 0 ;
+}
diff --git a/tests/test_reqrep_ipc.cpp b/tests/test_reqrep_ipc.cpp
new file mode 100644
index 0000000..4134b1c
--- /dev/null
+++ b/tests/test_reqrep_ipc.cpp
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "testutil.hpp"
+
+using namespace std;
+using namespace zmqtestutil;
+
+int main (int argc, char *argv [])
+{
+ const char *transport = "ipc:///tmp/tester" ;
+ basic_tests (transport, ZMQ_REQ, ZMQ_REP);
+ return 0 ;
+}
diff --git a/tests/test_reqrep_tcp.cpp b/tests/test_reqrep_tcp.cpp
new file mode 100644
index 0000000..9f1f3e6
--- /dev/null
+++ b/tests/test_reqrep_tcp.cpp
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "testutil.hpp"
+
+using namespace std;
+using namespace zmqtestutil;
+
+int main (int argc, char *argv [])
+{
+ const char *transport = "tcp://127.0.0.1:5555" ;
+ basic_tests (transport, ZMQ_REQ, ZMQ_REP);
+ return 0 ;
+}
diff --git a/tests/test_shutdown_stress.cpp b/tests/test_shutdown_stress.cpp
new file mode 100644
index 0000000..85ba912
--- /dev/null
+++ b/tests/test_shutdown_stress.cpp
@@ -0,0 +1,87 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "../include/zmq.h"
+#include <assert.h>
+#include <pthread.h>
+#include <stddef.h>
+
+#define THREAD_COUNT 100
+
+extern "C"
+{
+ static void *worker (void *s)
+ {
+ int rc;
+
+ rc = zmq_connect (s, "tcp://127.0.0.1:5555");
+ assert (rc == 0);
+
+ // Start closing the socket while the connecting process is underway.
+ rc = zmq_close (s);
+ assert (rc == 0);
+
+ return NULL;
+ }
+}
+
+int main (int argc, char *argv [])
+{
+ void *ctx;
+ void *s1;
+ void *s2;
+ int i;
+ int j;
+ int rc;
+ pthread_t threads [THREAD_COUNT];
+
+ for (j = 0; j != 10; j++) {
+
+ // Check the shutdown with many parallel I/O threads.
+ ctx = zmq_init (7);
+ assert (ctx);
+
+ s1 = zmq_socket (ctx, ZMQ_REP);
+ assert (s1);
+
+ rc = zmq_bind (s1, "tcp://127.0.0.1:5555");
+ assert (rc == 0);
+
+ for (i = 0; i != THREAD_COUNT; i++) {
+ s2 = zmq_socket (ctx, ZMQ_SUB);
+ assert (s2);
+ rc = pthread_create (&threads [i], NULL, worker, s2);
+ assert (rc == 0);
+ }
+
+ for (i = 0; i != THREAD_COUNT; i++) {
+ rc = pthread_join (threads [i], NULL);
+ assert (rc == 0);
+ }
+
+ rc = zmq_close (s1);
+ assert (rc == 0);
+
+ rc = zmq_term (ctx);
+ assert (rc == 0);
+ }
+
+ return 0;
+}
diff --git a/tests/testutil.hpp b/tests/testutil.hpp
new file mode 100644
index 0000000..7f182c1
--- /dev/null
+++ b/tests/testutil.hpp
@@ -0,0 +1,130 @@
+/*
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-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 <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __ZMQ_TEST_TESTUTIL_HPP_INCLUDED__
+#define __ZMQ_TEST_TESTUTIL_HPP_INCLUDED__
+
+#include <assert.h>
+#include <iostream>
+#include <string>
+#include <utility>
+
+#include "../include/zmq.hpp"
+
+namespace zmqtestutil
+{
+
+ using namespace std ;
+
+ typedef std::pair <zmq::socket_t*, zmq::socket_t*> socket_pair;
+
+ // Create a pair of sockets connected to each other.
+ socket_pair create_bound_pair (zmq::context_t *context_,
+ int t1_, int t2_, const char *transport_)
+ {
+ zmq::socket_t *s1 = new zmq::socket_t (*context_, t1_);
+ zmq::socket_t *s2 = new zmq::socket_t (*context_, t2_);
+ s1->bind (transport_);
+ s2->connect (transport_);
+ return socket_pair (s1, s2);
+ }
+
+ // Send a message from one socket in the pair to the other and back.
+ std::string ping_pong (const socket_pair &sp_, const std::string &orig_msg_)
+ {
+ zmq::socket_t &s1 = *sp_.first;
+ zmq::socket_t &s2 = *sp_.second;
+
+ // Construct message to send.
+ zmq::message_t ping (orig_msg_.size ());
+ memcpy (ping.data (), orig_msg_.c_str (), orig_msg_.size ());
+
+ // Send ping out.
+ s1.send (ping, 0);
+
+ // Get pong from connected socket.
+ zmq::message_t pong;
+ s2.recv (&pong, 0);
+
+ // Send message via s2, so state is clean in case of req/rep.
+ std::string ret ((char*) pong.data(), pong.size ());
+ s2.send (pong, 0);
+
+ // Return received data as std::string.
+ return ret ;
+ }
+
+ /* Run basic tests for the given transport.
+
+ Basic tests are:
+ * ping pong as defined above.
+ * send receive where the receive is signalled by zmq::poll
+ */
+ void basic_tests (const char *transport_, int t1_, int t2_)
+ {
+ zmq::context_t context (1);
+
+ zmq::pollitem_t items [2];
+ socket_pair p = create_bound_pair (&context, t1_, t2_, transport_);
+
+ // First test simple ping pong.
+ const string expect ("XXX");
+
+ {
+ const string returned = zmqtestutil::ping_pong (p, expect);
+ assert (expect == returned);
+
+ // Adjust socket state so that poll shows only 1 pending message.
+ zmq::message_t mx ;
+ p.first->recv (&mx, 0);
+ }
+
+ {
+ // Now poll is used to singal that a message is ready to read.
+ zmq::message_t m1 (expect.size ());
+ memcpy (m1.data (), expect.c_str (), expect.size ());
+ items [0].socket = *p.first;
+ items [0].fd = 0;
+ items [0].events = ZMQ_POLLIN;
+ items [0].revents = 0;
+ items [1].socket = *p.second;
+ items [1].fd = 0;
+ items [1].events = ZMQ_POLLIN;
+ items [1].revents = 0;
+
+ p.first->send (m1, 0);
+
+ int rc = zmq::poll (&items [0], 2, -1);
+ assert (rc == 1);
+ assert ((items [1].revents & ZMQ_POLLIN) != 0);
+
+ zmq::message_t m2;
+ p.second->recv (&m2, 0);
+ const string ret ((char*) m2.data (), m2.size ());
+ assert (expect == ret);
+ }
+
+ // Delete sockets.
+ delete (p.first);
+ delete (p.second);
+ }
+}
+
+#endif
diff --git a/version.sh b/version.sh
index b88bb61..b4425d0 100755
--- a/version.sh
+++ b/version.sh
@@ -17,5 +17,5 @@ fi
MAJOR=`echo $MAJOR | awk '{ print $3 }'`
MINOR=`echo $MINOR | awk '{ print $3 }'`
PATCH=`echo $PATCH | awk '{ print $3 }'`
-echo $MAJOR.$MINOR.$PATCH
+echo $MAJOR.$MINOR.$PATCH | tr -d '\n'
diff --git a/zeromq.spec b/zeromq.spec
index c92252e..eda5786 100644
--- a/zeromq.spec
+++ b/zeromq.spec
@@ -1,5 +1,5 @@
Name: zeromq
-Version: 2.0.10
+Version: 2.1.3
Release: 1%{?dist}
Summary: The ZeroMQ messaging library
Group: Applications/Internet
@@ -8,12 +8,19 @@ URL: http://www.zeromq.org/
Source: http://www.zeromq.org/local--files/area:download/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRequires: gcc, make, gcc-c++, libstdc++-devel
+Requires: libstdc++
+
%if %{?rhel}%{!?rhel:0} >= 6
-BuildRequires: libuuid-devel, gcc, make, gcc-c++, libstdc++-devel
+BuildRequires: libuuid-devel
+Requires: libuuid
+%elseif %{?rhel}%{!?rhel:0} >= 5
+BuildRequires: e2fsprogs-devel
+Requires: e2fsprogs
%else
-BuildRequires: uuid-devel, gcc, make, gcc-c++, libstdc++-devel
+BuildRequires: uuid-devel
+Requires: uuid
%endif
-Requires: uuid, libstdc++
# Build pgm only on supported archs
%ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64
@@ -62,6 +69,7 @@ This package contains ZeroMQ related development libraries and header files.
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
# Install the package to build area
+%{__make} check
%makeinstall
%post
@@ -80,8 +88,8 @@ This package contains ZeroMQ related development libraries and header files.
%doc AUTHORS ChangeLog COPYING COPYING.LESSER NEWS README
# libraries
-%{_libdir}/libzmq.so.0
-%{_libdir}/libzmq.so.0.0.0
+%{_libdir}/libzmq.so.1
+%{_libdir}/libzmq.so.1.0.0
%attr(0755,root,root) %{_bindir}/zmq_forwarder
%attr(0755,root,root) %{_bindir}/zmq_queue