libzmq 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +703 -0
- data/README.md +31 -0
- data/lib/libzmq.rb +17 -0
- data/lib/libzmq/ffi-rzmq.rb +3 -0
- data/libzmq/Makefile +5 -0
- data/libzmq/extconf.rb +24 -0
- data/libzmq/zeromq-2.1.7/AUTHORS +92 -0
- data/libzmq/zeromq-2.1.7/COPYING +674 -0
- data/libzmq/zeromq-2.1.7/COPYING.LESSER +206 -0
- data/libzmq/zeromq-2.1.7/ChangeLog +15620 -0
- data/libzmq/zeromq-2.1.7/INSTALL +237 -0
- data/libzmq/zeromq-2.1.7/MAINTAINERS +56 -0
- data/libzmq/zeromq-2.1.7/Makefile.am +42 -0
- data/libzmq/zeromq-2.1.7/Makefile.in +779 -0
- data/libzmq/zeromq-2.1.7/NEWS +275 -0
- data/libzmq/zeromq-2.1.7/README +39 -0
- data/libzmq/zeromq-2.1.7/acinclude.m4 +582 -0
- data/libzmq/zeromq-2.1.7/aclocal.m4 +1206 -0
- data/libzmq/zeromq-2.1.7/autogen.sh +45 -0
- data/libzmq/zeromq-2.1.7/builds/msvc/Makefile.am +8 -0
- data/libzmq/zeromq-2.1.7/builds/msvc/Makefile.in +390 -0
- data/libzmq/zeromq-2.1.7/builds/msvc/c_local_lat/c_local_lat.vcproj +176 -0
- data/libzmq/zeromq-2.1.7/builds/msvc/c_local_thr/c_local_thr.vcproj +176 -0
- data/libzmq/zeromq-2.1.7/builds/msvc/c_remote_lat/c_remote_lat.vcproj +176 -0
- data/libzmq/zeromq-2.1.7/builds/msvc/c_remote_thr/c_remote_thr.vcproj +176 -0
- data/libzmq/zeromq-2.1.7/builds/msvc/libzmq/libzmq.vcproj +783 -0
- data/libzmq/zeromq-2.1.7/builds/msvc/msvc.sln +89 -0
- data/libzmq/zeromq-2.1.7/builds/msvc/platform.hpp +32 -0
- data/libzmq/zeromq-2.1.7/builds/redhat/zeromq.spec.in +139 -0
- data/libzmq/zeromq-2.1.7/config/compile +143 -0
- data/libzmq/zeromq-2.1.7/config/config.guess +1502 -0
- data/libzmq/zeromq-2.1.7/config/config.sub +1714 -0
- data/libzmq/zeromq-2.1.7/config/depcomp +630 -0
- data/libzmq/zeromq-2.1.7/config/install-sh +520 -0
- data/libzmq/zeromq-2.1.7/config/libtool.m4 +7377 -0
- data/libzmq/zeromq-2.1.7/config/ltmain.sh +8413 -0
- data/libzmq/zeromq-2.1.7/config/ltoptions.m4 +368 -0
- data/libzmq/zeromq-2.1.7/config/ltsugar.m4 +123 -0
- data/libzmq/zeromq-2.1.7/config/ltversion.m4 +23 -0
- data/libzmq/zeromq-2.1.7/config/lt~obsolete.m4 +92 -0
- data/libzmq/zeromq-2.1.7/config/missing +376 -0
- data/libzmq/zeromq-2.1.7/configure +21645 -0
- data/libzmq/zeromq-2.1.7/configure.in +380 -0
- data/libzmq/zeromq-2.1.7/doc/Makefile.am +46 -0
- data/libzmq/zeromq-2.1.7/doc/Makefile.in +546 -0
- data/libzmq/zeromq-2.1.7/doc/asciidoc.conf +56 -0
- data/libzmq/zeromq-2.1.7/doc/zmq.7 +242 -0
- data/libzmq/zeromq-2.1.7/doc/zmq.html +846 -0
- data/libzmq/zeromq-2.1.7/doc/zmq.txt +218 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_bind.3 +166 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_bind.html +746 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_bind.txt +91 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_close.3 +81 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_close.html +645 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_close.txt +52 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_connect.3 +161 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_connect.html +732 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_connect.txt +89 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_cpp.7 +410 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_cpp.html +765 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_cpp.txt +212 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_device.3 +140 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_device.html +736 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_device.txt +138 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_epgm.7 +209 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_epgm.html +749 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_epgm.txt +162 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_errno.3 +78 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_errno.html +634 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_errno.txt +50 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_getsockopt.3 +944 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_getsockopt.html +1713 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_getsockopt.txt +407 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_init.3 +71 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_init.html +635 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_init.txt +51 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_inproc.7 +115 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_inproc.html +669 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_inproc.txt +89 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_ipc.7 +109 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_ipc.html +662 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_ipc.txt +80 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_close.3 +81 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_close.html +647 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_close.txt +55 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_copy.3 +95 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_copy.html +656 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_copy.txt +57 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_data.3 +76 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_data.html +633 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_data.txt +48 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_init.3 +110 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_init.html +656 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_init.txt +65 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_data.3 +138 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_data.html +678 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_data.txt +83 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_size.3 +97 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_size.html +656 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_size.txt +58 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_move.3 +79 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_move.html +645 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_move.txt +52 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_size.3 +76 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_size.html +633 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_msg_size.txt +48 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_pgm.7 +209 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_pgm.html +749 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_pgm.txt +162 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_poll.3 +204 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_poll.html +755 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_poll.txt +132 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_recv.3 +172 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_recv.html +746 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_recv.txt +121 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_send.3 +185 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_send.html +755 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_send.txt +120 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_setsockopt.3 +878 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_setsockopt.html +1603 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_setsockopt.txt +382 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_socket.3 +779 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_socket.html +1424 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_socket.txt +342 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_strerror.3 +78 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_strerror.html +634 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_strerror.txt +55 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_tcp.7 +244 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_tcp.html +755 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_tcp.txt +162 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_term.3 +135 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_term.html +672 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_term.txt +65 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_version.3 +78 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_version.html +632 -0
- data/libzmq/zeromq-2.1.7/doc/zmq_version.txt +53 -0
- data/libzmq/zeromq-2.1.7/foreign/openpgm/Makefile.am +8 -0
- data/libzmq/zeromq-2.1.7/foreign/openpgm/Makefile.in +588 -0
- data/libzmq/zeromq-2.1.7/foreign/openpgm/libpgm-5.1.115~dfsg.tar.gz +0 -0
- data/libzmq/zeromq-2.1.7/foreign/xmlParser/xmlParser.cpp +2923 -0
- data/libzmq/zeromq-2.1.7/foreign/xmlParser/xmlParser.hpp +762 -0
- data/libzmq/zeromq-2.1.7/include/zmq.h +269 -0
- data/libzmq/zeromq-2.1.7/include/zmq.hpp +301 -0
- data/libzmq/zeromq-2.1.7/include/zmq_utils.h +64 -0
- data/libzmq/zeromq-2.1.7/perf/Makefile.am +21 -0
- data/libzmq/zeromq-2.1.7/perf/Makefile.in +566 -0
- data/libzmq/zeromq-2.1.7/perf/inproc_lat.cpp +232 -0
- data/libzmq/zeromq-2.1.7/perf/inproc_thr.cpp +246 -0
- data/libzmq/zeromq-2.1.7/perf/local_lat.cpp +108 -0
- data/libzmq/zeromq-2.1.7/perf/local_thr.cpp +138 -0
- data/libzmq/zeromq-2.1.7/perf/remote_lat.cpp +121 -0
- data/libzmq/zeromq-2.1.7/perf/remote_thr.cpp +104 -0
- data/libzmq/zeromq-2.1.7/src/Makefile.am +155 -0
- data/libzmq/zeromq-2.1.7/src/Makefile.in +1320 -0
- data/libzmq/zeromq-2.1.7/src/array.hpp +147 -0
- data/libzmq/zeromq-2.1.7/src/atomic_counter.hpp +164 -0
- data/libzmq/zeromq-2.1.7/src/atomic_ptr.hpp +159 -0
- data/libzmq/zeromq-2.1.7/src/blob.hpp +34 -0
- data/libzmq/zeromq-2.1.7/src/clock.cpp +118 -0
- data/libzmq/zeromq-2.1.7/src/clock.hpp +60 -0
- data/libzmq/zeromq-2.1.7/src/command.cpp +39 -0
- data/libzmq/zeromq-2.1.7/src/command.hpp +147 -0
- data/libzmq/zeromq-2.1.7/src/config.hpp +88 -0
- data/libzmq/zeromq-2.1.7/src/connect_session.cpp +119 -0
- data/libzmq/zeromq-2.1.7/src/connect_session.hpp +65 -0
- data/libzmq/zeromq-2.1.7/src/ctx.cpp +322 -0
- data/libzmq/zeromq-2.1.7/src/ctx.hpp +159 -0
- data/libzmq/zeromq-2.1.7/src/decoder.cpp +129 -0
- data/libzmq/zeromq-2.1.7/src/decoder.hpp +207 -0
- data/libzmq/zeromq-2.1.7/src/device.cpp +120 -0
- data/libzmq/zeromq-2.1.7/src/device.hpp +32 -0
- data/libzmq/zeromq-2.1.7/src/devpoll.cpp +190 -0
- data/libzmq/zeromq-2.1.7/src/devpoll.hpp +100 -0
- data/libzmq/zeromq-2.1.7/src/dist.cpp +200 -0
- data/libzmq/zeromq-2.1.7/src/dist.hpp +90 -0
- data/libzmq/zeromq-2.1.7/src/encoder.cpp +90 -0
- data/libzmq/zeromq-2.1.7/src/encoder.hpp +184 -0
- data/libzmq/zeromq-2.1.7/src/epoll.cpp +177 -0
- data/libzmq/zeromq-2.1.7/src/epoll.hpp +96 -0
- data/libzmq/zeromq-2.1.7/src/err.cpp +238 -0
- data/libzmq/zeromq-2.1.7/src/err.hpp +145 -0
- data/libzmq/zeromq-2.1.7/src/fd.hpp +45 -0
- data/libzmq/zeromq-2.1.7/src/fq.cpp +164 -0
- data/libzmq/zeromq-2.1.7/src/fq.hpp +80 -0
- data/libzmq/zeromq-2.1.7/src/i_engine.hpp +53 -0
- data/libzmq/zeromq-2.1.7/src/i_inout.hpp +50 -0
- data/libzmq/zeromq-2.1.7/src/i_poll_events.hpp +46 -0
- data/libzmq/zeromq-2.1.7/src/io_object.cpp +107 -0
- data/libzmq/zeromq-2.1.7/src/io_object.hpp +78 -0
- data/libzmq/zeromq-2.1.7/src/io_thread.cpp +109 -0
- data/libzmq/zeromq-2.1.7/src/io_thread.hpp +88 -0
- data/libzmq/zeromq-2.1.7/src/ip.cpp +339 -0
- data/libzmq/zeromq-2.1.7/src/ip.hpp +68 -0
- data/libzmq/zeromq-2.1.7/src/kqueue.cpp +194 -0
- data/libzmq/zeromq-2.1.7/src/kqueue.hpp +103 -0
- data/libzmq/zeromq-2.1.7/src/lb.cpp +174 -0
- data/libzmq/zeromq-2.1.7/src/lb.hpp +79 -0
- data/libzmq/zeromq-2.1.7/src/libzmq.pc.in +10 -0
- data/libzmq/zeromq-2.1.7/src/likely.hpp +33 -0
- data/libzmq/zeromq-2.1.7/src/mailbox.cpp +382 -0
- data/libzmq/zeromq-2.1.7/src/mailbox.hpp +62 -0
- data/libzmq/zeromq-2.1.7/src/msg_content.hpp +52 -0
- data/libzmq/zeromq-2.1.7/src/mutex.hpp +121 -0
- data/libzmq/zeromq-2.1.7/src/named_session.cpp +85 -0
- data/libzmq/zeromq-2.1.7/src/named_session.hpp +57 -0
- data/libzmq/zeromq-2.1.7/src/object.cpp +467 -0
- data/libzmq/zeromq-2.1.7/src/object.hpp +127 -0
- data/libzmq/zeromq-2.1.7/src/options.cpp +336 -0
- data/libzmq/zeromq-2.1.7/src/options.hpp +87 -0
- data/libzmq/zeromq-2.1.7/src/own.cpp +214 -0
- data/libzmq/zeromq-2.1.7/src/own.hpp +140 -0
- data/libzmq/zeromq-2.1.7/src/pair.cpp +180 -0
- data/libzmq/zeromq-2.1.7/src/pair.hpp +76 -0
- data/libzmq/zeromq-2.1.7/src/pgm_receiver.cpp +259 -0
- data/libzmq/zeromq-2.1.7/src/pgm_receiver.hpp +129 -0
- data/libzmq/zeromq-2.1.7/src/pgm_sender.cpp +215 -0
- data/libzmq/zeromq-2.1.7/src/pgm_sender.hpp +105 -0
- data/libzmq/zeromq-2.1.7/src/pgm_socket.cpp +705 -0
- data/libzmq/zeromq-2.1.7/src/pgm_socket.hpp +118 -0
- data/libzmq/zeromq-2.1.7/src/pipe.cpp +409 -0
- data/libzmq/zeromq-2.1.7/src/pipe.hpp +214 -0
- data/libzmq/zeromq-2.1.7/src/platform.hpp.in +228 -0
- data/libzmq/zeromq-2.1.7/src/poll.cpp +180 -0
- data/libzmq/zeromq-2.1.7/src/poll.hpp +104 -0
- data/libzmq/zeromq-2.1.7/src/poller.hpp +73 -0
- data/libzmq/zeromq-2.1.7/src/poller_base.cpp +99 -0
- data/libzmq/zeromq-2.1.7/src/poller_base.hpp +84 -0
- data/libzmq/zeromq-2.1.7/src/pub.cpp +31 -0
- data/libzmq/zeromq-2.1.7/src/pub.hpp +44 -0
- data/libzmq/zeromq-2.1.7/src/pull.cpp +61 -0
- data/libzmq/zeromq-2.1.7/src/pull.hpp +60 -0
- data/libzmq/zeromq-2.1.7/src/push.cpp +62 -0
- data/libzmq/zeromq-2.1.7/src/push.hpp +59 -0
- data/libzmq/zeromq-2.1.7/src/reaper.cpp +121 -0
- data/libzmq/zeromq-2.1.7/src/reaper.hpp +77 -0
- data/libzmq/zeromq-2.1.7/src/rep.cpp +131 -0
- data/libzmq/zeromq-2.1.7/src/rep.hpp +59 -0
- data/libzmq/zeromq-2.1.7/src/req.cpp +121 -0
- data/libzmq/zeromq-2.1.7/src/req.hpp +58 -0
- data/libzmq/zeromq-2.1.7/src/select.cpp +211 -0
- data/libzmq/zeromq-2.1.7/src/select.hpp +116 -0
- data/libzmq/zeromq-2.1.7/src/semaphore.hpp +189 -0
- data/libzmq/zeromq-2.1.7/src/session.cpp +347 -0
- data/libzmq/zeromq-2.1.7/src/session.hpp +150 -0
- data/libzmq/zeromq-2.1.7/src/socket_base.cpp +811 -0
- data/libzmq/zeromq-2.1.7/src/socket_base.hpp +207 -0
- data/libzmq/zeromq-2.1.7/src/stdint.hpp +63 -0
- data/libzmq/zeromq-2.1.7/src/sub.cpp +75 -0
- data/libzmq/zeromq-2.1.7/src/sub.hpp +50 -0
- data/libzmq/zeromq-2.1.7/src/swap.cpp +325 -0
- data/libzmq/zeromq-2.1.7/src/swap.hpp +123 -0
- data/libzmq/zeromq-2.1.7/src/tcp_connecter.cpp +310 -0
- data/libzmq/zeromq-2.1.7/src/tcp_connecter.hpp +81 -0
- data/libzmq/zeromq-2.1.7/src/tcp_listener.cpp +371 -0
- data/libzmq/zeromq-2.1.7/src/tcp_listener.hpp +73 -0
- data/libzmq/zeromq-2.1.7/src/tcp_socket.cpp +228 -0
- data/libzmq/zeromq-2.1.7/src/tcp_socket.hpp +72 -0
- data/libzmq/zeromq-2.1.7/src/thread.cpp +97 -0
- data/libzmq/zeromq-2.1.7/src/thread.hpp +78 -0
- data/libzmq/zeromq-2.1.7/src/transient_session.cpp +41 -0
- data/libzmq/zeromq-2.1.7/src/transient_session.hpp +52 -0
- data/libzmq/zeromq-2.1.7/src/trie.cpp +181 -0
- data/libzmq/zeromq-2.1.7/src/trie.hpp +59 -0
- data/libzmq/zeromq-2.1.7/src/uuid.cpp +233 -0
- data/libzmq/zeromq-2.1.7/src/uuid.hpp +111 -0
- data/libzmq/zeromq-2.1.7/src/windows.hpp +79 -0
- data/libzmq/zeromq-2.1.7/src/wire.hpp +99 -0
- data/libzmq/zeromq-2.1.7/src/xpub.cpp +76 -0
- data/libzmq/zeromq-2.1.7/src/xpub.hpp +61 -0
- data/libzmq/zeromq-2.1.7/src/xrep.cpp +337 -0
- data/libzmq/zeromq-2.1.7/src/xrep.hpp +116 -0
- data/libzmq/zeromq-2.1.7/src/xreq.cpp +74 -0
- data/libzmq/zeromq-2.1.7/src/xreq.hpp +65 -0
- data/libzmq/zeromq-2.1.7/src/xsub.cpp +172 -0
- data/libzmq/zeromq-2.1.7/src/xsub.hpp +80 -0
- data/libzmq/zeromq-2.1.7/src/ypipe.hpp +209 -0
- data/libzmq/zeromq-2.1.7/src/yqueue.hpp +198 -0
- data/libzmq/zeromq-2.1.7/src/zmq.cpp +798 -0
- data/libzmq/zeromq-2.1.7/src/zmq_connecter.cpp +166 -0
- data/libzmq/zeromq-2.1.7/src/zmq_connecter.hpp +92 -0
- data/libzmq/zeromq-2.1.7/src/zmq_engine.cpp +220 -0
- data/libzmq/zeromq-2.1.7/src/zmq_engine.hpp +87 -0
- data/libzmq/zeromq-2.1.7/src/zmq_init.cpp +216 -0
- data/libzmq/zeromq-2.1.7/src/zmq_init.hpp +93 -0
- data/libzmq/zeromq-2.1.7/src/zmq_listener.cpp +78 -0
- data/libzmq/zeromq-2.1.7/src/zmq_listener.hpp +67 -0
- data/libzmq/zeromq-2.1.7/tests/Makefile.am +30 -0
- data/libzmq/zeromq-2.1.7/tests/Makefile.in +713 -0
- data/libzmq/zeromq-2.1.7/tests/test_hwm.cpp +68 -0
- data/libzmq/zeromq-2.1.7/tests/test_pair_inproc.cpp +31 -0
- data/libzmq/zeromq-2.1.7/tests/test_pair_ipc.cpp +31 -0
- data/libzmq/zeromq-2.1.7/tests/test_pair_tcp.cpp +31 -0
- data/libzmq/zeromq-2.1.7/tests/test_reqrep_inproc.cpp +31 -0
- data/libzmq/zeromq-2.1.7/tests/test_reqrep_ipc.cpp +31 -0
- data/libzmq/zeromq-2.1.7/tests/test_reqrep_tcp.cpp +31 -0
- data/libzmq/zeromq-2.1.7/tests/test_shutdown_stress.cpp +87 -0
- data/libzmq/zeromq-2.1.7/tests/testutil.hpp +130 -0
- data/libzmq/zeromq-2.1.7/version.sh +21 -0
- data/libzmq/zeromq-2.1.7/zeromq.spec +139 -0
- metadata +348 -0
@@ -0,0 +1,119 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2007-2011 iMatix Corporation
|
3
|
+
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
|
4
|
+
|
5
|
+
This file is part of 0MQ.
|
6
|
+
|
7
|
+
0MQ is free software; you can redistribute it and/or modify it under
|
8
|
+
the terms of the GNU Lesser General Public License as published by
|
9
|
+
the Free Software Foundation; either version 3 of the License, or
|
10
|
+
(at your option) any later version.
|
11
|
+
|
12
|
+
0MQ is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU Lesser General Public License for more details.
|
16
|
+
|
17
|
+
You should have received a copy of the GNU Lesser General Public License
|
18
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
*/
|
20
|
+
|
21
|
+
#include "connect_session.hpp"
|
22
|
+
#include "zmq_connecter.hpp"
|
23
|
+
#include "pgm_sender.hpp"
|
24
|
+
#include "pgm_receiver.hpp"
|
25
|
+
|
26
|
+
zmq::connect_session_t::connect_session_t (class io_thread_t *io_thread_,
|
27
|
+
class socket_base_t *socket_, const options_t &options_,
|
28
|
+
const char *protocol_, const char *address_) :
|
29
|
+
session_t (io_thread_, socket_, options_),
|
30
|
+
protocol (protocol_),
|
31
|
+
address (address_)
|
32
|
+
{
|
33
|
+
}
|
34
|
+
|
35
|
+
zmq::connect_session_t::~connect_session_t ()
|
36
|
+
{
|
37
|
+
}
|
38
|
+
|
39
|
+
void zmq::connect_session_t::process_plug ()
|
40
|
+
{
|
41
|
+
// Start connection process immediately.
|
42
|
+
start_connecting (false);
|
43
|
+
}
|
44
|
+
|
45
|
+
void zmq::connect_session_t::start_connecting (bool wait_)
|
46
|
+
{
|
47
|
+
// Choose I/O thread to run connecter in. Given that we are already
|
48
|
+
// running in an I/O thread, there must be at least one available.
|
49
|
+
io_thread_t *io_thread = choose_io_thread (options.affinity);
|
50
|
+
zmq_assert (io_thread);
|
51
|
+
|
52
|
+
// Create the connecter object.
|
53
|
+
|
54
|
+
// Both TCP and IPC transports are using the same infrastructure.
|
55
|
+
if (protocol == "tcp" || protocol == "ipc") {
|
56
|
+
|
57
|
+
zmq_connecter_t *connecter = new (std::nothrow) zmq_connecter_t (
|
58
|
+
io_thread, this, options, protocol.c_str (), address.c_str (),
|
59
|
+
wait_);
|
60
|
+
alloc_assert (connecter);
|
61
|
+
launch_child (connecter);
|
62
|
+
return;
|
63
|
+
}
|
64
|
+
|
65
|
+
#if defined ZMQ_HAVE_OPENPGM
|
66
|
+
|
67
|
+
// Both PGM and EPGM transports are using the same infrastructure.
|
68
|
+
if (protocol == "pgm" || protocol == "epgm") {
|
69
|
+
|
70
|
+
// For EPGM transport with UDP encapsulation of PGM is used.
|
71
|
+
bool udp_encapsulation = (protocol == "epgm");
|
72
|
+
|
73
|
+
// At this point we'll create message pipes to the session straight
|
74
|
+
// away. There's no point in delaying it as no concept of 'connect'
|
75
|
+
// exists with PGM anyway.
|
76
|
+
if (options.type == ZMQ_PUB || options.type == ZMQ_XPUB) {
|
77
|
+
|
78
|
+
// PGM sender.
|
79
|
+
pgm_sender_t *pgm_sender = new (std::nothrow) pgm_sender_t (
|
80
|
+
io_thread, options);
|
81
|
+
alloc_assert (pgm_sender);
|
82
|
+
|
83
|
+
int rc = pgm_sender->init (udp_encapsulation, address.c_str ());
|
84
|
+
zmq_assert (rc == 0);
|
85
|
+
|
86
|
+
send_attach (this, pgm_sender, blob_t ());
|
87
|
+
}
|
88
|
+
else if (options.type == ZMQ_SUB || options.type == ZMQ_XSUB) {
|
89
|
+
|
90
|
+
// PGM receiver.
|
91
|
+
pgm_receiver_t *pgm_receiver = new (std::nothrow) pgm_receiver_t (
|
92
|
+
io_thread, options);
|
93
|
+
alloc_assert (pgm_receiver);
|
94
|
+
|
95
|
+
int rc = pgm_receiver->init (udp_encapsulation, address.c_str ());
|
96
|
+
zmq_assert (rc == 0);
|
97
|
+
|
98
|
+
send_attach (this, pgm_receiver, blob_t ());
|
99
|
+
}
|
100
|
+
else
|
101
|
+
zmq_assert (false);
|
102
|
+
|
103
|
+
return;
|
104
|
+
}
|
105
|
+
#endif
|
106
|
+
|
107
|
+
zmq_assert (false);
|
108
|
+
}
|
109
|
+
|
110
|
+
void zmq::connect_session_t::attached (const blob_t &peer_identity_)
|
111
|
+
{
|
112
|
+
}
|
113
|
+
|
114
|
+
void zmq::connect_session_t::detached ()
|
115
|
+
{
|
116
|
+
// Reconnect.
|
117
|
+
start_connecting (true);
|
118
|
+
}
|
119
|
+
|
@@ -0,0 +1,65 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2007-2011 iMatix Corporation
|
3
|
+
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
|
4
|
+
|
5
|
+
This file is part of 0MQ.
|
6
|
+
|
7
|
+
0MQ is free software; you can redistribute it and/or modify it under
|
8
|
+
the terms of the GNU Lesser General Public License as published by
|
9
|
+
the Free Software Foundation; either version 3 of the License, or
|
10
|
+
(at your option) any later version.
|
11
|
+
|
12
|
+
0MQ is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU Lesser General Public License for more details.
|
16
|
+
|
17
|
+
You should have received a copy of the GNU Lesser General Public License
|
18
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
*/
|
20
|
+
|
21
|
+
#ifndef __ZMQ_CONNECT_SESSION_HPP_INCLUDED__
|
22
|
+
#define __ZMQ_CONNECT_SESSION_HPP_INCLUDED__
|
23
|
+
|
24
|
+
#include <string>
|
25
|
+
|
26
|
+
#include "session.hpp"
|
27
|
+
|
28
|
+
namespace zmq
|
29
|
+
{
|
30
|
+
|
31
|
+
// Connect session contains an address to connect to. On disconnect it
|
32
|
+
// attempts to reconnect.
|
33
|
+
|
34
|
+
class connect_session_t : public session_t
|
35
|
+
{
|
36
|
+
public:
|
37
|
+
|
38
|
+
connect_session_t (class io_thread_t *io_thread_,
|
39
|
+
class socket_base_t *socket_, const options_t &options_,
|
40
|
+
const char *protocol_, const char *address_);
|
41
|
+
~connect_session_t ();
|
42
|
+
|
43
|
+
private:
|
44
|
+
|
45
|
+
// Handlers for events from session base class.
|
46
|
+
void attached (const blob_t &peer_identity_);
|
47
|
+
void detached ();
|
48
|
+
|
49
|
+
// Start the connection process.
|
50
|
+
void start_connecting (bool wait_);
|
51
|
+
|
52
|
+
// Command handlers.
|
53
|
+
void process_plug ();
|
54
|
+
|
55
|
+
// Address to connect to.
|
56
|
+
std::string protocol;
|
57
|
+
std::string address;
|
58
|
+
|
59
|
+
connect_session_t (const connect_session_t&);
|
60
|
+
const connect_session_t &operator = (const connect_session_t&);
|
61
|
+
};
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
#endif
|
@@ -0,0 +1,322 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2007-2011 iMatix Corporation
|
3
|
+
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
|
4
|
+
|
5
|
+
This file is part of 0MQ.
|
6
|
+
|
7
|
+
0MQ is free software; you can redistribute it and/or modify it under
|
8
|
+
the terms of the GNU Lesser General Public License as published by
|
9
|
+
the Free Software Foundation; either version 3 of the License, or
|
10
|
+
(at your option) any later version.
|
11
|
+
|
12
|
+
0MQ is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU Lesser General Public License for more details.
|
16
|
+
|
17
|
+
You should have received a copy of the GNU Lesser General Public License
|
18
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
*/
|
20
|
+
|
21
|
+
#include <new>
|
22
|
+
#include <string.h>
|
23
|
+
|
24
|
+
#include "ctx.hpp"
|
25
|
+
#include "socket_base.hpp"
|
26
|
+
#include "io_thread.hpp"
|
27
|
+
#include "platform.hpp"
|
28
|
+
#include "reaper.hpp"
|
29
|
+
#include "err.hpp"
|
30
|
+
#include "pipe.hpp"
|
31
|
+
|
32
|
+
#if defined ZMQ_HAVE_WINDOWS
|
33
|
+
#include "windows.h"
|
34
|
+
#else
|
35
|
+
#include "unistd.h"
|
36
|
+
#endif
|
37
|
+
|
38
|
+
zmq::ctx_t::ctx_t (uint32_t io_threads_) :
|
39
|
+
tag (0xbadcafe0),
|
40
|
+
terminating (false)
|
41
|
+
{
|
42
|
+
int rc;
|
43
|
+
|
44
|
+
// Initialise the array of mailboxes. Additional three slots are for
|
45
|
+
// internal log socket and the zmq_term thread the reaper thread.
|
46
|
+
slot_count = max_sockets + io_threads_ + 3;
|
47
|
+
slots = (mailbox_t**) malloc (sizeof (mailbox_t*) * slot_count);
|
48
|
+
alloc_assert (slots);
|
49
|
+
|
50
|
+
// Initialise the infrastructure for zmq_term thread.
|
51
|
+
slots [term_tid] = &term_mailbox;
|
52
|
+
|
53
|
+
// Create the reaper thread.
|
54
|
+
reaper = new (std::nothrow) reaper_t (this, reaper_tid);
|
55
|
+
alloc_assert (reaper);
|
56
|
+
slots [reaper_tid] = reaper->get_mailbox ();
|
57
|
+
reaper->start ();
|
58
|
+
|
59
|
+
// Create I/O thread objects and launch them.
|
60
|
+
for (uint32_t i = 2; i != io_threads_ + 2; i++) {
|
61
|
+
io_thread_t *io_thread = new (std::nothrow) io_thread_t (this, i);
|
62
|
+
alloc_assert (io_thread);
|
63
|
+
io_threads.push_back (io_thread);
|
64
|
+
slots [i] = io_thread->get_mailbox ();
|
65
|
+
io_thread->start ();
|
66
|
+
}
|
67
|
+
|
68
|
+
// In the unused part of the slot array, create a list of empty slots.
|
69
|
+
for (int32_t i = (int32_t) slot_count - 1;
|
70
|
+
i >= (int32_t) io_threads_ + 2; i--) {
|
71
|
+
empty_slots.push_back (i);
|
72
|
+
slots [i] = NULL;
|
73
|
+
}
|
74
|
+
|
75
|
+
// Create the logging infrastructure.
|
76
|
+
log_socket = create_socket (ZMQ_PUB);
|
77
|
+
zmq_assert (log_socket);
|
78
|
+
rc = log_socket->bind ("sys://log");
|
79
|
+
zmq_assert (rc == 0);
|
80
|
+
}
|
81
|
+
|
82
|
+
bool zmq::ctx_t::check_tag ()
|
83
|
+
{
|
84
|
+
return tag == 0xbadcafe0;
|
85
|
+
}
|
86
|
+
|
87
|
+
zmq::ctx_t::~ctx_t ()
|
88
|
+
{
|
89
|
+
// Check that there are no remaining sockets.
|
90
|
+
zmq_assert (sockets.empty ());
|
91
|
+
|
92
|
+
// Ask I/O threads to terminate. If stop signal wasn't sent to I/O
|
93
|
+
// thread subsequent invocation of destructor would hang-up.
|
94
|
+
for (io_threads_t::size_type i = 0; i != io_threads.size (); i++)
|
95
|
+
io_threads [i]->stop ();
|
96
|
+
|
97
|
+
// Wait till I/O threads actually terminate.
|
98
|
+
for (io_threads_t::size_type i = 0; i != io_threads.size (); i++)
|
99
|
+
delete io_threads [i];
|
100
|
+
|
101
|
+
// Deallocate the reaper thread object.
|
102
|
+
delete reaper;
|
103
|
+
|
104
|
+
// Deallocate the array of mailboxes. No special work is
|
105
|
+
// needed as mailboxes themselves were deallocated with their
|
106
|
+
// corresponding io_thread/socket objects.
|
107
|
+
free (slots);
|
108
|
+
|
109
|
+
// Remove the tag, so that the object is considered dead.
|
110
|
+
tag = 0xdeadbeef;
|
111
|
+
}
|
112
|
+
|
113
|
+
int zmq::ctx_t::terminate ()
|
114
|
+
{
|
115
|
+
// Check whether termination was already underway, but interrupted and now
|
116
|
+
// restarted.
|
117
|
+
slot_sync.lock ();
|
118
|
+
bool restarted = terminating;
|
119
|
+
slot_sync.unlock ();
|
120
|
+
|
121
|
+
// First attempt to terminate the context.
|
122
|
+
if (!restarted) {
|
123
|
+
|
124
|
+
// Close the logging infrastructure.
|
125
|
+
log_sync.lock ();
|
126
|
+
int rc = log_socket->close ();
|
127
|
+
zmq_assert (rc == 0);
|
128
|
+
log_socket = NULL;
|
129
|
+
log_sync.unlock ();
|
130
|
+
|
131
|
+
// First send stop command to sockets so that any blocking calls can be
|
132
|
+
// interrupted. If there are no sockets we can ask reaper thread to stop.
|
133
|
+
slot_sync.lock ();
|
134
|
+
terminating = true;
|
135
|
+
for (sockets_t::size_type i = 0; i != sockets.size (); i++)
|
136
|
+
sockets [i]->stop ();
|
137
|
+
if (sockets.empty ())
|
138
|
+
reaper->stop ();
|
139
|
+
slot_sync.unlock ();
|
140
|
+
}
|
141
|
+
|
142
|
+
// Wait till reaper thread closes all the sockets.
|
143
|
+
command_t cmd;
|
144
|
+
int rc = term_mailbox.recv (&cmd, true);
|
145
|
+
if (rc == -1 && errno == EINTR)
|
146
|
+
return -1;
|
147
|
+
zmq_assert (rc == 0);
|
148
|
+
zmq_assert (cmd.type == command_t::done);
|
149
|
+
slot_sync.lock ();
|
150
|
+
zmq_assert (sockets.empty ());
|
151
|
+
slot_sync.unlock ();
|
152
|
+
|
153
|
+
// Deallocate the resources.
|
154
|
+
delete this;
|
155
|
+
|
156
|
+
return 0;
|
157
|
+
}
|
158
|
+
|
159
|
+
zmq::socket_base_t *zmq::ctx_t::create_socket (int type_)
|
160
|
+
{
|
161
|
+
slot_sync.lock ();
|
162
|
+
|
163
|
+
// Once zmq_term() was called, we can't create new sockets.
|
164
|
+
if (terminating) {
|
165
|
+
slot_sync.unlock ();
|
166
|
+
errno = ETERM;
|
167
|
+
return NULL;
|
168
|
+
}
|
169
|
+
|
170
|
+
// If max_sockets limit was reached, return error.
|
171
|
+
if (empty_slots.empty ()) {
|
172
|
+
slot_sync.unlock ();
|
173
|
+
errno = EMFILE;
|
174
|
+
return NULL;
|
175
|
+
}
|
176
|
+
|
177
|
+
// Choose a slot for the socket.
|
178
|
+
uint32_t slot = empty_slots.back ();
|
179
|
+
empty_slots.pop_back ();
|
180
|
+
|
181
|
+
// Create the socket and register its mailbox.
|
182
|
+
socket_base_t *s = socket_base_t::create (type_, this, slot);
|
183
|
+
if (!s) {
|
184
|
+
empty_slots.push_back (slot);
|
185
|
+
slot_sync.unlock ();
|
186
|
+
return NULL;
|
187
|
+
}
|
188
|
+
sockets.push_back (s);
|
189
|
+
slots [slot] = s->get_mailbox ();
|
190
|
+
|
191
|
+
slot_sync.unlock ();
|
192
|
+
|
193
|
+
return s;
|
194
|
+
}
|
195
|
+
|
196
|
+
void zmq::ctx_t::destroy_socket (class socket_base_t *socket_)
|
197
|
+
{
|
198
|
+
slot_sync.lock ();
|
199
|
+
|
200
|
+
// Free the associared thread slot.
|
201
|
+
uint32_t tid = socket_->get_tid ();
|
202
|
+
empty_slots.push_back (tid);
|
203
|
+
slots [tid] = NULL;
|
204
|
+
|
205
|
+
// Remove the socket from the list of sockets.
|
206
|
+
sockets.erase (socket_);
|
207
|
+
|
208
|
+
// If zmq_term() was already called and there are no more socket
|
209
|
+
// we can ask reaper thread to terminate.
|
210
|
+
if (terminating && sockets.empty ())
|
211
|
+
reaper->stop ();
|
212
|
+
|
213
|
+
slot_sync.unlock ();
|
214
|
+
}
|
215
|
+
|
216
|
+
zmq::object_t *zmq::ctx_t::get_reaper ()
|
217
|
+
{
|
218
|
+
return reaper;
|
219
|
+
}
|
220
|
+
|
221
|
+
void zmq::ctx_t::send_command (uint32_t tid_, const command_t &command_)
|
222
|
+
{
|
223
|
+
slots [tid_]->send (command_);
|
224
|
+
}
|
225
|
+
|
226
|
+
zmq::io_thread_t *zmq::ctx_t::choose_io_thread (uint64_t affinity_)
|
227
|
+
{
|
228
|
+
if (io_threads.empty ())
|
229
|
+
return NULL;
|
230
|
+
|
231
|
+
// Find the I/O thread with minimum load.
|
232
|
+
int min_load = -1;
|
233
|
+
io_threads_t::size_type result = 0;
|
234
|
+
for (io_threads_t::size_type i = 0; i != io_threads.size (); i++) {
|
235
|
+
if (!affinity_ || (affinity_ & (uint64_t (1) << i))) {
|
236
|
+
int load = io_threads [i]->get_load ();
|
237
|
+
if (min_load == -1 || load < min_load) {
|
238
|
+
min_load = load;
|
239
|
+
result = i;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
}
|
243
|
+
zmq_assert (min_load != -1);
|
244
|
+
return io_threads [result];
|
245
|
+
}
|
246
|
+
|
247
|
+
int zmq::ctx_t::register_endpoint (const char *addr_, endpoint_t &endpoint_)
|
248
|
+
{
|
249
|
+
endpoints_sync.lock ();
|
250
|
+
|
251
|
+
bool inserted = endpoints.insert (endpoints_t::value_type (
|
252
|
+
std::string (addr_), endpoint_)).second;
|
253
|
+
if (!inserted) {
|
254
|
+
errno = EADDRINUSE;
|
255
|
+
endpoints_sync.unlock ();
|
256
|
+
return -1;
|
257
|
+
}
|
258
|
+
|
259
|
+
endpoints_sync.unlock ();
|
260
|
+
return 0;
|
261
|
+
}
|
262
|
+
|
263
|
+
void zmq::ctx_t::unregister_endpoints (socket_base_t *socket_)
|
264
|
+
{
|
265
|
+
endpoints_sync.lock ();
|
266
|
+
|
267
|
+
endpoints_t::iterator it = endpoints.begin ();
|
268
|
+
while (it != endpoints.end ()) {
|
269
|
+
if (it->second.socket == socket_) {
|
270
|
+
endpoints_t::iterator to_erase = it;
|
271
|
+
++it;
|
272
|
+
endpoints.erase (to_erase);
|
273
|
+
continue;
|
274
|
+
}
|
275
|
+
++it;
|
276
|
+
}
|
277
|
+
|
278
|
+
endpoints_sync.unlock ();
|
279
|
+
}
|
280
|
+
|
281
|
+
zmq::endpoint_t zmq::ctx_t::find_endpoint (const char *addr_)
|
282
|
+
{
|
283
|
+
endpoints_sync.lock ();
|
284
|
+
|
285
|
+
endpoints_t::iterator it = endpoints.find (addr_);
|
286
|
+
if (it == endpoints.end ()) {
|
287
|
+
endpoints_sync.unlock ();
|
288
|
+
errno = ECONNREFUSED;
|
289
|
+
endpoint_t empty = {NULL, options_t()};
|
290
|
+
return empty;
|
291
|
+
}
|
292
|
+
endpoint_t *endpoint = &it->second;
|
293
|
+
|
294
|
+
// Increment the command sequence number of the peer so that it won't
|
295
|
+
// get deallocated until "bind" command is issued by the caller.
|
296
|
+
// The subsequent 'bind' has to be called with inc_seqnum parameter
|
297
|
+
// set to false, so that the seqnum isn't incremented twice.
|
298
|
+
endpoint->socket->inc_seqnum ();
|
299
|
+
|
300
|
+
endpoints_sync.unlock ();
|
301
|
+
return *endpoint;
|
302
|
+
}
|
303
|
+
|
304
|
+
void zmq::ctx_t::log (const char *format_, va_list args_)
|
305
|
+
{
|
306
|
+
// Create the log message.
|
307
|
+
zmq_msg_t msg;
|
308
|
+
int rc = zmq_msg_init_size (&msg, strlen (format_) + 1);
|
309
|
+
zmq_assert (rc == 0);
|
310
|
+
memcpy (zmq_msg_data (&msg), format_, zmq_msg_size (&msg));
|
311
|
+
|
312
|
+
// At this point we migrate the log socket to the current thread.
|
313
|
+
// We rely on mutex for executing the memory barrier.
|
314
|
+
log_sync.lock ();
|
315
|
+
if (log_socket)
|
316
|
+
log_socket->send (&msg, 0);
|
317
|
+
log_sync.unlock ();
|
318
|
+
|
319
|
+
zmq_msg_close (&msg);
|
320
|
+
}
|
321
|
+
|
322
|
+
|