rbczmq 1.6.2 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -3
- data/.gitmodules +6 -0
- data/.travis.yml +5 -1
- data/CHANGELOG.rdoc +15 -0
- data/Gemfile.lock +2 -2
- data/README.rdoc +5 -2
- data/Rakefile +8 -3
- data/ext/czmq/.gitignore +52 -0
- data/ext/czmq/.travis.yml +18 -0
- data/ext/czmq/AUTHORS +9 -0
- data/ext/czmq/COPYING +674 -0
- data/ext/czmq/COPYING.LESSER +178 -0
- data/ext/czmq/ChangeLog +0 -0
- data/ext/czmq/Makefile.am +22 -0
- data/ext/czmq/NEWS +263 -0
- data/ext/czmq/README +0 -0
- data/ext/czmq/README.md +1122 -0
- data/ext/czmq/README.txt +327 -0
- data/ext/czmq/autogen.sh +46 -0
- data/ext/czmq/builds/android/Android.mk +35 -0
- data/ext/czmq/builds/android/Application.mk +1 -0
- data/ext/czmq/builds/android/build.sh +59 -0
- data/ext/czmq/builds/android/clean.sh +26 -0
- data/ext/czmq/builds/mingw32/Makefile.mingw32 +38 -0
- data/ext/czmq/builds/mingw32/platform.h +0 -0
- data/ext/czmq/builds/msvc/.gitignore +18 -0
- data/ext/czmq/builds/msvc/README.txt +17 -0
- data/ext/czmq/builds/msvc/czmq.sln +69 -0
- data/ext/czmq/builds/msvc/czmq.vcproj +2246 -0
- data/ext/czmq/builds/msvc/czmq.vcxproj +329 -0
- data/ext/czmq/builds/msvc/czmq.vcxproj.filters +117 -0
- data/ext/czmq/builds/msvc/czmq11.sln +36 -0
- data/ext/czmq/builds/msvc/czmq_selftest.vcproj +840 -0
- data/ext/czmq/builds/msvc/czmq_selftest.vcxproj +189 -0
- data/ext/czmq/builds/msvc/czmq_selftest.vcxproj.filters +14 -0
- data/ext/czmq/c +520 -0
- data/ext/czmq/configure.ac +229 -0
- data/ext/czmq/doc/Makefile.am +49 -0
- data/ext/czmq/doc/asciidoc.conf +57 -0
- data/ext/czmq/doc/czmq.txt +334 -0
- data/ext/czmq/doc/mkman +100 -0
- data/ext/czmq/doc/mksite +65 -0
- data/ext/czmq/doc/wdput +43 -0
- data/ext/czmq/doc/xml2wd.pl +242 -0
- data/ext/czmq/doc/zbeacon.txt +173 -0
- data/ext/czmq/doc/zclock.txt +51 -0
- data/ext/czmq/doc/zconfig.txt +92 -0
- data/ext/czmq/doc/zctx.txt +111 -0
- data/ext/czmq/doc/zfile.txt +77 -0
- data/ext/czmq/doc/zframe.txt +222 -0
- data/ext/czmq/doc/zhash.txt +225 -0
- data/ext/czmq/doc/zlist.txt +176 -0
- data/ext/czmq/doc/zloop.txt +106 -0
- data/ext/czmq/doc/zmsg.txt +315 -0
- data/ext/czmq/doc/zmutex.txt +54 -0
- data/ext/czmq/doc/zsocket.txt +110 -0
- data/ext/czmq/doc/zsockopt.txt +528 -0
- data/ext/czmq/doc/zstr.txt +80 -0
- data/ext/czmq/doc/zsys.txt +44 -0
- data/ext/czmq/doc/zthread.txt +126 -0
- data/ext/czmq/doc/ztree.txt +236 -0
- data/ext/czmq/images/README_1.png +0 -0
- data/ext/czmq/images/README_2.png +0 -0
- data/ext/czmq/include/czmq.h +64 -0
- data/ext/czmq/include/czmq_prelude.h +504 -0
- data/ext/czmq/include/zbeacon.h +91 -0
- data/ext/czmq/include/zclock.h +56 -0
- data/ext/czmq/include/zconfig.h +117 -0
- data/ext/czmq/include/zctx.h +96 -0
- data/ext/czmq/include/zfile.h +82 -0
- data/ext/czmq/include/zframe.h +145 -0
- data/ext/czmq/include/zhash.h +127 -0
- data/ext/czmq/include/zlist.h +113 -0
- data/ext/czmq/include/zloop.h +98 -0
- data/ext/czmq/include/zmsg.h +165 -0
- data/ext/czmq/include/zmutex.h +62 -0
- data/ext/czmq/include/zsocket.h +104 -0
- data/ext/czmq/include/zsockopt.h +249 -0
- data/ext/czmq/include/zstr.h +69 -0
- data/ext/czmq/include/zsys.h +66 -0
- data/ext/czmq/include/zthread.h +62 -0
- data/ext/czmq/include/ztree.h +133 -0
- data/ext/czmq/mkdoc +14 -0
- data/ext/czmq/model/generate +2 -0
- data/ext/czmq/model/sockopts.xml +101 -0
- data/ext/czmq/notes.txt +21 -0
- data/ext/czmq/scripts/sockopts.gsl +325 -0
- data/ext/czmq/src/Makefile.am +61 -0
- data/ext/czmq/src/czmq_selftest.c +60 -0
- data/ext/czmq/src/libczmq.pc.in +11 -0
- data/ext/czmq/src/selftest +7 -0
- data/ext/czmq/src/selftest.cfg +5 -0
- data/ext/czmq/src/valgrind.supp +14 -0
- data/ext/czmq/src/vg +2 -0
- data/ext/czmq/src/zbeacon.c +787 -0
- data/ext/czmq/src/zclock.c +143 -0
- data/ext/czmq/src/zconfig.c +691 -0
- data/ext/czmq/src/zctx.c +287 -0
- data/ext/czmq/src/zfile.c +237 -0
- data/ext/czmq/src/zframe.c +551 -0
- data/ext/czmq/src/zhash.c +664 -0
- data/ext/czmq/src/zlist.c +459 -0
- data/ext/czmq/src/zloop.c +496 -0
- data/ext/czmq/src/zmsg.c +854 -0
- data/ext/czmq/src/zmutex.c +134 -0
- data/ext/czmq/src/zsocket.c +313 -0
- data/ext/czmq/src/zsockopt.c +1756 -0
- data/ext/czmq/src/zstr.c +297 -0
- data/ext/czmq/src/zsys.c +136 -0
- data/ext/czmq/src/zthread.c +269 -0
- data/ext/czmq/src/ztree.c +888 -0
- data/ext/czmq/version.sh +21 -0
- data/ext/rbczmq/extconf.rb +1 -18
- data/ext/rbczmq/poller.c +4 -1
- data/ext/rbczmq/socket.c +28 -5
- data/ext/rbczmq/socket.h +1 -0
- data/ext/zeromq/AUTHORS +110 -0
- data/ext/zeromq/CMakeLists.txt +392 -0
- data/ext/zeromq/COPYING +674 -0
- data/ext/zeromq/COPYING.LESSER +179 -0
- data/ext/zeromq/INSTALL +246 -0
- data/ext/zeromq/MAINTAINERS +56 -0
- data/ext/zeromq/Makefile.am +40 -0
- data/ext/zeromq/NEWS +333 -0
- data/ext/zeromq/README +39 -0
- data/ext/zeromq/acinclude.m4 +930 -0
- data/ext/zeromq/autogen.sh +45 -0
- data/ext/zeromq/branding.bmp +0 -0
- data/ext/zeromq/builds/msvc/Makefile.am +33 -0
- data/ext/zeromq/builds/msvc/c_local_lat/c_local_lat.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_local_lat/c_local_lat.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/c_local_thr/c_local_thr.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_local_thr/c_local_thr.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/c_remote_lat/c_remote_lat.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_remote_lat/c_remote_lat.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/c_remote_thr/c_remote_thr.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_remote_thr/c_remote_thr.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/errno.cpp +32 -0
- data/ext/zeromq/builds/msvc/errno.hpp +56 -0
- data/ext/zeromq/builds/msvc/inproc_lat/inproc_lat.vcproj +174 -0
- data/ext/zeromq/builds/msvc/inproc_lat/inproc_lat.vcxproj +86 -0
- data/ext/zeromq/builds/msvc/inproc_thr/inproc_thr.vcproj +174 -0
- data/ext/zeromq/builds/msvc/inproc_thr/inproc_thr.vcxproj +86 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcproj +804 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcxproj +252 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcxproj.filters +431 -0
- data/ext/zeromq/builds/msvc/msvc.sln +89 -0
- data/ext/zeromq/builds/msvc/msvc10.sln +116 -0
- data/ext/zeromq/builds/msvc/platform.hpp +32 -0
- data/ext/zeromq/builds/msvc/properties/Common.props +21 -0
- data/ext/zeromq/builds/msvc/properties/Debug.props +19 -0
- data/ext/zeromq/builds/msvc/properties/Dynamic.props +20 -0
- data/ext/zeromq/builds/msvc/properties/Executable.props +19 -0
- data/ext/zeromq/builds/msvc/properties/Precompiled.props +14 -0
- data/ext/zeromq/builds/msvc/properties/Release.props +22 -0
- data/ext/zeromq/builds/msvc/properties/Win32.props +12 -0
- data/ext/zeromq/builds/msvc/properties/Win32_Release.props +17 -0
- data/ext/zeromq/builds/msvc/properties/WithOpenPGM.props +12 -0
- data/ext/zeromq/builds/msvc/properties/ZeroMQ.props +23 -0
- data/ext/zeromq/builds/msvc/properties/x64.props +12 -0
- data/ext/zeromq/builds/redhat/zeromq.spec.in +160 -0
- data/ext/zeromq/builds/valgrind/valgrind.supp +14 -0
- data/ext/zeromq/builds/valgrind/vg +1 -0
- data/ext/zeromq/cmake/Modules/TestZMQVersion.cmake +35 -0
- data/ext/zeromq/cmake/Modules/zmq_version.cpp +31 -0
- data/ext/zeromq/cmake/NSIS.template32.in +952 -0
- data/ext/zeromq/cmake/NSIS.template64.in +960 -0
- data/ext/zeromq/configure.in +428 -0
- data/ext/zeromq/doc/Makefile.am +51 -0
- data/ext/zeromq/doc/asciidoc.conf +56 -0
- data/ext/zeromq/doc/zmq.txt +233 -0
- data/ext/zeromq/doc/zmq_bind.txt +102 -0
- data/ext/zeromq/doc/zmq_close.txt +52 -0
- data/ext/zeromq/doc/zmq_connect.txt +98 -0
- data/ext/zeromq/doc/zmq_ctx_destroy.txt +66 -0
- data/ext/zeromq/doc/zmq_ctx_get.txt +67 -0
- data/ext/zeromq/doc/zmq_ctx_new.txt +49 -0
- data/ext/zeromq/doc/zmq_ctx_set.txt +75 -0
- data/ext/zeromq/doc/zmq_disconnect.txt +67 -0
- data/ext/zeromq/doc/zmq_epgm.txt +162 -0
- data/ext/zeromq/doc/zmq_errno.txt +50 -0
- data/ext/zeromq/doc/zmq_getsockopt.txt +516 -0
- data/ext/zeromq/doc/zmq_init.txt +52 -0
- data/ext/zeromq/doc/zmq_inproc.txt +85 -0
- data/ext/zeromq/doc/zmq_ipc.txt +85 -0
- data/ext/zeromq/doc/zmq_msg_close.txt +55 -0
- data/ext/zeromq/doc/zmq_msg_copy.txt +57 -0
- data/ext/zeromq/doc/zmq_msg_data.txt +48 -0
- data/ext/zeromq/doc/zmq_msg_get.txt +72 -0
- data/ext/zeromq/doc/zmq_msg_init.txt +65 -0
- data/ext/zeromq/doc/zmq_msg_init_data.txt +85 -0
- data/ext/zeromq/doc/zmq_msg_init_size.txt +58 -0
- data/ext/zeromq/doc/zmq_msg_more.txt +63 -0
- data/ext/zeromq/doc/zmq_msg_move.txt +52 -0
- data/ext/zeromq/doc/zmq_msg_recv.txt +125 -0
- data/ext/zeromq/doc/zmq_msg_send.txt +122 -0
- data/ext/zeromq/doc/zmq_msg_set.txt +45 -0
- data/ext/zeromq/doc/zmq_msg_size.txt +48 -0
- data/ext/zeromq/doc/zmq_pgm.txt +162 -0
- data/ext/zeromq/doc/zmq_poll.txt +132 -0
- data/ext/zeromq/doc/zmq_proxy.txt +97 -0
- data/ext/zeromq/doc/zmq_recv.txt +93 -0
- data/ext/zeromq/doc/zmq_recvmsg.txt +123 -0
- data/ext/zeromq/doc/zmq_send.txt +100 -0
- data/ext/zeromq/doc/zmq_sendmsg.txt +119 -0
- data/ext/zeromq/doc/zmq_setsockopt.txt +523 -0
- data/ext/zeromq/doc/zmq_socket.txt +369 -0
- data/ext/zeromq/doc/zmq_socket_monitor.txt +288 -0
- data/ext/zeromq/doc/zmq_strerror.txt +55 -0
- data/ext/zeromq/doc/zmq_tcp.txt +101 -0
- data/ext/zeromq/doc/zmq_term.txt +66 -0
- data/ext/zeromq/doc/zmq_unbind.txt +65 -0
- data/ext/zeromq/doc/zmq_version.txt +53 -0
- data/ext/zeromq/foreign/openpgm/Makefile.am +8 -0
- data/ext/zeromq/foreign/openpgm/libpgm-5.1.118~dfsg.tar.gz +0 -0
- data/ext/zeromq/include/zmq.h +402 -0
- data/ext/zeromq/include/zmq_utils.h +64 -0
- data/ext/zeromq/installer.ico +0 -0
- data/ext/zeromq/perf/Makefile.am +22 -0
- data/ext/zeromq/perf/inproc_lat.cpp +233 -0
- data/ext/zeromq/perf/inproc_thr.cpp +241 -0
- data/ext/zeromq/perf/local_lat.cpp +109 -0
- data/ext/zeromq/perf/local_thr.cpp +133 -0
- data/ext/zeromq/perf/remote_lat.cpp +122 -0
- data/ext/zeromq/perf/remote_thr.cpp +105 -0
- data/ext/zeromq/src/Makefile.am +171 -0
- data/ext/zeromq/src/address.cpp +78 -0
- data/ext/zeromq/src/address.hpp +52 -0
- data/ext/zeromq/src/array.hpp +155 -0
- data/ext/zeromq/src/atomic_counter.hpp +197 -0
- data/ext/zeromq/src/atomic_ptr.hpp +196 -0
- data/ext/zeromq/src/blob.hpp +129 -0
- data/ext/zeromq/src/clock.cpp +147 -0
- data/ext/zeromq/src/clock.hpp +60 -0
- data/ext/zeromq/src/command.hpp +154 -0
- data/ext/zeromq/src/config.hpp +89 -0
- data/ext/zeromq/src/ctx.cpp +352 -0
- data/ext/zeromq/src/ctx.hpp +173 -0
- data/ext/zeromq/src/dealer.cpp +133 -0
- data/ext/zeromq/src/dealer.hpp +92 -0
- data/ext/zeromq/src/decoder.cpp +166 -0
- data/ext/zeromq/src/decoder.hpp +248 -0
- data/ext/zeromq/src/devpoll.cpp +190 -0
- data/ext/zeromq/src/devpoll.hpp +105 -0
- data/ext/zeromq/src/dist.cpp +194 -0
- data/ext/zeromq/src/dist.hpp +105 -0
- data/ext/zeromq/src/encoder.cpp +102 -0
- data/ext/zeromq/src/encoder.hpp +200 -0
- data/ext/zeromq/src/epoll.cpp +178 -0
- data/ext/zeromq/src/epoll.hpp +101 -0
- data/ext/zeromq/src/err.cpp +291 -0
- data/ext/zeromq/src/err.hpp +155 -0
- data/ext/zeromq/src/fd.hpp +45 -0
- data/ext/zeromq/src/fq.cpp +141 -0
- data/ext/zeromq/src/fq.hpp +74 -0
- data/ext/zeromq/src/i_decoder.hpp +49 -0
- data/ext/zeromq/src/i_encoder.hpp +55 -0
- data/ext/zeromq/src/i_engine.hpp +55 -0
- data/ext/zeromq/src/i_msg_sink.hpp +43 -0
- data/ext/zeromq/src/i_msg_source.hpp +44 -0
- data/ext/zeromq/src/i_poll_events.hpp +47 -0
- data/ext/zeromq/src/io_object.cpp +108 -0
- data/ext/zeromq/src/io_object.hpp +81 -0
- data/ext/zeromq/src/io_thread.cpp +104 -0
- data/ext/zeromq/src/io_thread.hpp +91 -0
- data/ext/zeromq/src/ip.cpp +109 -0
- data/ext/zeromq/src/ip.hpp +41 -0
- data/ext/zeromq/src/ipc_address.cpp +84 -0
- data/ext/zeromq/src/ipc_address.hpp +67 -0
- data/ext/zeromq/src/ipc_connecter.cpp +265 -0
- data/ext/zeromq/src/ipc_connecter.hpp +128 -0
- data/ext/zeromq/src/ipc_listener.cpp +206 -0
- data/ext/zeromq/src/ipc_listener.hpp +99 -0
- data/ext/zeromq/src/kqueue.cpp +201 -0
- data/ext/zeromq/src/kqueue.hpp +107 -0
- data/ext/zeromq/src/lb.cpp +148 -0
- data/ext/zeromq/src/lb.hpp +73 -0
- data/ext/zeromq/src/libzmq.pc.in +10 -0
- data/ext/zeromq/src/likely.hpp +33 -0
- data/ext/zeromq/src/mailbox.cpp +87 -0
- data/ext/zeromq/src/mailbox.hpp +75 -0
- data/ext/zeromq/src/msg.cpp +299 -0
- data/ext/zeromq/src/msg.hpp +148 -0
- data/ext/zeromq/src/mtrie.cpp +428 -0
- data/ext/zeromq/src/mtrie.hpp +93 -0
- data/ext/zeromq/src/mutex.hpp +118 -0
- data/ext/zeromq/src/object.cpp +393 -0
- data/ext/zeromq/src/object.hpp +134 -0
- data/ext/zeromq/src/options.cpp +562 -0
- data/ext/zeromq/src/options.hpp +135 -0
- data/ext/zeromq/src/own.cpp +206 -0
- data/ext/zeromq/src/own.hpp +145 -0
- data/ext/zeromq/src/pair.cpp +136 -0
- data/ext/zeromq/src/pair.hpp +79 -0
- data/ext/zeromq/src/pgm_receiver.cpp +283 -0
- data/ext/zeromq/src/pgm_receiver.hpp +141 -0
- data/ext/zeromq/src/pgm_sender.cpp +218 -0
- data/ext/zeromq/src/pgm_sender.hpp +113 -0
- data/ext/zeromq/src/pgm_socket.cpp +706 -0
- data/ext/zeromq/src/pgm_socket.hpp +124 -0
- data/ext/zeromq/src/pipe.cpp +447 -0
- data/ext/zeromq/src/pipe.hpp +207 -0
- data/ext/zeromq/src/poll.cpp +176 -0
- data/ext/zeromq/src/poll.hpp +105 -0
- data/ext/zeromq/src/poller.hpp +82 -0
- data/ext/zeromq/src/poller_base.cpp +99 -0
- data/ext/zeromq/src/poller_base.hpp +86 -0
- data/ext/zeromq/src/precompiled.cpp +21 -0
- data/ext/zeromq/src/precompiled.hpp +47 -0
- data/ext/zeromq/src/proxy.cpp +150 -0
- data/ext/zeromq/src/proxy.hpp +32 -0
- data/ext/zeromq/src/pub.cpp +57 -0
- data/ext/zeromq/src/pub.hpp +69 -0
- data/ext/zeromq/src/pull.cpp +79 -0
- data/ext/zeromq/src/pull.hpp +81 -0
- data/ext/zeromq/src/push.cpp +76 -0
- data/ext/zeromq/src/push.hpp +80 -0
- data/ext/zeromq/src/random.cpp +52 -0
- data/ext/zeromq/src/random.hpp +37 -0
- data/ext/zeromq/src/reaper.cpp +117 -0
- data/ext/zeromq/src/reaper.hpp +80 -0
- data/ext/zeromq/src/rep.cpp +137 -0
- data/ext/zeromq/src/rep.hpp +80 -0
- data/ext/zeromq/src/req.cpp +185 -0
- data/ext/zeromq/src/req.hpp +91 -0
- data/ext/zeromq/src/router.cpp +364 -0
- data/ext/zeromq/src/router.hpp +138 -0
- data/ext/zeromq/src/select.cpp +216 -0
- data/ext/zeromq/src/select.hpp +126 -0
- data/ext/zeromq/src/session_base.cpp +503 -0
- data/ext/zeromq/src/session_base.hpp +156 -0
- data/ext/zeromq/src/signaler.cpp +406 -0
- data/ext/zeromq/src/signaler.hpp +63 -0
- data/ext/zeromq/src/socket_base.cpp +1236 -0
- data/ext/zeromq/src/socket_base.hpp +255 -0
- data/ext/zeromq/src/stdint.hpp +63 -0
- data/ext/zeromq/src/stream_engine.cpp +594 -0
- data/ext/zeromq/src/stream_engine.hpp +149 -0
- data/ext/zeromq/src/sub.cpp +93 -0
- data/ext/zeromq/src/sub.hpp +71 -0
- data/ext/zeromq/src/tcp.cpp +131 -0
- data/ext/zeromq/src/tcp.hpp +38 -0
- data/ext/zeromq/src/tcp_address.cpp +613 -0
- data/ext/zeromq/src/tcp_address.hpp +100 -0
- data/ext/zeromq/src/tcp_connecter.cpp +319 -0
- data/ext/zeromq/src/tcp_connecter.hpp +123 -0
- data/ext/zeromq/src/tcp_listener.cpp +293 -0
- data/ext/zeromq/src/tcp_listener.hpp +91 -0
- data/ext/zeromq/src/thread.cpp +107 -0
- data/ext/zeromq/src/thread.hpp +79 -0
- data/ext/zeromq/src/trie.cpp +337 -0
- data/ext/zeromq/src/trie.hpp +79 -0
- data/ext/zeromq/src/v1_decoder.cpp +162 -0
- data/ext/zeromq/src/v1_decoder.hpp +68 -0
- data/ext/zeromq/src/v1_encoder.cpp +103 -0
- data/ext/zeromq/src/v1_encoder.hpp +60 -0
- data/ext/zeromq/src/v1_protocol.hpp +43 -0
- data/ext/zeromq/src/version.rc.in +93 -0
- data/ext/zeromq/src/windows.hpp +181 -0
- data/ext/zeromq/src/wire.hpp +99 -0
- data/ext/zeromq/src/xpub.cpp +200 -0
- data/ext/zeromq/src/xpub.hpp +110 -0
- data/ext/zeromq/src/xsub.cpp +242 -0
- data/ext/zeromq/src/xsub.hpp +108 -0
- data/ext/zeromq/src/ypipe.hpp +210 -0
- data/ext/zeromq/src/yqueue.hpp +199 -0
- data/ext/zeromq/src/zmq.cpp +1058 -0
- data/ext/zeromq/src/zmq_utils.cpp +61 -0
- data/ext/zeromq/tests/Makefile.am +55 -0
- data/ext/zeromq/tests/test_connect_delay.cpp +260 -0
- data/ext/zeromq/tests/test_connect_resolve.cpp +54 -0
- data/ext/zeromq/tests/test_disconnect_inproc.cpp +120 -0
- data/ext/zeromq/tests/test_hwm.cpp +83 -0
- data/ext/zeromq/tests/test_invalid_rep.cpp +92 -0
- data/ext/zeromq/tests/test_last_endpoint.cpp +60 -0
- data/ext/zeromq/tests/test_monitor.cpp +289 -0
- data/ext/zeromq/tests/test_msg_flags.cpp +78 -0
- data/ext/zeromq/tests/test_pair_inproc.cpp +53 -0
- data/ext/zeromq/tests/test_pair_ipc.cpp +53 -0
- data/ext/zeromq/tests/test_pair_tcp.cpp +54 -0
- data/ext/zeromq/tests/test_reqrep_device.cpp +143 -0
- data/ext/zeromq/tests/test_reqrep_inproc.cpp +53 -0
- data/ext/zeromq/tests/test_reqrep_ipc.cpp +53 -0
- data/ext/zeromq/tests/test_reqrep_tcp.cpp +54 -0
- data/ext/zeromq/tests/test_router_mandatory.cpp +62 -0
- data/ext/zeromq/tests/test_shutdown_stress.cpp +93 -0
- data/ext/zeromq/tests/test_sub_forward.cpp +99 -0
- data/ext/zeromq/tests/test_term_endpoint.cpp +118 -0
- data/ext/zeromq/tests/test_timeo.cpp +119 -0
- data/ext/zeromq/tests/testutil.hpp +77 -0
- data/ext/zeromq/version.sh +21 -0
- data/lib/zmq/version.rb +1 -1
- data/rbczmq.gemspec +16 -3
- data/test/test_socket.rb +13 -1
- metadata +398 -9
- checksums.yaml +0 -15
- data/ext/czmq-1.4.1.tar.gz +0 -0
- data/ext/zeromq-3.2.3.tar.gz +0 -0
@@ -0,0 +1,55 @@
|
|
1
|
+
zmq_strerror(3)
|
2
|
+
===============
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_strerror - get 0MQ error message string
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
*const char *zmq_strerror (int 'errnum');*
|
13
|
+
|
14
|
+
|
15
|
+
DESCRIPTION
|
16
|
+
-----------
|
17
|
+
The _zmq_strerror()_ function shall return a pointer to an error message string
|
18
|
+
corresponding to the error number specified by the 'errnum' argument. As 0MQ
|
19
|
+
defines additional error numbers over and above those defined by the operating
|
20
|
+
system, applications should use _zmq_strerror()_ in preference to the standard
|
21
|
+
_strerror()_ function.
|
22
|
+
|
23
|
+
|
24
|
+
RETURN VALUE
|
25
|
+
------------
|
26
|
+
The _zmq_strerror()_ function shall return a pointer to an error message
|
27
|
+
string.
|
28
|
+
|
29
|
+
|
30
|
+
ERRORS
|
31
|
+
------
|
32
|
+
No errors are defined.
|
33
|
+
|
34
|
+
|
35
|
+
EXAMPLE
|
36
|
+
-------
|
37
|
+
.Displaying an error message when a 0MQ context cannot be initialised
|
38
|
+
----
|
39
|
+
void *ctx = zmq_init (1, 1, 0);
|
40
|
+
if (!ctx) {
|
41
|
+
printf ("Error occurred during zmq_init(): %s\n", zmq_strerror (errno));
|
42
|
+
abort ();
|
43
|
+
}
|
44
|
+
----
|
45
|
+
|
46
|
+
|
47
|
+
SEE ALSO
|
48
|
+
--------
|
49
|
+
linkzmq:zmq[7]
|
50
|
+
|
51
|
+
|
52
|
+
AUTHORS
|
53
|
+
-------
|
54
|
+
This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
|
55
|
+
Martin Lucina <mato@kotelna.sk>.
|
@@ -0,0 +1,101 @@
|
|
1
|
+
zmq_tcp(7)
|
2
|
+
==========
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_tcp - 0MQ unicast transport using TCP
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
TCP is an ubiquitous, reliable, unicast transport. When connecting distributed
|
13
|
+
applications over a network with 0MQ, using the TCP transport will likely be
|
14
|
+
your first choice.
|
15
|
+
|
16
|
+
|
17
|
+
ADDRESSING
|
18
|
+
----------
|
19
|
+
A 0MQ endpoint is a string consisting of a 'transport'`://` followed by an
|
20
|
+
'address'. The 'transport' specifies the underlying protocol to use. The
|
21
|
+
'address' specifies the transport-specific address to connect to.
|
22
|
+
|
23
|
+
For the TCP transport, the transport is `tcp`, and the meaning of the
|
24
|
+
'address' part is defined below.
|
25
|
+
|
26
|
+
|
27
|
+
Assigning a local address to a socket
|
28
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
29
|
+
When assigning a local address to a socket using _zmq_bind()_ with the 'tcp'
|
30
|
+
transport, the 'endpoint' shall be interpreted as an 'interface' followed by a
|
31
|
+
colon and the TCP port number to use.
|
32
|
+
|
33
|
+
An 'interface' may be specified by either of the following:
|
34
|
+
|
35
|
+
* The wild-card `*`, meaning all available interfaces.
|
36
|
+
* The primary IPv4 or IPv6 address assigned to the interface, in its numeric
|
37
|
+
representation.
|
38
|
+
* The non-portable interface name as defined by the operating system.
|
39
|
+
|
40
|
+
The TCP port number may be specified by:
|
41
|
+
|
42
|
+
* A numeric value, usually above 1024 on POSIX systems.
|
43
|
+
* The wild-card `*`, meaning a system-assigned ephemeral port.
|
44
|
+
|
45
|
+
When using ephemeral ports, the caller should retrieve the actual assigned
|
46
|
+
port using the ZMQ_LAST_ENDPOINT socket option. See linkzmq:zmq_getsockopt[3]
|
47
|
+
for details.
|
48
|
+
|
49
|
+
|
50
|
+
Connecting a socket
|
51
|
+
~~~~~~~~~~~~~~~~~~~
|
52
|
+
When connecting a socket to a peer address using _zmq_connect()_ with the 'tcp'
|
53
|
+
transport, the 'endpoint' shall be interpreted as a 'peer address' followed by
|
54
|
+
a colon and the TCP port number to use.
|
55
|
+
|
56
|
+
A 'peer address' may be specified by either of the following:
|
57
|
+
|
58
|
+
* The DNS name of the peer.
|
59
|
+
* The IPv4 or IPv6 address of the peer, in its numeric representation.
|
60
|
+
|
61
|
+
|
62
|
+
EXAMPLES
|
63
|
+
--------
|
64
|
+
.Assigning a local address to a socket
|
65
|
+
----
|
66
|
+
// TCP port 5555 on all available interfaces
|
67
|
+
rc = zmq_bind(socket, "tcp:/// :5555");
|
68
|
+
assert (rc == 0);
|
69
|
+
// TCP port 5555 on the local loop-back interface on all platforms
|
70
|
+
rc = zmq_bind(socket, "tcp://127.0.0.1:5555");
|
71
|
+
assert (rc == 0);
|
72
|
+
// TCP port 5555 on the first Ethernet network interface on Linux
|
73
|
+
rc = zmq_bind(socket, "tcp://eth0:5555");
|
74
|
+
assert (rc == 0);
|
75
|
+
----
|
76
|
+
|
77
|
+
.Connecting a socket
|
78
|
+
----
|
79
|
+
// Connecting using an IP address
|
80
|
+
rc = zmq_connect(socket, "tcp://192.168.1.1:5555");
|
81
|
+
assert (rc == 0);
|
82
|
+
// Connecting using a DNS name
|
83
|
+
rc = zmq_connect(socket, "tcp://server1:5555");
|
84
|
+
assert (rc == 0);
|
85
|
+
----
|
86
|
+
|
87
|
+
|
88
|
+
SEE ALSO
|
89
|
+
--------
|
90
|
+
linkzmq:zmq_bind[3]
|
91
|
+
linkzmq:zmq_connect[3]
|
92
|
+
linkzmq:zmq_pgm[7]
|
93
|
+
linkzmq:zmq_ipc[7]
|
94
|
+
linkzmq:zmq_inproc[7]
|
95
|
+
linkzmq:zmq[7]
|
96
|
+
|
97
|
+
|
98
|
+
AUTHORS
|
99
|
+
-------
|
100
|
+
This 0MQ manual page was written by Pieter Hintjens <ph@imatix.com>,
|
101
|
+
Martin Sustrik <sustrik@250bpm.com> and Martin Lucina <mato@kotelna.sk>.
|
@@ -0,0 +1,66 @@
|
|
1
|
+
zmq_term(3)
|
2
|
+
===========
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_term - terminate 0MQ context
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
*int zmq_term (void '*context');*
|
13
|
+
|
14
|
+
|
15
|
+
DESCRIPTION
|
16
|
+
-----------
|
17
|
+
The _zmq_term()_ function shall terminate the 0MQ context 'context'.
|
18
|
+
|
19
|
+
Context termination is performed in the following steps:
|
20
|
+
|
21
|
+
1. Any blocking operations currently in progress on sockets open within
|
22
|
+
'context' shall return immediately with an error code of ETERM. With the
|
23
|
+
exception of _zmq_close()_, any further operations on sockets open within
|
24
|
+
'context' shall fail with an error code of ETERM.
|
25
|
+
|
26
|
+
2. After interrupting all blocking calls, _zmq_term()_ shall _block_ until the
|
27
|
+
following conditions are satisfied:
|
28
|
+
|
29
|
+
* All sockets open within 'context' have been closed with _zmq_close()_.
|
30
|
+
|
31
|
+
* For each socket within 'context', all messages sent by the application
|
32
|
+
with _zmq_send()_ have either been physically transferred to a network
|
33
|
+
peer, or the socket's linger period set with the _ZMQ_LINGER_ socket
|
34
|
+
option has expired.
|
35
|
+
|
36
|
+
For further details regarding socket linger behaviour refer to the _ZMQ_LINGER_
|
37
|
+
option in linkzmq:zmq_setsockopt[3].
|
38
|
+
|
39
|
+
This function is deprecated by linkzmq:zmq_ctx_destroy[3].
|
40
|
+
|
41
|
+
RETURN VALUE
|
42
|
+
------------
|
43
|
+
The _zmq_term()_ function shall return zero if successful. Otherwise it shall
|
44
|
+
return `-1` and set 'errno' to one of the values defined below.
|
45
|
+
|
46
|
+
|
47
|
+
ERRORS
|
48
|
+
------
|
49
|
+
*EFAULT*::
|
50
|
+
The provided 'context' was invalid.
|
51
|
+
*EINTR*::
|
52
|
+
Termination was interrupted by a signal. It can be restarted if needed.
|
53
|
+
|
54
|
+
|
55
|
+
SEE ALSO
|
56
|
+
--------
|
57
|
+
linkzmq:zmq[7]
|
58
|
+
linkzmq:zmq_init[3]
|
59
|
+
linkzmq:zmq_close[3]
|
60
|
+
linkzmq:zmq_setsockopt[3]
|
61
|
+
|
62
|
+
|
63
|
+
AUTHORS
|
64
|
+
-------
|
65
|
+
This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
|
66
|
+
Martin Lucina <mato@kotelna.sk>.
|
@@ -0,0 +1,65 @@
|
|
1
|
+
zmq_unbind(3)
|
2
|
+
==============
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_unbind - Stop accepting connections on a socket
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
int zmq_unbind (void '*socket', const char '*endpoint');
|
13
|
+
|
14
|
+
|
15
|
+
DESCRIPTION
|
16
|
+
-----------
|
17
|
+
The _zmq_unbind()_ function shall unbind a socket specified
|
18
|
+
by the 'socket' argument from the endpoint specified by the 'endpoint'
|
19
|
+
argument.
|
20
|
+
|
21
|
+
The 'endpoint' argument is as described in linkzmq:zmq_bind[3]
|
22
|
+
|
23
|
+
|
24
|
+
RETURN VALUE
|
25
|
+
------------
|
26
|
+
The _zmq_unbind()_ function shall return zero if successful. Otherwise it
|
27
|
+
shall return `-1` and set 'errno' to one of the values defined below.
|
28
|
+
|
29
|
+
ERRORS
|
30
|
+
------
|
31
|
+
*EINVAL*::
|
32
|
+
The endpoint supplied is invalid.
|
33
|
+
*ETERM*::
|
34
|
+
The 0MQ 'context' associated with the specified 'socket' was terminated.
|
35
|
+
*ENOTSOCK*::
|
36
|
+
The provided 'socket' was invalid.
|
37
|
+
|
38
|
+
|
39
|
+
EXAMPLE
|
40
|
+
-------
|
41
|
+
.Unbind a subscriber socket from a TCP transport
|
42
|
+
----
|
43
|
+
/* Create a ZMQ_SUB socket */
|
44
|
+
void *socket = zmq_socket (context, ZMQ_SUB);
|
45
|
+
assert (socket);
|
46
|
+
/* Connect it to the host server001, port 5555 using a TCP transport */
|
47
|
+
rc = zmq_bind (socket, "tcp://127.0.0.1:5555");
|
48
|
+
assert (rc == 0);
|
49
|
+
/* Disconnect from the previously connected endpoint */
|
50
|
+
rc = zmq_unbind (socket, "tcp://127.0.0.1:5555");
|
51
|
+
assert (rc == 0);
|
52
|
+
----
|
53
|
+
|
54
|
+
|
55
|
+
SEE ALSO
|
56
|
+
--------
|
57
|
+
linkzmq:zmq_bind[3]
|
58
|
+
linkzmq:zmq_socket[3]
|
59
|
+
linkzmq:zmq[7]
|
60
|
+
|
61
|
+
|
62
|
+
AUTHORS
|
63
|
+
-------
|
64
|
+
This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com>,
|
65
|
+
Martin Lucina <mato@kotelna.sk> and Ian Barber <ian.barber@gmail.com>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
zmq_version(3)
|
2
|
+
==============
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_version - report 0MQ library version
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
*void zmq_version (int '*major', int '*minor', int '*patch');*
|
13
|
+
|
14
|
+
|
15
|
+
DESCRIPTION
|
16
|
+
-----------
|
17
|
+
The _zmq_version()_ function shall fill in the integer variables pointed to by
|
18
|
+
the 'major', 'minor' and 'patch' arguments with the major, minor and patch level
|
19
|
+
components of the 0MQ library version.
|
20
|
+
|
21
|
+
This functionality is intended for applications or language bindings
|
22
|
+
dynamically linking to the 0MQ library that wish to determine the actual
|
23
|
+
version of the 0MQ library they are using.
|
24
|
+
|
25
|
+
|
26
|
+
RETURN VALUE
|
27
|
+
------------
|
28
|
+
There is no return value.
|
29
|
+
|
30
|
+
|
31
|
+
ERRORS
|
32
|
+
------
|
33
|
+
No errors are defined.
|
34
|
+
|
35
|
+
|
36
|
+
EXAMPLE
|
37
|
+
-------
|
38
|
+
.Printing out the version of the 0MQ library
|
39
|
+
----
|
40
|
+
int major, minor, patch;
|
41
|
+
zmq_version (&major, &minor, &patch);
|
42
|
+
printf ("Current 0MQ version is %d.%d.%d\n", major, minor, patch);
|
43
|
+
----
|
44
|
+
|
45
|
+
|
46
|
+
SEE ALSO
|
47
|
+
--------
|
48
|
+
linkzmq:zmq[7]
|
49
|
+
|
50
|
+
AUTHORS
|
51
|
+
-------
|
52
|
+
This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
|
53
|
+
Martin Lucina <mato@kotelna.sk>.
|
Binary file
|
@@ -0,0 +1,402 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2007-2012 iMatix Corporation
|
3
|
+
Copyright (c) 2009-2011 250bpm s.r.o.
|
4
|
+
Copyright (c) 2011 VMware, Inc.
|
5
|
+
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
|
6
|
+
|
7
|
+
This file is part of 0MQ.
|
8
|
+
|
9
|
+
0MQ is free software; you can redistribute it and/or modify it under
|
10
|
+
the terms of the GNU Lesser General Public License as published by
|
11
|
+
the Free Software Foundation; either version 3 of the License, or
|
12
|
+
(at your option) any later version.
|
13
|
+
|
14
|
+
0MQ is distributed in the hope that it will be useful,
|
15
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
GNU Lesser General Public License for more details.
|
18
|
+
|
19
|
+
You should have received a copy of the GNU Lesser General Public License
|
20
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
*/
|
22
|
+
|
23
|
+
#ifndef __ZMQ_H_INCLUDED__
|
24
|
+
#define __ZMQ_H_INCLUDED__
|
25
|
+
|
26
|
+
#ifdef __cplusplus
|
27
|
+
extern "C" {
|
28
|
+
#endif
|
29
|
+
|
30
|
+
#if !defined WINCE
|
31
|
+
#include <errno.h>
|
32
|
+
#endif
|
33
|
+
#include <stddef.h>
|
34
|
+
#include <stdio.h>
|
35
|
+
#if defined _WIN32
|
36
|
+
#include <winsock2.h>
|
37
|
+
#endif
|
38
|
+
|
39
|
+
/* Handle DSO symbol visibility */
|
40
|
+
#if defined _WIN32
|
41
|
+
# if defined DLL_EXPORT
|
42
|
+
# define ZMQ_EXPORT __declspec(dllexport)
|
43
|
+
# else
|
44
|
+
# define ZMQ_EXPORT __declspec(dllimport)
|
45
|
+
# endif
|
46
|
+
#else
|
47
|
+
# if defined __SUNPRO_C || defined __SUNPRO_CC
|
48
|
+
# define ZMQ_EXPORT __global
|
49
|
+
# elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER
|
50
|
+
# define ZMQ_EXPORT __attribute__ ((visibility("default")))
|
51
|
+
# else
|
52
|
+
# define ZMQ_EXPORT
|
53
|
+
# endif
|
54
|
+
#endif
|
55
|
+
|
56
|
+
/******************************************************************************/
|
57
|
+
/* 0MQ versioning support. */
|
58
|
+
/******************************************************************************/
|
59
|
+
|
60
|
+
/* Version macros for compile-time API version detection */
|
61
|
+
#define ZMQ_VERSION_MAJOR 3
|
62
|
+
#define ZMQ_VERSION_MINOR 2
|
63
|
+
#define ZMQ_VERSION_PATCH 3
|
64
|
+
|
65
|
+
#define ZMQ_MAKE_VERSION(major, minor, patch) \
|
66
|
+
((major) * 10000 + (minor) * 100 + (patch))
|
67
|
+
#define ZMQ_VERSION \
|
68
|
+
ZMQ_MAKE_VERSION(ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH)
|
69
|
+
|
70
|
+
/* Run-time API version detection */
|
71
|
+
ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch);
|
72
|
+
|
73
|
+
/******************************************************************************/
|
74
|
+
/* 0MQ errors. */
|
75
|
+
/******************************************************************************/
|
76
|
+
|
77
|
+
/* A number random enough not to collide with different errno ranges on */
|
78
|
+
/* different OSes. The assumption is that error_t is at least 32-bit type. */
|
79
|
+
#define ZMQ_HAUSNUMERO 156384712
|
80
|
+
|
81
|
+
/* On Windows platform some of the standard POSIX errnos are not defined. */
|
82
|
+
#ifndef ENOTSUP
|
83
|
+
#define ENOTSUP (ZMQ_HAUSNUMERO + 1)
|
84
|
+
#endif
|
85
|
+
#ifndef EPROTONOSUPPORT
|
86
|
+
#define EPROTONOSUPPORT (ZMQ_HAUSNUMERO + 2)
|
87
|
+
#endif
|
88
|
+
#ifndef ENOBUFS
|
89
|
+
#define ENOBUFS (ZMQ_HAUSNUMERO + 3)
|
90
|
+
#endif
|
91
|
+
#ifndef ENETDOWN
|
92
|
+
#define ENETDOWN (ZMQ_HAUSNUMERO + 4)
|
93
|
+
#endif
|
94
|
+
#ifndef EADDRINUSE
|
95
|
+
#define EADDRINUSE (ZMQ_HAUSNUMERO + 5)
|
96
|
+
#endif
|
97
|
+
#ifndef EADDRNOTAVAIL
|
98
|
+
#define EADDRNOTAVAIL (ZMQ_HAUSNUMERO + 6)
|
99
|
+
#endif
|
100
|
+
#ifndef ECONNREFUSED
|
101
|
+
#define ECONNREFUSED (ZMQ_HAUSNUMERO + 7)
|
102
|
+
#endif
|
103
|
+
#ifndef EINPROGRESS
|
104
|
+
#define EINPROGRESS (ZMQ_HAUSNUMERO + 8)
|
105
|
+
#endif
|
106
|
+
#ifndef ENOTSOCK
|
107
|
+
#define ENOTSOCK (ZMQ_HAUSNUMERO + 9)
|
108
|
+
#endif
|
109
|
+
#ifndef EMSGSIZE
|
110
|
+
#define EMSGSIZE (ZMQ_HAUSNUMERO + 10)
|
111
|
+
#endif
|
112
|
+
#ifndef EAFNOSUPPORT
|
113
|
+
#define EAFNOSUPPORT (ZMQ_HAUSNUMERO + 11)
|
114
|
+
#endif
|
115
|
+
#ifndef ENETUNREACH
|
116
|
+
#define ENETUNREACH (ZMQ_HAUSNUMERO + 12)
|
117
|
+
#endif
|
118
|
+
#ifndef ECONNABORTED
|
119
|
+
#define ECONNABORTED (ZMQ_HAUSNUMERO + 13)
|
120
|
+
#endif
|
121
|
+
#ifndef ECONNRESET
|
122
|
+
#define ECONNRESET (ZMQ_HAUSNUMERO + 14)
|
123
|
+
#endif
|
124
|
+
#ifndef ENOTCONN
|
125
|
+
#define ENOTCONN (ZMQ_HAUSNUMERO + 15)
|
126
|
+
#endif
|
127
|
+
#ifndef ETIMEDOUT
|
128
|
+
#define ETIMEDOUT (ZMQ_HAUSNUMERO + 16)
|
129
|
+
#endif
|
130
|
+
#ifndef EHOSTUNREACH
|
131
|
+
#define EHOSTUNREACH (ZMQ_HAUSNUMERO + 17)
|
132
|
+
#endif
|
133
|
+
#ifndef ENETRESET
|
134
|
+
#define ENETRESET (ZMQ_HAUSNUMERO + 18)
|
135
|
+
#endif
|
136
|
+
|
137
|
+
/* Native 0MQ error codes. */
|
138
|
+
#define EFSM (ZMQ_HAUSNUMERO + 51)
|
139
|
+
#define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 52)
|
140
|
+
#define ETERM (ZMQ_HAUSNUMERO + 53)
|
141
|
+
#define EMTHREAD (ZMQ_HAUSNUMERO + 54)
|
142
|
+
|
143
|
+
/* This function retrieves the errno as it is known to 0MQ library. The goal */
|
144
|
+
/* of this function is to make the code 100% portable, including where 0MQ */
|
145
|
+
/* compiled with certain CRT library (on Windows) is linked to an */
|
146
|
+
/* application that uses different CRT library. */
|
147
|
+
ZMQ_EXPORT int zmq_errno (void);
|
148
|
+
|
149
|
+
/* Resolves system errors and 0MQ errors to human-readable string. */
|
150
|
+
ZMQ_EXPORT const char *zmq_strerror (int errnum);
|
151
|
+
|
152
|
+
/******************************************************************************/
|
153
|
+
/* 0MQ infrastructure (a.k.a. context) initialisation & termination. */
|
154
|
+
/******************************************************************************/
|
155
|
+
|
156
|
+
/* New API */
|
157
|
+
/* Context options */
|
158
|
+
#define ZMQ_IO_THREADS 1
|
159
|
+
#define ZMQ_MAX_SOCKETS 2
|
160
|
+
|
161
|
+
/* Default for new contexts */
|
162
|
+
#define ZMQ_IO_THREADS_DFLT 1
|
163
|
+
#define ZMQ_MAX_SOCKETS_DFLT 1024
|
164
|
+
|
165
|
+
ZMQ_EXPORT void *zmq_ctx_new (void);
|
166
|
+
ZMQ_EXPORT int zmq_ctx_destroy (void *context);
|
167
|
+
ZMQ_EXPORT int zmq_ctx_set (void *context, int option, int optval);
|
168
|
+
ZMQ_EXPORT int zmq_ctx_get (void *context, int option);
|
169
|
+
|
170
|
+
/* Old (legacy) API */
|
171
|
+
ZMQ_EXPORT void *zmq_init (int io_threads);
|
172
|
+
ZMQ_EXPORT int zmq_term (void *context);
|
173
|
+
|
174
|
+
|
175
|
+
/******************************************************************************/
|
176
|
+
/* 0MQ message definition. */
|
177
|
+
/******************************************************************************/
|
178
|
+
|
179
|
+
typedef struct zmq_msg_t {unsigned char _ [32];} zmq_msg_t;
|
180
|
+
|
181
|
+
typedef void (zmq_free_fn) (void *data, void *hint);
|
182
|
+
|
183
|
+
ZMQ_EXPORT int zmq_msg_init (zmq_msg_t *msg);
|
184
|
+
ZMQ_EXPORT int zmq_msg_init_size (zmq_msg_t *msg, size_t size);
|
185
|
+
ZMQ_EXPORT int zmq_msg_init_data (zmq_msg_t *msg, void *data,
|
186
|
+
size_t size, zmq_free_fn *ffn, void *hint);
|
187
|
+
ZMQ_EXPORT int zmq_msg_send (zmq_msg_t *msg, void *s, int flags);
|
188
|
+
ZMQ_EXPORT int zmq_msg_recv (zmq_msg_t *msg, void *s, int flags);
|
189
|
+
ZMQ_EXPORT int zmq_msg_close (zmq_msg_t *msg);
|
190
|
+
ZMQ_EXPORT int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src);
|
191
|
+
ZMQ_EXPORT int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);
|
192
|
+
ZMQ_EXPORT void *zmq_msg_data (zmq_msg_t *msg);
|
193
|
+
ZMQ_EXPORT size_t zmq_msg_size (zmq_msg_t *msg);
|
194
|
+
ZMQ_EXPORT int zmq_msg_more (zmq_msg_t *msg);
|
195
|
+
ZMQ_EXPORT int zmq_msg_get (zmq_msg_t *msg, int option);
|
196
|
+
ZMQ_EXPORT int zmq_msg_set (zmq_msg_t *msg, int option, int optval);
|
197
|
+
|
198
|
+
|
199
|
+
/******************************************************************************/
|
200
|
+
/* 0MQ socket definition. */
|
201
|
+
/******************************************************************************/
|
202
|
+
|
203
|
+
/* Socket types. */
|
204
|
+
#define ZMQ_PAIR 0
|
205
|
+
#define ZMQ_PUB 1
|
206
|
+
#define ZMQ_SUB 2
|
207
|
+
#define ZMQ_REQ 3
|
208
|
+
#define ZMQ_REP 4
|
209
|
+
#define ZMQ_DEALER 5
|
210
|
+
#define ZMQ_ROUTER 6
|
211
|
+
#define ZMQ_PULL 7
|
212
|
+
#define ZMQ_PUSH 8
|
213
|
+
#define ZMQ_XPUB 9
|
214
|
+
#define ZMQ_XSUB 10
|
215
|
+
|
216
|
+
/* Deprecated aliases */
|
217
|
+
#define ZMQ_XREQ ZMQ_DEALER
|
218
|
+
#define ZMQ_XREP ZMQ_ROUTER
|
219
|
+
|
220
|
+
/* Socket options. */
|
221
|
+
#define ZMQ_AFFINITY 4
|
222
|
+
#define ZMQ_IDENTITY 5
|
223
|
+
#define ZMQ_SUBSCRIBE 6
|
224
|
+
#define ZMQ_UNSUBSCRIBE 7
|
225
|
+
#define ZMQ_RATE 8
|
226
|
+
#define ZMQ_RECOVERY_IVL 9
|
227
|
+
#define ZMQ_SNDBUF 11
|
228
|
+
#define ZMQ_RCVBUF 12
|
229
|
+
#define ZMQ_RCVMORE 13
|
230
|
+
#define ZMQ_FD 14
|
231
|
+
#define ZMQ_EVENTS 15
|
232
|
+
#define ZMQ_TYPE 16
|
233
|
+
#define ZMQ_LINGER 17
|
234
|
+
#define ZMQ_RECONNECT_IVL 18
|
235
|
+
#define ZMQ_BACKLOG 19
|
236
|
+
#define ZMQ_RECONNECT_IVL_MAX 21
|
237
|
+
#define ZMQ_MAXMSGSIZE 22
|
238
|
+
#define ZMQ_SNDHWM 23
|
239
|
+
#define ZMQ_RCVHWM 24
|
240
|
+
#define ZMQ_MULTICAST_HOPS 25
|
241
|
+
#define ZMQ_RCVTIMEO 27
|
242
|
+
#define ZMQ_SNDTIMEO 28
|
243
|
+
#define ZMQ_IPV4ONLY 31
|
244
|
+
#define ZMQ_LAST_ENDPOINT 32
|
245
|
+
#define ZMQ_ROUTER_MANDATORY 33
|
246
|
+
#define ZMQ_TCP_KEEPALIVE 34
|
247
|
+
#define ZMQ_TCP_KEEPALIVE_CNT 35
|
248
|
+
#define ZMQ_TCP_KEEPALIVE_IDLE 36
|
249
|
+
#define ZMQ_TCP_KEEPALIVE_INTVL 37
|
250
|
+
#define ZMQ_TCP_ACCEPT_FILTER 38
|
251
|
+
#define ZMQ_DELAY_ATTACH_ON_CONNECT 39
|
252
|
+
#define ZMQ_XPUB_VERBOSE 40
|
253
|
+
|
254
|
+
|
255
|
+
/* Message options */
|
256
|
+
#define ZMQ_MORE 1
|
257
|
+
|
258
|
+
/* Send/recv options. */
|
259
|
+
#define ZMQ_DONTWAIT 1
|
260
|
+
#define ZMQ_SNDMORE 2
|
261
|
+
|
262
|
+
/* Deprecated aliases */
|
263
|
+
#define ZMQ_NOBLOCK ZMQ_DONTWAIT
|
264
|
+
#define ZMQ_FAIL_UNROUTABLE ZMQ_ROUTER_MANDATORY
|
265
|
+
#define ZMQ_ROUTER_BEHAVIOR ZMQ_ROUTER_MANDATORY
|
266
|
+
|
267
|
+
/******************************************************************************/
|
268
|
+
/* 0MQ socket events and monitoring */
|
269
|
+
/******************************************************************************/
|
270
|
+
|
271
|
+
/* Socket transport events (tcp and ipc only) */
|
272
|
+
#define ZMQ_EVENT_CONNECTED 1
|
273
|
+
#define ZMQ_EVENT_CONNECT_DELAYED 2
|
274
|
+
#define ZMQ_EVENT_CONNECT_RETRIED 4
|
275
|
+
|
276
|
+
#define ZMQ_EVENT_LISTENING 8
|
277
|
+
#define ZMQ_EVENT_BIND_FAILED 16
|
278
|
+
|
279
|
+
#define ZMQ_EVENT_ACCEPTED 32
|
280
|
+
#define ZMQ_EVENT_ACCEPT_FAILED 64
|
281
|
+
|
282
|
+
#define ZMQ_EVENT_CLOSED 128
|
283
|
+
#define ZMQ_EVENT_CLOSE_FAILED 256
|
284
|
+
#define ZMQ_EVENT_DISCONNECTED 512
|
285
|
+
|
286
|
+
#define ZMQ_EVENT_ALL ( ZMQ_EVENT_CONNECTED | ZMQ_EVENT_CONNECT_DELAYED | \
|
287
|
+
ZMQ_EVENT_CONNECT_RETRIED | ZMQ_EVENT_LISTENING | \
|
288
|
+
ZMQ_EVENT_BIND_FAILED | ZMQ_EVENT_ACCEPTED | \
|
289
|
+
ZMQ_EVENT_ACCEPT_FAILED | ZMQ_EVENT_CLOSED | \
|
290
|
+
ZMQ_EVENT_CLOSE_FAILED | ZMQ_EVENT_DISCONNECTED )
|
291
|
+
|
292
|
+
/* Socket event data (union member per event) */
|
293
|
+
typedef struct {
|
294
|
+
int event;
|
295
|
+
union {
|
296
|
+
struct {
|
297
|
+
char *addr;
|
298
|
+
int fd;
|
299
|
+
} connected;
|
300
|
+
struct {
|
301
|
+
char *addr;
|
302
|
+
int err;
|
303
|
+
} connect_delayed;
|
304
|
+
struct {
|
305
|
+
char *addr;
|
306
|
+
int interval;
|
307
|
+
} connect_retried;
|
308
|
+
struct {
|
309
|
+
char *addr;
|
310
|
+
int fd;
|
311
|
+
} listening;
|
312
|
+
struct {
|
313
|
+
char *addr;
|
314
|
+
int err;
|
315
|
+
} bind_failed;
|
316
|
+
struct {
|
317
|
+
char *addr;
|
318
|
+
int fd;
|
319
|
+
} accepted;
|
320
|
+
struct {
|
321
|
+
char *addr;
|
322
|
+
int err;
|
323
|
+
} accept_failed;
|
324
|
+
struct {
|
325
|
+
char *addr;
|
326
|
+
int fd;
|
327
|
+
} closed;
|
328
|
+
struct {
|
329
|
+
char *addr;
|
330
|
+
int err;
|
331
|
+
} close_failed;
|
332
|
+
struct {
|
333
|
+
char *addr;
|
334
|
+
int fd;
|
335
|
+
} disconnected;
|
336
|
+
} data;
|
337
|
+
} zmq_event_t;
|
338
|
+
|
339
|
+
ZMQ_EXPORT void *zmq_socket (void *, int type);
|
340
|
+
ZMQ_EXPORT int zmq_close (void *s);
|
341
|
+
ZMQ_EXPORT int zmq_setsockopt (void *s, int option, const void *optval,
|
342
|
+
size_t optvallen);
|
343
|
+
ZMQ_EXPORT int zmq_getsockopt (void *s, int option, void *optval,
|
344
|
+
size_t *optvallen);
|
345
|
+
ZMQ_EXPORT int zmq_bind (void *s, const char *addr);
|
346
|
+
ZMQ_EXPORT int zmq_connect (void *s, const char *addr);
|
347
|
+
ZMQ_EXPORT int zmq_unbind (void *s, const char *addr);
|
348
|
+
ZMQ_EXPORT int zmq_disconnect (void *s, const char *addr);
|
349
|
+
ZMQ_EXPORT int zmq_send (void *s, const void *buf, size_t len, int flags);
|
350
|
+
ZMQ_EXPORT int zmq_recv (void *s, void *buf, size_t len, int flags);
|
351
|
+
ZMQ_EXPORT int zmq_socket_monitor (void *s, const char *addr, int events);
|
352
|
+
|
353
|
+
ZMQ_EXPORT int zmq_sendmsg (void *s, zmq_msg_t *msg, int flags);
|
354
|
+
ZMQ_EXPORT int zmq_recvmsg (void *s, zmq_msg_t *msg, int flags);
|
355
|
+
|
356
|
+
/* Experimental */
|
357
|
+
struct iovec;
|
358
|
+
|
359
|
+
ZMQ_EXPORT int zmq_sendiov (void *s, struct iovec *iov, size_t count, int flags);
|
360
|
+
ZMQ_EXPORT int zmq_recviov (void *s, struct iovec *iov, size_t *count, int flags);
|
361
|
+
|
362
|
+
/******************************************************************************/
|
363
|
+
/* I/O multiplexing. */
|
364
|
+
/******************************************************************************/
|
365
|
+
|
366
|
+
#define ZMQ_POLLIN 1
|
367
|
+
#define ZMQ_POLLOUT 2
|
368
|
+
#define ZMQ_POLLERR 4
|
369
|
+
|
370
|
+
typedef struct
|
371
|
+
{
|
372
|
+
void *socket;
|
373
|
+
#if defined _WIN32
|
374
|
+
SOCKET fd;
|
375
|
+
#else
|
376
|
+
int fd;
|
377
|
+
#endif
|
378
|
+
short events;
|
379
|
+
short revents;
|
380
|
+
} zmq_pollitem_t;
|
381
|
+
|
382
|
+
ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);
|
383
|
+
|
384
|
+
/* Built-in message proxy (3-way) */
|
385
|
+
|
386
|
+
ZMQ_EXPORT int zmq_proxy (void *frontend, void *backend, void *capture);
|
387
|
+
|
388
|
+
/* Deprecated aliases */
|
389
|
+
#define ZMQ_STREAMER 1
|
390
|
+
#define ZMQ_FORWARDER 2
|
391
|
+
#define ZMQ_QUEUE 3
|
392
|
+
/* Deprecated method */
|
393
|
+
ZMQ_EXPORT int zmq_device (int type, void *frontend, void *backend);
|
394
|
+
|
395
|
+
#undef ZMQ_EXPORT
|
396
|
+
|
397
|
+
#ifdef __cplusplus
|
398
|
+
}
|
399
|
+
#endif
|
400
|
+
|
401
|
+
#endif
|
402
|
+
|