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,62 @@
|
|
1
|
+
/* =========================================================================
|
2
|
+
zmutex - working with mutexes
|
3
|
+
|
4
|
+
-------------------------------------------------------------------------
|
5
|
+
Copyright (c) 1991-2013 iMatix Corporation <www.imatix.com>
|
6
|
+
Copyright other contributors as noted in the AUTHORS file.
|
7
|
+
|
8
|
+
This file is part of CZMQ, the high-level C binding for 0MQ:
|
9
|
+
http://czmq.zeromq.org.
|
10
|
+
|
11
|
+
This is free software; you can redistribute it and/or modify it under
|
12
|
+
the terms of the GNU Lesser General Public License as published by the
|
13
|
+
Free Software Foundation; either version 3 of the License, or (at your
|
14
|
+
option) any later version.
|
15
|
+
|
16
|
+
This software is distributed in the hope that it will be useful, but
|
17
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL-
|
18
|
+
ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
19
|
+
Public License for more details.
|
20
|
+
|
21
|
+
You should have received a copy of the GNU Lesser General Public License
|
22
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
23
|
+
=========================================================================
|
24
|
+
*/
|
25
|
+
|
26
|
+
#ifndef __ZMUTEX_H_INCLUDED__
|
27
|
+
#define __ZMUTEX_H_INCLUDED__
|
28
|
+
|
29
|
+
#ifdef __cplusplus
|
30
|
+
extern "C" {
|
31
|
+
#endif
|
32
|
+
|
33
|
+
// Opaque class structure
|
34
|
+
typedef struct _zmutex_t zmutex_t;
|
35
|
+
|
36
|
+
// @interface
|
37
|
+
// Create a new mutex container
|
38
|
+
CZMQ_EXPORT zmutex_t *
|
39
|
+
zmutex_new (void);
|
40
|
+
|
41
|
+
// Destroy a mutex container
|
42
|
+
CZMQ_EXPORT void
|
43
|
+
zmutex_destroy (zmutex_t **self_p);
|
44
|
+
|
45
|
+
// Lock mutex
|
46
|
+
CZMQ_EXPORT void
|
47
|
+
zmutex_lock (zmutex_t *self);
|
48
|
+
|
49
|
+
// Unlock mutex
|
50
|
+
CZMQ_EXPORT void
|
51
|
+
zmutex_unlock (zmutex_t *self);
|
52
|
+
|
53
|
+
// Self test of this class
|
54
|
+
CZMQ_EXPORT int
|
55
|
+
zmutex_test (bool verbose);
|
56
|
+
// @end
|
57
|
+
|
58
|
+
#ifdef __cplusplus
|
59
|
+
}
|
60
|
+
#endif
|
61
|
+
|
62
|
+
#endif
|
@@ -0,0 +1,104 @@
|
|
1
|
+
/* =========================================================================
|
2
|
+
zsocket - working with 0MQ sockets
|
3
|
+
|
4
|
+
-------------------------------------------------------------------------
|
5
|
+
Copyright (c) 1991-2013 iMatix Corporation <www.imatix.com>
|
6
|
+
Copyright other contributors as noted in the AUTHORS file.
|
7
|
+
|
8
|
+
This file is part of CZMQ, the high-level C binding for 0MQ:
|
9
|
+
http://czmq.zeromq.org.
|
10
|
+
|
11
|
+
This is free software; you can redistribute it and/or modify it under
|
12
|
+
the terms of the GNU Lesser General Public License as published by the
|
13
|
+
Free Software Foundation; either version 3 of the License, or (at your
|
14
|
+
option) any later version.
|
15
|
+
|
16
|
+
This software is distributed in the hope that it will be useful, but
|
17
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL-
|
18
|
+
ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
19
|
+
Public License for more details.
|
20
|
+
|
21
|
+
You should have received a copy of the GNU Lesser General Public License
|
22
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
23
|
+
=========================================================================
|
24
|
+
*/
|
25
|
+
|
26
|
+
#ifndef __ZSOCKET_H_INCLUDED__
|
27
|
+
#define __ZSOCKET_H_INCLUDED__
|
28
|
+
|
29
|
+
#ifdef __cplusplus
|
30
|
+
extern "C" {
|
31
|
+
#endif
|
32
|
+
|
33
|
+
// @interface
|
34
|
+
// This port range is defined by IANA for dynamic or private ports
|
35
|
+
// We use this when choosing a port for dynamic binding.
|
36
|
+
#define ZSOCKET_DYNFROM 0xc000
|
37
|
+
#define ZSOCKET_DYNTO 0xffff
|
38
|
+
|
39
|
+
// Callback function for zero-copy methods
|
40
|
+
typedef void (zsocket_free_fn) (void *data, void *arg);
|
41
|
+
|
42
|
+
// Create a new socket within our CZMQ context, replaces zmq_socket.
|
43
|
+
// Use this to get automatic management of the socket at shutdown.
|
44
|
+
// Note: SUB sockets do not automatically subscribe to everything; you
|
45
|
+
// must set filters explicitly.
|
46
|
+
CZMQ_EXPORT void *
|
47
|
+
zsocket_new (zctx_t *self, int type);
|
48
|
+
|
49
|
+
// Destroy a socket within our CZMQ context, replaces zmq_close.
|
50
|
+
CZMQ_EXPORT void
|
51
|
+
zsocket_destroy (zctx_t *self, void *socket);
|
52
|
+
|
53
|
+
// Bind a socket to a formatted endpoint. If the port is specified as
|
54
|
+
// '*', binds to any free port from ZSOCKET_DYNFROM to ZSOCKET_DYNTO
|
55
|
+
// and returns the actual port number used. Otherwise asserts that the
|
56
|
+
// bind succeeded with the specified port number. Always returns the
|
57
|
+
// port number if successful.
|
58
|
+
CZMQ_EXPORT int
|
59
|
+
zsocket_bind (void *socket, const char *format, ...);
|
60
|
+
|
61
|
+
// Connect a socket to a formatted endpoint
|
62
|
+
// Returns 0 if OK, -1 if the endpoint was invalid.
|
63
|
+
CZMQ_EXPORT int
|
64
|
+
zsocket_connect (void *socket, const char *format, ...);
|
65
|
+
|
66
|
+
// Disonnect a socket from a formatted endpoint
|
67
|
+
// Returns 0 if OK, -1 if the endpoint was invalid or the function
|
68
|
+
// isn't supported.
|
69
|
+
CZMQ_EXPORT int
|
70
|
+
zsocket_disconnect (void *socket, const char *format, ...);
|
71
|
+
|
72
|
+
// Poll for input events on the socket. Returns TRUE if there is input
|
73
|
+
// ready on the socket, else FALSE.
|
74
|
+
CZMQ_EXPORT bool
|
75
|
+
zsocket_poll (void *socket, int msecs);
|
76
|
+
|
77
|
+
// Returns socket type as printable constant string
|
78
|
+
CZMQ_EXPORT char *
|
79
|
+
zsocket_type_str (void *socket);
|
80
|
+
|
81
|
+
// Send data over a socket as a single frame
|
82
|
+
// Returns -1 on error, 0 on success
|
83
|
+
CZMQ_EXPORT int
|
84
|
+
zsocket_sendmem (void *socket, const void* data, size_t size, int flags);
|
85
|
+
|
86
|
+
// Send data over a socket as a single frame
|
87
|
+
// Returns -1 on error, 0 on success
|
88
|
+
// DEPRECATED - will be removed for next stable release
|
89
|
+
CZMQ_EXPORT int
|
90
|
+
zsocket_sendmem_zero_copy (void *socket, void *data, size_t size,
|
91
|
+
zsocket_free_fn *free_fn,
|
92
|
+
void *hint, int flags);
|
93
|
+
|
94
|
+
|
95
|
+
// Self test of this class
|
96
|
+
CZMQ_EXPORT int
|
97
|
+
zsocket_test (bool verbose);
|
98
|
+
// @end
|
99
|
+
|
100
|
+
#ifdef __cplusplus
|
101
|
+
}
|
102
|
+
#endif
|
103
|
+
|
104
|
+
#endif
|
@@ -0,0 +1,249 @@
|
|
1
|
+
/* =========================================================================
|
2
|
+
zsockopt - get/set 0MQ socket options
|
3
|
+
|
4
|
+
****************************************************
|
5
|
+
* GENERATED SOURCE CODE, DO NOT EDIT!! *
|
6
|
+
* TO CHANGE THIS, EDIT scripts/sockopts.gsl *
|
7
|
+
* AND RUN ./generate in models/. *
|
8
|
+
****************************************************
|
9
|
+
-------------------------------------------------------------------------
|
10
|
+
Copyright (c) 1991-2013 iMatix Corporation <www.imatix.com>
|
11
|
+
Copyright other contributors as noted in the AUTHORS file.
|
12
|
+
|
13
|
+
This file is part of CZMQ, the high-level C binding for 0MQ:
|
14
|
+
http://czmq.zeromq.org.
|
15
|
+
|
16
|
+
This is free software; you can redistribute it and/or modify it under
|
17
|
+
the terms of the GNU Lesser General Public License as published by the
|
18
|
+
Free Software Foundation; either version 3 of the License, or (at your
|
19
|
+
option) any later version.
|
20
|
+
|
21
|
+
This software is distributed in the hope that it will be useful, but
|
22
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL-
|
23
|
+
ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
24
|
+
Public License for more details.
|
25
|
+
|
26
|
+
You should have received a copy of the GNU Lesser General Public License
|
27
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
28
|
+
=========================================================================
|
29
|
+
*/
|
30
|
+
|
31
|
+
#ifndef __ZSOCKOPT_H_INCLUDED__
|
32
|
+
#define __ZSOCKOPT_H_INCLUDED__
|
33
|
+
|
34
|
+
#ifdef __cplusplus
|
35
|
+
extern "C" {
|
36
|
+
#endif
|
37
|
+
|
38
|
+
// @interface
|
39
|
+
#if (ZMQ_VERSION_MAJOR == 2)
|
40
|
+
// Get socket options
|
41
|
+
CZMQ_EXPORT int zsocket_hwm (void *zocket);
|
42
|
+
CZMQ_EXPORT int zsocket_swap (void *zocket);
|
43
|
+
CZMQ_EXPORT int zsocket_affinity (void *zocket);
|
44
|
+
CZMQ_EXPORT char * zsocket_identity (void *zocket);
|
45
|
+
CZMQ_EXPORT int zsocket_rate (void *zocket);
|
46
|
+
CZMQ_EXPORT int zsocket_recovery_ivl (void *zocket);
|
47
|
+
CZMQ_EXPORT int zsocket_recovery_ivl_msec (void *zocket);
|
48
|
+
CZMQ_EXPORT int zsocket_mcast_loop (void *zocket);
|
49
|
+
# if (ZMQ_VERSION_MINOR == 2)
|
50
|
+
CZMQ_EXPORT int zsocket_rcvtimeo (void *zocket);
|
51
|
+
# endif
|
52
|
+
# if (ZMQ_VERSION_MINOR == 2)
|
53
|
+
CZMQ_EXPORT int zsocket_sndtimeo (void *zocket);
|
54
|
+
# endif
|
55
|
+
CZMQ_EXPORT int zsocket_sndbuf (void *zocket);
|
56
|
+
CZMQ_EXPORT int zsocket_rcvbuf (void *zocket);
|
57
|
+
CZMQ_EXPORT int zsocket_linger (void *zocket);
|
58
|
+
CZMQ_EXPORT int zsocket_reconnect_ivl (void *zocket);
|
59
|
+
CZMQ_EXPORT int zsocket_reconnect_ivl_max (void *zocket);
|
60
|
+
CZMQ_EXPORT int zsocket_backlog (void *zocket);
|
61
|
+
CZMQ_EXPORT int zsocket_type (void *zocket);
|
62
|
+
CZMQ_EXPORT int zsocket_rcvmore (void *zocket);
|
63
|
+
CZMQ_EXPORT int zsocket_fd (void *zocket);
|
64
|
+
CZMQ_EXPORT int zsocket_events (void *zocket);
|
65
|
+
|
66
|
+
// Set socket options
|
67
|
+
CZMQ_EXPORT void zsocket_set_hwm (void *zocket, int hwm);
|
68
|
+
CZMQ_EXPORT void zsocket_set_swap (void *zocket, int swap);
|
69
|
+
CZMQ_EXPORT void zsocket_set_affinity (void *zocket, int affinity);
|
70
|
+
CZMQ_EXPORT void zsocket_set_identity (void *zocket, const char * identity);
|
71
|
+
CZMQ_EXPORT void zsocket_set_rate (void *zocket, int rate);
|
72
|
+
CZMQ_EXPORT void zsocket_set_recovery_ivl (void *zocket, int recovery_ivl);
|
73
|
+
CZMQ_EXPORT void zsocket_set_recovery_ivl_msec (void *zocket, int recovery_ivl_msec);
|
74
|
+
CZMQ_EXPORT void zsocket_set_mcast_loop (void *zocket, int mcast_loop);
|
75
|
+
# if (ZMQ_VERSION_MINOR == 2)
|
76
|
+
CZMQ_EXPORT void zsocket_set_rcvtimeo (void *zocket, int rcvtimeo);
|
77
|
+
# endif
|
78
|
+
# if (ZMQ_VERSION_MINOR == 2)
|
79
|
+
CZMQ_EXPORT void zsocket_set_sndtimeo (void *zocket, int sndtimeo);
|
80
|
+
# endif
|
81
|
+
CZMQ_EXPORT void zsocket_set_sndbuf (void *zocket, int sndbuf);
|
82
|
+
CZMQ_EXPORT void zsocket_set_rcvbuf (void *zocket, int rcvbuf);
|
83
|
+
CZMQ_EXPORT void zsocket_set_linger (void *zocket, int linger);
|
84
|
+
CZMQ_EXPORT void zsocket_set_reconnect_ivl (void *zocket, int reconnect_ivl);
|
85
|
+
CZMQ_EXPORT void zsocket_set_reconnect_ivl_max (void *zocket, int reconnect_ivl_max);
|
86
|
+
CZMQ_EXPORT void zsocket_set_backlog (void *zocket, int backlog);
|
87
|
+
CZMQ_EXPORT void zsocket_set_subscribe (void *zocket, const char * subscribe);
|
88
|
+
CZMQ_EXPORT void zsocket_set_unsubscribe (void *zocket, const char * unsubscribe);
|
89
|
+
#endif
|
90
|
+
|
91
|
+
#if (ZMQ_VERSION_MAJOR == 3)
|
92
|
+
// Get socket options
|
93
|
+
CZMQ_EXPORT int zsocket_type (void *zocket);
|
94
|
+
CZMQ_EXPORT int zsocket_sndhwm (void *zocket);
|
95
|
+
CZMQ_EXPORT int zsocket_rcvhwm (void *zocket);
|
96
|
+
CZMQ_EXPORT int zsocket_affinity (void *zocket);
|
97
|
+
CZMQ_EXPORT char * zsocket_identity (void *zocket);
|
98
|
+
CZMQ_EXPORT int zsocket_rate (void *zocket);
|
99
|
+
CZMQ_EXPORT int zsocket_recovery_ivl (void *zocket);
|
100
|
+
CZMQ_EXPORT int zsocket_sndbuf (void *zocket);
|
101
|
+
CZMQ_EXPORT int zsocket_rcvbuf (void *zocket);
|
102
|
+
CZMQ_EXPORT int zsocket_linger (void *zocket);
|
103
|
+
CZMQ_EXPORT int zsocket_reconnect_ivl (void *zocket);
|
104
|
+
CZMQ_EXPORT int zsocket_reconnect_ivl_max (void *zocket);
|
105
|
+
CZMQ_EXPORT int zsocket_backlog (void *zocket);
|
106
|
+
CZMQ_EXPORT int zsocket_maxmsgsize (void *zocket);
|
107
|
+
CZMQ_EXPORT int zsocket_multicast_hops (void *zocket);
|
108
|
+
CZMQ_EXPORT int zsocket_rcvtimeo (void *zocket);
|
109
|
+
CZMQ_EXPORT int zsocket_sndtimeo (void *zocket);
|
110
|
+
CZMQ_EXPORT int zsocket_ipv4only (void *zocket);
|
111
|
+
CZMQ_EXPORT int zsocket_rcvmore (void *zocket);
|
112
|
+
CZMQ_EXPORT int zsocket_fd (void *zocket);
|
113
|
+
CZMQ_EXPORT int zsocket_events (void *zocket);
|
114
|
+
CZMQ_EXPORT char * zsocket_last_endpoint (void *zocket);
|
115
|
+
|
116
|
+
// Set socket options
|
117
|
+
CZMQ_EXPORT void zsocket_set_sndhwm (void *zocket, int sndhwm);
|
118
|
+
CZMQ_EXPORT void zsocket_set_rcvhwm (void *zocket, int rcvhwm);
|
119
|
+
CZMQ_EXPORT void zsocket_set_affinity (void *zocket, int affinity);
|
120
|
+
CZMQ_EXPORT void zsocket_set_subscribe (void *zocket, const char * subscribe);
|
121
|
+
CZMQ_EXPORT void zsocket_set_unsubscribe (void *zocket, const char * unsubscribe);
|
122
|
+
CZMQ_EXPORT void zsocket_set_identity (void *zocket, const char * identity);
|
123
|
+
CZMQ_EXPORT void zsocket_set_rate (void *zocket, int rate);
|
124
|
+
CZMQ_EXPORT void zsocket_set_recovery_ivl (void *zocket, int recovery_ivl);
|
125
|
+
CZMQ_EXPORT void zsocket_set_sndbuf (void *zocket, int sndbuf);
|
126
|
+
CZMQ_EXPORT void zsocket_set_rcvbuf (void *zocket, int rcvbuf);
|
127
|
+
CZMQ_EXPORT void zsocket_set_linger (void *zocket, int linger);
|
128
|
+
CZMQ_EXPORT void zsocket_set_reconnect_ivl (void *zocket, int reconnect_ivl);
|
129
|
+
CZMQ_EXPORT void zsocket_set_reconnect_ivl_max (void *zocket, int reconnect_ivl_max);
|
130
|
+
CZMQ_EXPORT void zsocket_set_backlog (void *zocket, int backlog);
|
131
|
+
CZMQ_EXPORT void zsocket_set_maxmsgsize (void *zocket, int maxmsgsize);
|
132
|
+
CZMQ_EXPORT void zsocket_set_multicast_hops (void *zocket, int multicast_hops);
|
133
|
+
CZMQ_EXPORT void zsocket_set_rcvtimeo (void *zocket, int rcvtimeo);
|
134
|
+
CZMQ_EXPORT void zsocket_set_sndtimeo (void *zocket, int sndtimeo);
|
135
|
+
CZMQ_EXPORT void zsocket_set_ipv4only (void *zocket, int ipv4only);
|
136
|
+
CZMQ_EXPORT void zsocket_set_delay_attach_on_connect (void *zocket, int delay_attach_on_connect);
|
137
|
+
CZMQ_EXPORT void zsocket_set_router_mandatory (void *zocket, int router_mandatory);
|
138
|
+
CZMQ_EXPORT void zsocket_set_router_raw (void *zocket, int router_raw);
|
139
|
+
CZMQ_EXPORT void zsocket_set_xpub_verbose (void *zocket, int xpub_verbose);
|
140
|
+
|
141
|
+
// Emulation of widely-used 2.x socket options
|
142
|
+
void zsocket_set_hwm (void *zocket, int hwm);
|
143
|
+
#endif
|
144
|
+
|
145
|
+
// Self test of this class
|
146
|
+
int zsockopt_test (bool verbose);
|
147
|
+
// @end
|
148
|
+
|
149
|
+
// Deprecated function names
|
150
|
+
#if (ZMQ_VERSION_MAJOR == 2)
|
151
|
+
#define zsockopt_hwm zsocket_hwm
|
152
|
+
#define zsockopt_set_hwm zsocket_set_hwm
|
153
|
+
#define zsockopt_swap zsocket_swap
|
154
|
+
#define zsockopt_set_swap zsocket_set_swap
|
155
|
+
#define zsockopt_affinity zsocket_affinity
|
156
|
+
#define zsockopt_set_affinity zsocket_set_affinity
|
157
|
+
#define zsockopt_identity zsocket_identity
|
158
|
+
#define zsockopt_set_identity zsocket_set_identity
|
159
|
+
#define zsockopt_rate zsocket_rate
|
160
|
+
#define zsockopt_set_rate zsocket_set_rate
|
161
|
+
#define zsockopt_recovery_ivl zsocket_recovery_ivl
|
162
|
+
#define zsockopt_set_recovery_ivl zsocket_set_recovery_ivl
|
163
|
+
#define zsockopt_recovery_ivl_msec zsocket_recovery_ivl_msec
|
164
|
+
#define zsockopt_set_recovery_ivl_msec zsocket_set_recovery_ivl_msec
|
165
|
+
#define zsockopt_mcast_loop zsocket_mcast_loop
|
166
|
+
#define zsockopt_set_mcast_loop zsocket_set_mcast_loop
|
167
|
+
# if (ZMQ_VERSION_MINOR == 2)
|
168
|
+
#define zsockopt_rcvtimeo zsocket_rcvtimeo
|
169
|
+
#define zsockopt_set_rcvtimeo zsocket_set_rcvtimeo
|
170
|
+
# endif
|
171
|
+
# if (ZMQ_VERSION_MINOR == 2)
|
172
|
+
#define zsockopt_sndtimeo zsocket_sndtimeo
|
173
|
+
#define zsockopt_set_sndtimeo zsocket_set_sndtimeo
|
174
|
+
# endif
|
175
|
+
#define zsockopt_sndbuf zsocket_sndbuf
|
176
|
+
#define zsockopt_set_sndbuf zsocket_set_sndbuf
|
177
|
+
#define zsockopt_rcvbuf zsocket_rcvbuf
|
178
|
+
#define zsockopt_set_rcvbuf zsocket_set_rcvbuf
|
179
|
+
#define zsockopt_linger zsocket_linger
|
180
|
+
#define zsockopt_set_linger zsocket_set_linger
|
181
|
+
#define zsockopt_reconnect_ivl zsocket_reconnect_ivl
|
182
|
+
#define zsockopt_set_reconnect_ivl zsocket_set_reconnect_ivl
|
183
|
+
#define zsockopt_reconnect_ivl_max zsocket_reconnect_ivl_max
|
184
|
+
#define zsockopt_set_reconnect_ivl_max zsocket_set_reconnect_ivl_max
|
185
|
+
#define zsockopt_backlog zsocket_backlog
|
186
|
+
#define zsockopt_set_backlog zsocket_set_backlog
|
187
|
+
#define zsockopt_set_subscribe zsocket_set_subscribe
|
188
|
+
#define zsockopt_set_unsubscribe zsocket_set_unsubscribe
|
189
|
+
#define zsockopt_type zsocket_type
|
190
|
+
#define zsockopt_rcvmore zsocket_rcvmore
|
191
|
+
#define zsockopt_fd zsocket_fd
|
192
|
+
#define zsockopt_events zsocket_events
|
193
|
+
#endif
|
194
|
+
|
195
|
+
// Deprecated function names
|
196
|
+
#if (ZMQ_VERSION_MAJOR == 3)
|
197
|
+
#define zsockopt_type zsocket_type
|
198
|
+
#define zsockopt_sndhwm zsocket_sndhwm
|
199
|
+
#define zsockopt_set_sndhwm zsocket_set_sndhwm
|
200
|
+
#define zsockopt_rcvhwm zsocket_rcvhwm
|
201
|
+
#define zsockopt_set_rcvhwm zsocket_set_rcvhwm
|
202
|
+
#define zsockopt_affinity zsocket_affinity
|
203
|
+
#define zsockopt_set_affinity zsocket_set_affinity
|
204
|
+
#define zsockopt_set_subscribe zsocket_set_subscribe
|
205
|
+
#define zsockopt_set_unsubscribe zsocket_set_unsubscribe
|
206
|
+
#define zsockopt_identity zsocket_identity
|
207
|
+
#define zsockopt_set_identity zsocket_set_identity
|
208
|
+
#define zsockopt_rate zsocket_rate
|
209
|
+
#define zsockopt_set_rate zsocket_set_rate
|
210
|
+
#define zsockopt_recovery_ivl zsocket_recovery_ivl
|
211
|
+
#define zsockopt_set_recovery_ivl zsocket_set_recovery_ivl
|
212
|
+
#define zsockopt_sndbuf zsocket_sndbuf
|
213
|
+
#define zsockopt_set_sndbuf zsocket_set_sndbuf
|
214
|
+
#define zsockopt_rcvbuf zsocket_rcvbuf
|
215
|
+
#define zsockopt_set_rcvbuf zsocket_set_rcvbuf
|
216
|
+
#define zsockopt_linger zsocket_linger
|
217
|
+
#define zsockopt_set_linger zsocket_set_linger
|
218
|
+
#define zsockopt_reconnect_ivl zsocket_reconnect_ivl
|
219
|
+
#define zsockopt_set_reconnect_ivl zsocket_set_reconnect_ivl
|
220
|
+
#define zsockopt_reconnect_ivl_max zsocket_reconnect_ivl_max
|
221
|
+
#define zsockopt_set_reconnect_ivl_max zsocket_set_reconnect_ivl_max
|
222
|
+
#define zsockopt_backlog zsocket_backlog
|
223
|
+
#define zsockopt_set_backlog zsocket_set_backlog
|
224
|
+
#define zsockopt_maxmsgsize zsocket_maxmsgsize
|
225
|
+
#define zsockopt_set_maxmsgsize zsocket_set_maxmsgsize
|
226
|
+
#define zsockopt_multicast_hops zsocket_multicast_hops
|
227
|
+
#define zsockopt_set_multicast_hops zsocket_set_multicast_hops
|
228
|
+
#define zsockopt_rcvtimeo zsocket_rcvtimeo
|
229
|
+
#define zsockopt_set_rcvtimeo zsocket_set_rcvtimeo
|
230
|
+
#define zsockopt_sndtimeo zsocket_sndtimeo
|
231
|
+
#define zsockopt_set_sndtimeo zsocket_set_sndtimeo
|
232
|
+
#define zsockopt_ipv4only zsocket_ipv4only
|
233
|
+
#define zsockopt_set_ipv4only zsocket_set_ipv4only
|
234
|
+
#define zsockopt_set_delay_attach_on_connect zsocket_set_delay_attach_on_connect
|
235
|
+
#define zsockopt_set_router_mandatory zsocket_set_router_mandatory
|
236
|
+
#define zsockopt_set_router_raw zsocket_set_router_raw
|
237
|
+
#define zsockopt_set_xpub_verbose zsocket_set_xpub_verbose
|
238
|
+
#define zsockopt_rcvmore zsocket_rcvmore
|
239
|
+
#define zsockopt_fd zsocket_fd
|
240
|
+
#define zsockopt_events zsocket_events
|
241
|
+
#define zsockopt_last_endpoint zsocket_last_endpoint
|
242
|
+
#endif
|
243
|
+
|
244
|
+
|
245
|
+
#ifdef __cplusplus
|
246
|
+
}
|
247
|
+
#endif
|
248
|
+
|
249
|
+
#endif
|
@@ -0,0 +1,69 @@
|
|
1
|
+
/* =========================================================================
|
2
|
+
zstr - sending and receiving strings
|
3
|
+
|
4
|
+
-------------------------------------------------------------------------
|
5
|
+
Copyright (c) 1991-2013 iMatix Corporation <www.imatix.com>
|
6
|
+
Copyright other contributors as noted in the AUTHORS file.
|
7
|
+
|
8
|
+
This file is part of CZMQ, the high-level C binding for 0MQ:
|
9
|
+
http://czmq.zeromq.org.
|
10
|
+
|
11
|
+
This is free software; you can redistribute it and/or modify it under
|
12
|
+
the terms of the GNU Lesser General Public License as published by the
|
13
|
+
Free Software Foundation; either version 3 of the License, or (at your
|
14
|
+
option) any later version.
|
15
|
+
|
16
|
+
This software is distributed in the hope that it will be useful, but
|
17
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL-
|
18
|
+
ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
19
|
+
Public License for more details.
|
20
|
+
|
21
|
+
You should have received a copy of the GNU Lesser General Public License
|
22
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
23
|
+
=========================================================================
|
24
|
+
*/
|
25
|
+
|
26
|
+
#ifndef __ZSTR_H_INCLUDED__
|
27
|
+
#define __ZSTR_H_INCLUDED__
|
28
|
+
|
29
|
+
#ifdef __cplusplus
|
30
|
+
extern "C" {
|
31
|
+
#endif
|
32
|
+
|
33
|
+
// @interface
|
34
|
+
// Receive a string off a socket, caller must free it
|
35
|
+
CZMQ_EXPORT char *
|
36
|
+
zstr_recv (void *socket);
|
37
|
+
|
38
|
+
// Receive a string off a socket if socket had input waiting
|
39
|
+
CZMQ_EXPORT char *
|
40
|
+
zstr_recv_nowait (void *socket);
|
41
|
+
|
42
|
+
// Send a formatted string to a socket
|
43
|
+
CZMQ_EXPORT int
|
44
|
+
zstr_send (void *socket, const char *format, ...);
|
45
|
+
|
46
|
+
// Send a formatted string to a socket, with MORE flag
|
47
|
+
CZMQ_EXPORT int
|
48
|
+
zstr_sendm (void *socket, const char *format, ...);
|
49
|
+
|
50
|
+
// Self test of this class
|
51
|
+
CZMQ_EXPORT int
|
52
|
+
zstr_test (bool verbose);
|
53
|
+
// @end
|
54
|
+
|
55
|
+
// Deprecated methods
|
56
|
+
// -----------------------------------------------------------
|
57
|
+
// Send a formatted string to a socket
|
58
|
+
CZMQ_EXPORT int
|
59
|
+
zstr_sendf (void *socket, const char *format, ...);
|
60
|
+
|
61
|
+
// Send formatted C string to socket with MORE flag
|
62
|
+
CZMQ_EXPORT int
|
63
|
+
zstr_sendfm (void *socket, const char *format, ...);
|
64
|
+
|
65
|
+
#ifdef __cplusplus
|
66
|
+
}
|
67
|
+
#endif
|
68
|
+
|
69
|
+
#endif
|