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,50 @@
|
|
1
|
+
zmq_errno(3)
|
2
|
+
============
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_errno - retrieve value of errno for the calling thread
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
*int zmq_errno (void);*
|
13
|
+
|
14
|
+
|
15
|
+
DESCRIPTION
|
16
|
+
-----------
|
17
|
+
The _zmq_errno()_ function shall retrieve the value of the 'errno' variable for
|
18
|
+
the calling thread.
|
19
|
+
|
20
|
+
The _zmq_errno()_ function is provided to assist users on non-POSIX systems who
|
21
|
+
are experiencing issues with retrieving the correct value of 'errno' directly.
|
22
|
+
Specifically, users on Win32 systems whose application is using a different C
|
23
|
+
run-time library from the C run-time library in use by 0MQ will need to use
|
24
|
+
_zmq_errno()_ for correct operation.
|
25
|
+
|
26
|
+
IMPORTANT: Users not experiencing issues with retrieving the correct value of
|
27
|
+
'errno' should not use this function and should instead access the 'errno'
|
28
|
+
variable directly.
|
29
|
+
|
30
|
+
|
31
|
+
RETURN VALUE
|
32
|
+
------------
|
33
|
+
The _zmq_errno()_ function shall return the value of the 'errno' variable for
|
34
|
+
the calling thread.
|
35
|
+
|
36
|
+
|
37
|
+
ERRORS
|
38
|
+
------
|
39
|
+
No errors are defined.
|
40
|
+
|
41
|
+
|
42
|
+
SEE ALSO
|
43
|
+
--------
|
44
|
+
linkzmq:zmq[7]
|
45
|
+
|
46
|
+
|
47
|
+
AUTHORS
|
48
|
+
-------
|
49
|
+
This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
|
50
|
+
Martin Lucina <mato@kotelna.sk>.
|
@@ -0,0 +1,516 @@
|
|
1
|
+
zmq_getsockopt(3)
|
2
|
+
=================
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
|
8
|
+
zmq_getsockopt - get 0MQ socket options
|
9
|
+
|
10
|
+
|
11
|
+
SYNOPSIS
|
12
|
+
--------
|
13
|
+
*int zmq_getsockopt (void '*socket', int 'option_name', void '*option_value', size_t '*option_len');*
|
14
|
+
|
15
|
+
|
16
|
+
DESCRIPTION
|
17
|
+
-----------
|
18
|
+
The _zmq_getsockopt()_ function shall retrieve the value for the option
|
19
|
+
specified by the 'option_name' argument for the 0MQ socket pointed to by the
|
20
|
+
'socket' argument, and store it in the buffer pointed to by the 'option_value'
|
21
|
+
argument. The 'option_len' argument is the size in bytes of the buffer pointed
|
22
|
+
to by 'option_value'; upon successful completion _zmq_getsockopt()_ shall
|
23
|
+
modify the 'option_len' argument to indicate the actual size of the option
|
24
|
+
value stored in the buffer.
|
25
|
+
|
26
|
+
The following options can be retrieved with the _zmq_getsockopt()_ function:
|
27
|
+
|
28
|
+
|
29
|
+
ZMQ_TYPE: Retrieve socket type
|
30
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
31
|
+
The 'ZMQ_TYPE' option shall retrieve the socket type for the specified
|
32
|
+
'socket'. The socket type is specified at socket creation time and
|
33
|
+
cannot be modified afterwards.
|
34
|
+
|
35
|
+
[horizontal]
|
36
|
+
Option value type:: int
|
37
|
+
Option value unit:: N/A
|
38
|
+
Default value:: N/A
|
39
|
+
Applicable socket types:: all
|
40
|
+
|
41
|
+
|
42
|
+
ZMQ_RCVMORE: More message data parts to follow
|
43
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
44
|
+
The 'ZMQ_RCVMORE' option shall return True (1) if the message part last
|
45
|
+
received from the 'socket' was a data part with more parts to follow. If there
|
46
|
+
are no data parts to follow, this option shall return False (0).
|
47
|
+
|
48
|
+
Refer to linkzmq:zmq_send[3] and linkzmq:zmq_recv[3] for a detailed description
|
49
|
+
of multi-part messages.
|
50
|
+
|
51
|
+
[horizontal]
|
52
|
+
Option value type:: int
|
53
|
+
Option value unit:: boolean
|
54
|
+
Default value:: N/A
|
55
|
+
Applicable socket types:: all
|
56
|
+
|
57
|
+
|
58
|
+
ZMQ_SNDHWM: Retrieves high water mark for outbound messages
|
59
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
60
|
+
The 'ZMQ_SNDHWM' option shall return the high water mark for outbound messages
|
61
|
+
on the specified 'socket'. The high water mark is a hard limit on the maximum
|
62
|
+
number of outstanding messages 0MQ shall queue in memory for any single peer
|
63
|
+
that the specified 'socket' is communicating with.
|
64
|
+
|
65
|
+
If this limit has been reached the socket shall enter an exceptional state and
|
66
|
+
depending on the socket type, 0MQ shall take appropriate action such as
|
67
|
+
blocking or dropping sent messages. Refer to the individual socket descriptions
|
68
|
+
in linkzmq:zmq_socket[3] for details on the exact action taken for each socket
|
69
|
+
type.
|
70
|
+
|
71
|
+
[horizontal]
|
72
|
+
Option value type:: int
|
73
|
+
Option value unit:: messages
|
74
|
+
Default value:: 1000
|
75
|
+
Applicable socket types:: all
|
76
|
+
|
77
|
+
|
78
|
+
ZMQ_RCVHWM: Retrieve high water mark for inbound messages
|
79
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
80
|
+
The 'ZMQ_RCVHWM' option shall return the high water mark for inbound messages on
|
81
|
+
the specified 'socket'. The high water mark is a hard limit on the maximum
|
82
|
+
number of outstanding messages 0MQ shall queue in memory for any single peer
|
83
|
+
that the specified 'socket' is communicating with.
|
84
|
+
|
85
|
+
If this limit has been reached the socket shall enter an exceptional state and
|
86
|
+
depending on the socket type, 0MQ shall take appropriate action such as
|
87
|
+
blocking or dropping sent messages. Refer to the individual socket descriptions
|
88
|
+
in linkzmq:zmq_socket[3] for details on the exact action taken for each socket
|
89
|
+
type.
|
90
|
+
|
91
|
+
[horizontal]
|
92
|
+
Option value type:: int
|
93
|
+
Option value unit:: messages
|
94
|
+
Default value:: 1000
|
95
|
+
Applicable socket types:: all
|
96
|
+
|
97
|
+
|
98
|
+
ZMQ_AFFINITY: Retrieve I/O thread affinity
|
99
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
100
|
+
The 'ZMQ_AFFINITY' option shall retrieve the I/O thread affinity for newly
|
101
|
+
created connections on the specified 'socket'.
|
102
|
+
|
103
|
+
Affinity determines which threads from the 0MQ I/O thread pool associated with
|
104
|
+
the socket's _context_ shall handle newly created connections. A value of zero
|
105
|
+
specifies no affinity, meaning that work shall be distributed fairly among all
|
106
|
+
0MQ I/O threads in the thread pool. For non-zero values, the lowest bit
|
107
|
+
corresponds to thread 1, second lowest bit to thread 2 and so on. For example,
|
108
|
+
a value of 3 specifies that subsequent connections on 'socket' shall be handled
|
109
|
+
exclusively by I/O threads 1 and 2.
|
110
|
+
|
111
|
+
See also linkzmq:zmq_init[3] for details on allocating the number of I/O
|
112
|
+
threads for a specific _context_.
|
113
|
+
|
114
|
+
[horizontal]
|
115
|
+
Option value type:: uint64_t
|
116
|
+
Option value unit:: N/A (bitmap)
|
117
|
+
Default value:: 0
|
118
|
+
Applicable socket types:: N/A
|
119
|
+
|
120
|
+
|
121
|
+
ZMQ_IDENTITY: Set socket identity
|
122
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
123
|
+
The 'ZMQ_IDENTITY' option shall retrieve the identity of the specified 'socket'.
|
124
|
+
Socket identity is used only by request/reply pattern. Namely, it can be used
|
125
|
+
in tandem with ROUTER socket to route messages to the peer with specific
|
126
|
+
identity.
|
127
|
+
|
128
|
+
Identity should be at least one byte and at most 255 bytes long. Identities
|
129
|
+
starting with binary zero are reserved for use by 0MQ infrastructure.
|
130
|
+
|
131
|
+
[horizontal]
|
132
|
+
Option value type:: binary data
|
133
|
+
Option value unit:: N/A
|
134
|
+
Default value:: NULL
|
135
|
+
Applicable socket types:: all
|
136
|
+
|
137
|
+
|
138
|
+
ZMQ_RATE: Retrieve multicast data rate
|
139
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
140
|
+
The 'ZMQ_RATE' option shall retrieve the maximum send or receive data rate for
|
141
|
+
multicast transports using the specified 'socket'.
|
142
|
+
|
143
|
+
[horizontal]
|
144
|
+
Option value type:: int
|
145
|
+
Option value unit:: kilobits per second
|
146
|
+
Default value:: 100
|
147
|
+
Applicable socket types:: all, when using multicast transports
|
148
|
+
|
149
|
+
|
150
|
+
ZMQ_RECOVERY_IVL: Get multicast recovery interval
|
151
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
152
|
+
The 'ZMQ_RECOVERY_IVL' option shall retrieve the recovery interval for
|
153
|
+
multicast transports using the specified 'socket'. The recovery interval
|
154
|
+
determines the maximum time in milliseconds that a receiver can be absent from a
|
155
|
+
multicast group before unrecoverable data loss will occur.
|
156
|
+
|
157
|
+
[horizontal]
|
158
|
+
Option value type:: int
|
159
|
+
Option value unit:: milliseconds
|
160
|
+
Default value:: 10000
|
161
|
+
Applicable socket types:: all, when using multicast transports
|
162
|
+
|
163
|
+
|
164
|
+
ZMQ_SNDBUF: Retrieve kernel transmit buffer size
|
165
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
166
|
+
The 'ZMQ_SNDBUF' option shall retrieve the underlying kernel transmit buffer
|
167
|
+
size for the specified 'socket'. A value of zero means that the OS default is
|
168
|
+
in effect. For details refer to your operating system documentation for the
|
169
|
+
'SO_SNDBUF' socket option.
|
170
|
+
|
171
|
+
[horizontal]
|
172
|
+
Option value type:: int
|
173
|
+
Option value unit:: bytes
|
174
|
+
Default value:: 0
|
175
|
+
Applicable socket types:: all
|
176
|
+
|
177
|
+
|
178
|
+
ZMQ_RCVBUF: Retrieve kernel receive buffer size
|
179
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
180
|
+
The 'ZMQ_RCVBUF' option shall retrieve the underlying kernel receive buffer
|
181
|
+
size for the specified 'socket'. A value of zero means that the OS default is
|
182
|
+
in effect. For details refer to your operating system documentation for the
|
183
|
+
'SO_RCVBUF' socket option.
|
184
|
+
|
185
|
+
[horizontal]
|
186
|
+
Option value type:: int
|
187
|
+
Option value unit:: bytes
|
188
|
+
Default value:: 0
|
189
|
+
Applicable socket types:: all
|
190
|
+
|
191
|
+
|
192
|
+
ZMQ_LINGER: Retrieve linger period for socket shutdown
|
193
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
194
|
+
The 'ZMQ_LINGER' option shall retrieve the linger period for the specified
|
195
|
+
'socket'. The linger period determines how long pending messages which have
|
196
|
+
yet to be sent to a peer shall linger in memory after a socket is closed with
|
197
|
+
linkzmq:zmq_close[3], and further affects the termination of the socket's
|
198
|
+
context with linkzmq:zmq_term[3]. The following outlines the different
|
199
|
+
behaviours:
|
200
|
+
|
201
|
+
* The default value of '-1' specifies an infinite linger period. Pending
|
202
|
+
messages shall not be discarded after a call to _zmq_close()_; attempting to
|
203
|
+
terminate the socket's context with _zmq_term()_ shall block until all
|
204
|
+
pending messages have been sent to a peer.
|
205
|
+
|
206
|
+
* The value of '0' specifies no linger period. Pending messages shall be
|
207
|
+
discarded immediately when the socket is closed with _zmq_close()_.
|
208
|
+
|
209
|
+
* Positive values specify an upper bound for the linger period in milliseconds.
|
210
|
+
Pending messages shall not be discarded after a call to _zmq_close()_;
|
211
|
+
attempting to terminate the socket's context with _zmq_term()_ shall block
|
212
|
+
until either all pending messages have been sent to a peer, or the linger
|
213
|
+
period expires, after which any pending messages shall be discarded.
|
214
|
+
|
215
|
+
[horizontal]
|
216
|
+
Option value type:: int
|
217
|
+
Option value unit:: milliseconds
|
218
|
+
Default value:: -1 (infinite)
|
219
|
+
Applicable socket types:: all
|
220
|
+
|
221
|
+
|
222
|
+
ZMQ_RECONNECT_IVL: Retrieve reconnection interval
|
223
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
224
|
+
The 'ZMQ_RECONNECT_IVL' option shall retrieve the initial reconnection interval
|
225
|
+
for the specified 'socket'. The reconnection interval is the period 0MQ shall
|
226
|
+
wait between attempts to reconnect disconnected peers when using
|
227
|
+
connection-oriented transports. The value -1 means no reconnection.
|
228
|
+
|
229
|
+
NOTE: The reconnection interval may be randomized by 0MQ to prevent
|
230
|
+
reconnection storms in topologies with a large number of peers per socket.
|
231
|
+
|
232
|
+
[horizontal]
|
233
|
+
Option value type:: int
|
234
|
+
Option value unit:: milliseconds
|
235
|
+
Default value:: 100
|
236
|
+
Applicable socket types:: all, only for connection-oriented transports
|
237
|
+
|
238
|
+
|
239
|
+
ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval
|
240
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
241
|
+
The 'ZMQ_RECONNECT_IVL_MAX' option shall retrieve the maximum reconnection
|
242
|
+
interval for the specified 'socket'. This is the maximum period 0MQ shall wait
|
243
|
+
between attempts to reconnect. On each reconnect attempt, the previous interval
|
244
|
+
shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for
|
245
|
+
exponential backoff strategy. Default value means no exponential backoff is
|
246
|
+
performed and reconnect interval calculations are only based on
|
247
|
+
ZMQ_RECONNECT_IVL.
|
248
|
+
|
249
|
+
NOTE: Values less than ZMQ_RECONNECT_IVL will be ignored.
|
250
|
+
|
251
|
+
[horizontal]
|
252
|
+
Option value type:: int
|
253
|
+
Option value unit:: milliseconds
|
254
|
+
Default value:: 0 (only use ZMQ_RECONNECT_IVL)
|
255
|
+
Applicable socket types:: all, only for connection-oriented transport
|
256
|
+
|
257
|
+
|
258
|
+
ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections
|
259
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
260
|
+
The 'ZMQ_BACKLOG' option shall retrieve the maximum length of the queue of
|
261
|
+
outstanding peer connections for the specified 'socket'; this only applies to
|
262
|
+
connection-oriented transports. For details refer to your operating system
|
263
|
+
documentation for the 'listen' function.
|
264
|
+
|
265
|
+
[horizontal]
|
266
|
+
Option value type:: int
|
267
|
+
Option value unit:: connections
|
268
|
+
Default value:: 100
|
269
|
+
Applicable socket types:: all, only for connection-oriented transports
|
270
|
+
|
271
|
+
|
272
|
+
ZMQ_MAXMSGSIZE: Maximum acceptable inbound message size
|
273
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
274
|
+
The option shall retrieve limit for the inbound messages. If a peer sends
|
275
|
+
a message larger than ZMQ_MAXMSGSIZE it is disconnected. Value of -1 means
|
276
|
+
'no limit'.
|
277
|
+
|
278
|
+
[horizontal]
|
279
|
+
Option value type:: int64_t
|
280
|
+
Option value unit:: bytes
|
281
|
+
Default value:: -1
|
282
|
+
Applicable socket types:: all
|
283
|
+
|
284
|
+
|
285
|
+
ZMQ_MULTICAST_HOPS: Maximum network hops for multicast packets
|
286
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
287
|
+
The option shall retrieve time-to-live used for outbound multicast packets.
|
288
|
+
The default of 1 means that the multicast packets don't leave the local network.
|
289
|
+
|
290
|
+
[horizontal]
|
291
|
+
Option value type:: int
|
292
|
+
Option value unit:: network hops
|
293
|
+
Default value:: 1
|
294
|
+
Applicable socket types:: all, when using multicast transports
|
295
|
+
|
296
|
+
|
297
|
+
ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN
|
298
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
299
|
+
Retrieve the timeout for recv operation on the socket. If the value is `0`,
|
300
|
+
_zmq_recv(3)_ will return immediately, with a EAGAIN error if there is no
|
301
|
+
message to receive. If the value is `-1`, it will block until a message is
|
302
|
+
available. For all other values, it will wait for a message for that amount
|
303
|
+
of time before returning with an EAGAIN error.
|
304
|
+
|
305
|
+
[horizontal]
|
306
|
+
Option value type:: int
|
307
|
+
Option value unit:: milliseconds
|
308
|
+
Default value:: -1 (infinite)
|
309
|
+
Applicable socket types:: all
|
310
|
+
|
311
|
+
|
312
|
+
ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN
|
313
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
314
|
+
Retrieve the timeout for send operation on the socket. If the value is `0`,
|
315
|
+
_zmq_send(3)_ will return immediately, with a EAGAIN error if the message
|
316
|
+
cannot be sent. If the value is `-1`, it will block until the message is sent.
|
317
|
+
For all other values, it will try to send the message for that amount of time
|
318
|
+
before returning with an EAGAIN error.
|
319
|
+
|
320
|
+
[horizontal]
|
321
|
+
Option value type:: int
|
322
|
+
Option value unit:: milliseconds
|
323
|
+
Default value:: -1 (infinite)
|
324
|
+
Applicable socket types:: all
|
325
|
+
|
326
|
+
|
327
|
+
ZMQ_IPV4ONLY: Retrieve IPv4-only socket override status
|
328
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
329
|
+
Retrieve the underlying native socket type. A value of `1` will use IPv4
|
330
|
+
sockets, while the value of `0` will use IPv6 sockets. An IPv6 socket
|
331
|
+
lets applications connect to and accept connections from both IPv4 and IPv6
|
332
|
+
hosts.
|
333
|
+
|
334
|
+
[horizontal]
|
335
|
+
Option value type:: int
|
336
|
+
Option value unit:: boolean
|
337
|
+
Default value:: 1 (true)
|
338
|
+
Applicable socket types:: all, when using TCP transports.
|
339
|
+
|
340
|
+
|
341
|
+
ZMQ_DELAY_ATTACH_ON_CONNECT: Retrieve attach-on-connect value
|
342
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
343
|
+
Retrieve the state of the attach on connect value. If set to `1`, will delay the
|
344
|
+
attachment of a pipe on connect until the underlying connection has completed.
|
345
|
+
This will cause the socket to block if there are no other connections, but will
|
346
|
+
prevent queues from filling on pipes awaiting connection.
|
347
|
+
|
348
|
+
[horizontal]
|
349
|
+
Option value type:: int
|
350
|
+
Option value unit:: boolean
|
351
|
+
Default value:: 0 (false)
|
352
|
+
Applicable socket types:: all, primarily when using TCP/IPC transports.
|
353
|
+
|
354
|
+
|
355
|
+
ZMQ_FD: Retrieve file descriptor associated with the socket
|
356
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
357
|
+
The 'ZMQ_FD' option shall retrieve the file descriptor associated with the
|
358
|
+
specified 'socket'. The returned file descriptor can be used to integrate the
|
359
|
+
socket into an existing event loop; the 0MQ library shall signal any pending
|
360
|
+
events on the socket in an _edge-triggered_ fashion by making the file
|
361
|
+
descriptor become ready for reading.
|
362
|
+
|
363
|
+
NOTE: The ability to read from the returned file descriptor does not
|
364
|
+
necessarily indicate that messages are available to be read from, or can be
|
365
|
+
written to, the underlying socket; applications must retrieve the actual event
|
366
|
+
state with a subsequent retrieval of the 'ZMQ_EVENTS' option.
|
367
|
+
|
368
|
+
NOTE: The returned file descriptor is also used internally by the 'zmq_send'
|
369
|
+
and 'zmq_recv' functions. As the descriptor is edge triggered, applications
|
370
|
+
must update the state of 'ZMQ_EVENTS' after each invocation of 'zmq_send'
|
371
|
+
or 'zmq_recv'.To be more explicit: after calling 'zmq_send' the socket may
|
372
|
+
become readable (and vice versa) without triggering a read event on the
|
373
|
+
file descriptor.
|
374
|
+
|
375
|
+
CAUTION: The returned file descriptor is intended for use with a 'poll' or
|
376
|
+
similar system call only. Applications must never attempt to read or write data
|
377
|
+
to it directly, neither should they try to close it.
|
378
|
+
|
379
|
+
[horizontal]
|
380
|
+
Option value type:: int on POSIX systems, SOCKET on Windows
|
381
|
+
Option value unit:: N/A
|
382
|
+
Default value:: N/A
|
383
|
+
Applicable socket types:: all
|
384
|
+
|
385
|
+
|
386
|
+
ZMQ_EVENTS: Retrieve socket event state
|
387
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
388
|
+
The 'ZMQ_EVENTS' option shall retrieve the event state for the specified
|
389
|
+
'socket'. The returned value is a bit mask constructed by OR'ing a combination
|
390
|
+
of the following event flags:
|
391
|
+
|
392
|
+
*ZMQ_POLLIN*::
|
393
|
+
Indicates that at least one message may be received from the specified socket
|
394
|
+
without blocking.
|
395
|
+
|
396
|
+
*ZMQ_POLLOUT*::
|
397
|
+
Indicates that at least one message may be sent to the specified socket without
|
398
|
+
blocking.
|
399
|
+
|
400
|
+
The combination of a file descriptor returned by the 'ZMQ_FD' option being
|
401
|
+
ready for reading but no actual events returned by a subsequent retrieval of
|
402
|
+
the 'ZMQ_EVENTS' option is valid; applications should simply ignore this case
|
403
|
+
and restart their polling operation/event loop.
|
404
|
+
|
405
|
+
[horizontal]
|
406
|
+
Option value type:: int
|
407
|
+
Option value unit:: N/A (flags)
|
408
|
+
Default value:: N/A
|
409
|
+
Applicable socket types:: all
|
410
|
+
|
411
|
+
|
412
|
+
ZMQ_LAST_ENDPOINT: Retrieve the last endpoint set
|
413
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
414
|
+
The 'ZMQ_LAST_ENDPOINT' option shall retrieve the last endpoint bound for
|
415
|
+
TCP and IPC transports. The returned value will be a string in the form of
|
416
|
+
a ZMQ DSN. Note that if the TCP host is INADDR_ANY, indicated by a *, then
|
417
|
+
the returned address will be 0.0.0.0 (for IPv4).
|
418
|
+
|
419
|
+
[horizontal]
|
420
|
+
Option value type:: character string
|
421
|
+
Option value unit:: N/A
|
422
|
+
Default value:: NULL
|
423
|
+
Applicable socket types:: all, when binding TCP or IPC transports
|
424
|
+
|
425
|
+
|
426
|
+
ZMQ_TCP_KEEPALIVE: Override SO_KEEPALIVE socket option
|
427
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
428
|
+
Override 'SO_KEEPALIVE' socket option(where supported by OS).
|
429
|
+
The default value of `-1` means to skip any overrides and leave it to OS default.
|
430
|
+
|
431
|
+
[horizontal]
|
432
|
+
Option value type:: int
|
433
|
+
Option value unit:: -1,0,1
|
434
|
+
Default value:: -1 (leave to OS default)
|
435
|
+
Applicable socket types:: all, when using TCP transports.
|
436
|
+
|
437
|
+
|
438
|
+
ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPCNT(or TCP_KEEPALIVE on some OS)
|
439
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
440
|
+
Override 'TCP_KEEPCNT'(or 'TCP_KEEPALIVE' on some OS) socket option(where supported by OS).
|
441
|
+
The default value of `-1` means to skip any overrides and leave it to OS default.
|
442
|
+
|
443
|
+
[horizontal]
|
444
|
+
Option value type:: int
|
445
|
+
Option value unit:: -1,>0
|
446
|
+
Default value:: -1 (leave to OS default)
|
447
|
+
Applicable socket types:: all, when using TCP transports.
|
448
|
+
|
449
|
+
|
450
|
+
ZMQ_TCP_KEEPALIVE_CNT: Override TCP_KEEPCNT socket option
|
451
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
452
|
+
Override 'TCP_KEEPCNT' socket option(where supported by OS).
|
453
|
+
The default value of `-1` means to skip any overrides and leave it to OS default.
|
454
|
+
|
455
|
+
[horizontal]
|
456
|
+
Option value type:: int
|
457
|
+
Option value unit:: -1,>0
|
458
|
+
Default value:: -1 (leave to OS default)
|
459
|
+
Applicable socket types:: all, when using TCP transports.
|
460
|
+
|
461
|
+
|
462
|
+
ZMQ_TCP_KEEPALIVE_INTVL: Override TCP_KEEPINTVL socket option
|
463
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
464
|
+
Override 'TCP_KEEPINTVL' socket option(where supported by OS).
|
465
|
+
The default value of `-1` means to skip any overrides and leave it to OS default.
|
466
|
+
|
467
|
+
[horizontal]
|
468
|
+
Option value type:: int
|
469
|
+
Option value unit:: -1,>0
|
470
|
+
Default value:: -1 (leave to OS default)
|
471
|
+
Applicable socket types:: all, when using TCP transports.
|
472
|
+
|
473
|
+
RETURN VALUE
|
474
|
+
------------
|
475
|
+
The _zmq_getsockopt()_ function shall return zero if successful. Otherwise it
|
476
|
+
shall return `-1` and set 'errno' to one of the values defined below.
|
477
|
+
|
478
|
+
|
479
|
+
ERRORS
|
480
|
+
------
|
481
|
+
*EINVAL*::
|
482
|
+
The requested option _option_name_ is unknown, or the requested _option_len_ or
|
483
|
+
_option_value_ is invalid, or the size of the buffer pointed to by
|
484
|
+
_option_value_, as specified by _option_len_, is insufficient for storing the
|
485
|
+
option value.
|
486
|
+
*ETERM*::
|
487
|
+
The 0MQ 'context' associated with the specified 'socket' was terminated.
|
488
|
+
*ENOTSOCK*::
|
489
|
+
The provided 'socket' was invalid.
|
490
|
+
*EINTR*::
|
491
|
+
The operation was interrupted by delivery of a signal.
|
492
|
+
|
493
|
+
|
494
|
+
EXAMPLE
|
495
|
+
-------
|
496
|
+
.Retrieving the high water mark for outgoing messages
|
497
|
+
----
|
498
|
+
/* Retrieve high water mark into sndhwm */
|
499
|
+
int sndhwm;
|
500
|
+
size_t sndhwm_size = sizeof (sndhwm);
|
501
|
+
rc = zmq_getsockopt (socket, ZMQ_SNDHWM, &sndhwm, &sndhwm_size);
|
502
|
+
assert (rc == 0);
|
503
|
+
----
|
504
|
+
|
505
|
+
|
506
|
+
SEE ALSO
|
507
|
+
--------
|
508
|
+
linkzmq:zmq_setsockopt[3]
|
509
|
+
linkzmq:zmq_socket[3]
|
510
|
+
linkzmq:zmq[7]
|
511
|
+
|
512
|
+
|
513
|
+
AUTHORS
|
514
|
+
-------
|
515
|
+
This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
|
516
|
+
Martin Lucina <mato@kotelna.sk>.
|