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,87 @@
|
|
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_ZMQ_ENGINE_HPP_INCLUDED__
|
22
|
+
#define __ZMQ_ZMQ_ENGINE_HPP_INCLUDED__
|
23
|
+
|
24
|
+
#include <stddef.h>
|
25
|
+
|
26
|
+
#include <string>
|
27
|
+
|
28
|
+
#include "i_engine.hpp"
|
29
|
+
#include "io_object.hpp"
|
30
|
+
#include "tcp_socket.hpp"
|
31
|
+
#include "encoder.hpp"
|
32
|
+
#include "decoder.hpp"
|
33
|
+
#include "options.hpp"
|
34
|
+
|
35
|
+
namespace zmq
|
36
|
+
{
|
37
|
+
|
38
|
+
class zmq_engine_t : public io_object_t, public i_engine
|
39
|
+
{
|
40
|
+
public:
|
41
|
+
|
42
|
+
zmq_engine_t (fd_t fd_, const options_t &options_);
|
43
|
+
~zmq_engine_t ();
|
44
|
+
|
45
|
+
// i_engine interface implementation.
|
46
|
+
void plug (class io_thread_t *io_thread_, struct i_inout *inout_);
|
47
|
+
void unplug ();
|
48
|
+
void terminate ();
|
49
|
+
void activate_in ();
|
50
|
+
void activate_out ();
|
51
|
+
|
52
|
+
// i_poll_events interface implementation.
|
53
|
+
void in_event ();
|
54
|
+
void out_event ();
|
55
|
+
|
56
|
+
private:
|
57
|
+
|
58
|
+
// Function to handle network disconnections.
|
59
|
+
void error ();
|
60
|
+
|
61
|
+
tcp_socket_t tcp_socket;
|
62
|
+
handle_t handle;
|
63
|
+
|
64
|
+
unsigned char *inpos;
|
65
|
+
size_t insize;
|
66
|
+
decoder_t decoder;
|
67
|
+
|
68
|
+
unsigned char *outpos;
|
69
|
+
size_t outsize;
|
70
|
+
encoder_t encoder;
|
71
|
+
|
72
|
+
i_inout *inout;
|
73
|
+
|
74
|
+
// Detached transient inout handler.
|
75
|
+
i_inout *ephemeral_inout;
|
76
|
+
|
77
|
+
options_t options;
|
78
|
+
|
79
|
+
bool plugged;
|
80
|
+
|
81
|
+
zmq_engine_t (const zmq_engine_t&);
|
82
|
+
const zmq_engine_t &operator = (const zmq_engine_t&);
|
83
|
+
};
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
#endif
|
@@ -0,0 +1,216 @@
|
|
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 <string.h>
|
22
|
+
|
23
|
+
#include "zmq_init.hpp"
|
24
|
+
#include "transient_session.hpp"
|
25
|
+
#include "named_session.hpp"
|
26
|
+
#include "socket_base.hpp"
|
27
|
+
#include "zmq_engine.hpp"
|
28
|
+
#include "io_thread.hpp"
|
29
|
+
#include "session.hpp"
|
30
|
+
#include "uuid.hpp"
|
31
|
+
#include "blob.hpp"
|
32
|
+
#include "err.hpp"
|
33
|
+
|
34
|
+
zmq::zmq_init_t::zmq_init_t (io_thread_t *io_thread_,
|
35
|
+
socket_base_t *socket_, session_t *session_, fd_t fd_,
|
36
|
+
const options_t &options_) :
|
37
|
+
own_t (io_thread_, options_),
|
38
|
+
ephemeral_engine (NULL),
|
39
|
+
sent (false),
|
40
|
+
received (false),
|
41
|
+
socket (socket_),
|
42
|
+
session (session_),
|
43
|
+
io_thread (io_thread_)
|
44
|
+
{
|
45
|
+
// Create the engine object for this connection.
|
46
|
+
engine = new (std::nothrow) zmq_engine_t (fd_, options);
|
47
|
+
alloc_assert (engine);
|
48
|
+
}
|
49
|
+
|
50
|
+
zmq::zmq_init_t::~zmq_init_t ()
|
51
|
+
{
|
52
|
+
if (engine)
|
53
|
+
engine->terminate ();
|
54
|
+
}
|
55
|
+
|
56
|
+
bool zmq::zmq_init_t::read (::zmq_msg_t *msg_)
|
57
|
+
{
|
58
|
+
// If the identity was already sent, do nothing.
|
59
|
+
if (sent)
|
60
|
+
return false;
|
61
|
+
|
62
|
+
// Send the identity.
|
63
|
+
int rc = zmq_msg_init_size (msg_, options.identity.size ());
|
64
|
+
zmq_assert (rc == 0);
|
65
|
+
memcpy (zmq_msg_data (msg_), options.identity.c_str (),
|
66
|
+
options.identity.size ());
|
67
|
+
sent = true;
|
68
|
+
|
69
|
+
// Try finalize initialization.
|
70
|
+
finalise_initialisation ();
|
71
|
+
|
72
|
+
return true;
|
73
|
+
}
|
74
|
+
|
75
|
+
bool zmq::zmq_init_t::write (::zmq_msg_t *msg_)
|
76
|
+
{
|
77
|
+
// If identity was already received, we are not interested
|
78
|
+
// in subsequent messages.
|
79
|
+
if (received)
|
80
|
+
return false;
|
81
|
+
|
82
|
+
// Retreieve the remote identity. If it's empty, generate a unique name.
|
83
|
+
if (!zmq_msg_size (msg_)) {
|
84
|
+
unsigned char identity [uuid_t::uuid_blob_len + 1];
|
85
|
+
identity [0] = 0;
|
86
|
+
memcpy (identity + 1, uuid_t ().to_blob (), uuid_t::uuid_blob_len);
|
87
|
+
peer_identity.assign (identity, uuid_t::uuid_blob_len + 1);
|
88
|
+
}
|
89
|
+
else {
|
90
|
+
peer_identity.assign ((const unsigned char*) zmq_msg_data (msg_),
|
91
|
+
zmq_msg_size (msg_));
|
92
|
+
}
|
93
|
+
int rc = zmq_msg_close (msg_);
|
94
|
+
zmq_assert (rc == 0);
|
95
|
+
|
96
|
+
received = true;
|
97
|
+
|
98
|
+
// Try finalize initialization.
|
99
|
+
finalise_initialisation ();
|
100
|
+
|
101
|
+
return true;
|
102
|
+
}
|
103
|
+
|
104
|
+
void zmq::zmq_init_t::flush ()
|
105
|
+
{
|
106
|
+
// Check if there's anything to flush.
|
107
|
+
if (!received)
|
108
|
+
return;
|
109
|
+
|
110
|
+
// Initialization is done, dispatch engine.
|
111
|
+
if (ephemeral_engine)
|
112
|
+
dispatch_engine ();
|
113
|
+
}
|
114
|
+
|
115
|
+
void zmq::zmq_init_t::detach ()
|
116
|
+
{
|
117
|
+
// This function is called by engine when disconnection occurs.
|
118
|
+
|
119
|
+
// If there is an associated session, send it a null engine to let it know
|
120
|
+
// that connection process was unsuccesful.
|
121
|
+
if (session)
|
122
|
+
send_attach (session, NULL, blob_t (), true);
|
123
|
+
|
124
|
+
// The engine will destroy itself, so let's just drop the pointer here and
|
125
|
+
// start termination of the init object.
|
126
|
+
engine = NULL;
|
127
|
+
terminate ();
|
128
|
+
}
|
129
|
+
|
130
|
+
void zmq::zmq_init_t::process_plug ()
|
131
|
+
{
|
132
|
+
zmq_assert (engine);
|
133
|
+
engine->plug (io_thread, this);
|
134
|
+
}
|
135
|
+
|
136
|
+
void zmq::zmq_init_t::process_unplug ()
|
137
|
+
{
|
138
|
+
if (engine)
|
139
|
+
engine->unplug ();
|
140
|
+
}
|
141
|
+
|
142
|
+
void zmq::zmq_init_t::finalise_initialisation ()
|
143
|
+
{
|
144
|
+
// Unplug and prepare to dispatch engine.
|
145
|
+
if (sent && received) {
|
146
|
+
ephemeral_engine = engine;
|
147
|
+
engine = NULL;
|
148
|
+
ephemeral_engine->unplug ();
|
149
|
+
return;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
void zmq::zmq_init_t::dispatch_engine ()
|
154
|
+
{
|
155
|
+
if (sent && received) {
|
156
|
+
|
157
|
+
// Engine must be detached.
|
158
|
+
zmq_assert (!engine);
|
159
|
+
zmq_assert (ephemeral_engine);
|
160
|
+
|
161
|
+
// If we know what session we belong to, it's easy, just send the
|
162
|
+
// engine to that session and destroy the init object. Note that we
|
163
|
+
// know about the session only if this object is owned by it. Thus,
|
164
|
+
// lifetime of this object in contained in the lifetime of the session
|
165
|
+
// so the pointer cannot become invalid without notice.
|
166
|
+
if (session) {
|
167
|
+
send_attach (session, ephemeral_engine, peer_identity, true);
|
168
|
+
terminate ();
|
169
|
+
return;
|
170
|
+
}
|
171
|
+
|
172
|
+
// All the cases below are listener-based. Therefore we need the socket
|
173
|
+
// reference so that new sessions can bind to that socket.
|
174
|
+
zmq_assert (socket);
|
175
|
+
|
176
|
+
// We have no associated session. If the peer has no identity we'll
|
177
|
+
// create a transient session for the connection. Note that
|
178
|
+
// seqnum is incremented to account for attach command before the
|
179
|
+
// session is launched. That way we are sure it won't terminate before
|
180
|
+
// being attached.
|
181
|
+
if (peer_identity [0] == 0) {
|
182
|
+
session = new (std::nothrow) transient_session_t (io_thread,
|
183
|
+
socket, options);
|
184
|
+
alloc_assert (session);
|
185
|
+
session->inc_seqnum ();
|
186
|
+
launch_sibling (session);
|
187
|
+
send_attach (session, ephemeral_engine, peer_identity, false);
|
188
|
+
terminate ();
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
|
192
|
+
// Try to find the session corresponding to the peer's identity.
|
193
|
+
// If found, send the engine to that session and destroy this object.
|
194
|
+
// Note that session's seqnum is incremented by find_session rather
|
195
|
+
// than by send_attach.
|
196
|
+
session = socket->find_session (peer_identity);
|
197
|
+
if (session) {
|
198
|
+
send_attach (session, ephemeral_engine, peer_identity, false);
|
199
|
+
terminate ();
|
200
|
+
return;
|
201
|
+
}
|
202
|
+
|
203
|
+
// There's no such named session. We have to create one. Note that
|
204
|
+
// seqnum is incremented to account for attach command before the
|
205
|
+
// session is launched. That way we are sure it won't terminate before
|
206
|
+
// being attached.
|
207
|
+
session = new (std::nothrow) named_session_t (io_thread, socket,
|
208
|
+
options, peer_identity);
|
209
|
+
alloc_assert (session);
|
210
|
+
session->inc_seqnum ();
|
211
|
+
launch_sibling (session);
|
212
|
+
send_attach (session, ephemeral_engine, peer_identity, false);
|
213
|
+
terminate ();
|
214
|
+
return;
|
215
|
+
}
|
216
|
+
}
|
@@ -0,0 +1,93 @@
|
|
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_ZMQ_INIT_HPP_INCLUDED__
|
22
|
+
#define __ZMQ_ZMQ_INIT_HPP_INCLUDED__
|
23
|
+
|
24
|
+
#include "i_inout.hpp"
|
25
|
+
#include "i_engine.hpp"
|
26
|
+
#include "own.hpp"
|
27
|
+
#include "fd.hpp"
|
28
|
+
#include "stdint.hpp"
|
29
|
+
#include "stdint.hpp"
|
30
|
+
#include "blob.hpp"
|
31
|
+
|
32
|
+
namespace zmq
|
33
|
+
{
|
34
|
+
|
35
|
+
// The class handles initialisation phase of 0MQ wire-level protocol.
|
36
|
+
|
37
|
+
class zmq_init_t : public own_t, public i_inout
|
38
|
+
{
|
39
|
+
public:
|
40
|
+
|
41
|
+
zmq_init_t (class io_thread_t *io_thread_, class socket_base_t *socket_,
|
42
|
+
class session_t *session_, fd_t fd_, const options_t &options_);
|
43
|
+
~zmq_init_t ();
|
44
|
+
|
45
|
+
private:
|
46
|
+
|
47
|
+
void finalise_initialisation ();
|
48
|
+
void dispatch_engine ();
|
49
|
+
|
50
|
+
// i_inout interface implementation.
|
51
|
+
bool read (::zmq_msg_t *msg_);
|
52
|
+
bool write (::zmq_msg_t *msg_);
|
53
|
+
void flush ();
|
54
|
+
void detach ();
|
55
|
+
|
56
|
+
// Handlers for incoming commands.
|
57
|
+
void process_plug ();
|
58
|
+
void process_unplug ();
|
59
|
+
|
60
|
+
// Associated wire-protocol engine.
|
61
|
+
i_engine *engine;
|
62
|
+
|
63
|
+
// Detached transient engine.
|
64
|
+
i_engine *ephemeral_engine;
|
65
|
+
|
66
|
+
// True if our own identity was already sent to the peer.
|
67
|
+
bool sent;
|
68
|
+
|
69
|
+
// True if peer's identity was already received.
|
70
|
+
bool received;
|
71
|
+
|
72
|
+
// Socket the object belongs to.
|
73
|
+
class socket_base_t *socket;
|
74
|
+
|
75
|
+
// Reference to the session the init object belongs to.
|
76
|
+
// If the associated session is unknown and should be found
|
77
|
+
// depending on peer identity this value is NULL.
|
78
|
+
class session_t *session;
|
79
|
+
|
80
|
+
// Identity of the peer socket.
|
81
|
+
blob_t peer_identity;
|
82
|
+
|
83
|
+
// I/O thread the object is living in. It will be used to plug
|
84
|
+
// the engine into the same I/O thread.
|
85
|
+
class io_thread_t *io_thread;
|
86
|
+
|
87
|
+
zmq_init_t (const zmq_init_t&);
|
88
|
+
const zmq_init_t &operator = (const zmq_init_t&);
|
89
|
+
};
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
#endif
|
@@ -0,0 +1,78 @@
|
|
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
|
+
|
23
|
+
#include "zmq_listener.hpp"
|
24
|
+
#include "zmq_init.hpp"
|
25
|
+
#include "io_thread.hpp"
|
26
|
+
#include "err.hpp"
|
27
|
+
|
28
|
+
zmq::zmq_listener_t::zmq_listener_t (io_thread_t *io_thread_,
|
29
|
+
socket_base_t *socket_, const options_t &options_) :
|
30
|
+
own_t (io_thread_, options_),
|
31
|
+
io_object_t (io_thread_),
|
32
|
+
socket (socket_)
|
33
|
+
{
|
34
|
+
}
|
35
|
+
|
36
|
+
zmq::zmq_listener_t::~zmq_listener_t ()
|
37
|
+
{
|
38
|
+
}
|
39
|
+
|
40
|
+
int zmq::zmq_listener_t::set_address (const char *protocol_, const char *addr_)
|
41
|
+
{
|
42
|
+
return tcp_listener.set_address (protocol_, addr_, options.backlog);
|
43
|
+
}
|
44
|
+
|
45
|
+
void zmq::zmq_listener_t::process_plug ()
|
46
|
+
{
|
47
|
+
// Start polling for incoming connections.
|
48
|
+
handle = add_fd (tcp_listener.get_fd ());
|
49
|
+
set_pollin (handle);
|
50
|
+
}
|
51
|
+
|
52
|
+
void zmq::zmq_listener_t::process_term (int linger_)
|
53
|
+
{
|
54
|
+
rm_fd (handle);
|
55
|
+
own_t::process_term (linger_);
|
56
|
+
}
|
57
|
+
|
58
|
+
void zmq::zmq_listener_t::in_event ()
|
59
|
+
{
|
60
|
+
fd_t fd = tcp_listener.accept ();
|
61
|
+
|
62
|
+
// If connection was reset by the peer in the meantime, just ignore it.
|
63
|
+
// TODO: Handle specific errors like ENFILE/EMFILE etc.
|
64
|
+
if (fd == retired_fd)
|
65
|
+
return;
|
66
|
+
|
67
|
+
// Choose I/O thread to run connecter in. Given that we are already
|
68
|
+
// running in an I/O thread, there must be at least one available.
|
69
|
+
io_thread_t *io_thread = choose_io_thread (options.affinity);
|
70
|
+
zmq_assert (io_thread);
|
71
|
+
|
72
|
+
// Create and launch an init object.
|
73
|
+
zmq_init_t *init = new (std::nothrow) zmq_init_t (io_thread, socket,
|
74
|
+
NULL, fd, options);
|
75
|
+
alloc_assert (init);
|
76
|
+
launch_child (init);
|
77
|
+
}
|
78
|
+
|