rbczmq 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitmodules +1 -1
- data/CHANGELOG.rdoc +4 -0
- data/Gemfile.lock +1 -1
- data/README.rdoc +5 -4
- data/ext/czmq/.gitignore +5 -0
- data/ext/czmq/.travis.yml +10 -1
- data/ext/czmq/AUTHORS +2 -0
- data/ext/czmq/COPYING.LESSER +3 -0
- data/ext/czmq/Makefile.am +13 -3
- data/ext/czmq/NEWS +132 -0
- data/ext/czmq/README.md +1553 -615
- data/ext/czmq/README.txt +188 -72
- data/ext/czmq/addons/Makefile.am +9 -0
- data/ext/czmq/addons/makecert.c +72 -0
- data/ext/czmq/builds/mingw32/Makefile.mingw32 +11 -3
- data/ext/czmq/builds/msvc/.gitignore +4 -1
- data/ext/czmq/builds/msvc/czmq.vcproj +4 -0
- data/ext/czmq/builds/msvc/czmq.vcxproj +6 -1
- data/ext/czmq/builds/msvc/czmq.vcxproj.filters +4 -1
- data/ext/{zeromq/cmake/Modules/zmq_version.cpp → czmq/builds/msvc/platform.h} +10 -9
- data/ext/czmq/configure.ac +64 -5
- data/ext/czmq/doc/Makefile.am +8 -1
- data/ext/czmq/doc/mkmans +17 -0
- data/ext/czmq/doc/zauth.txt +191 -0
- data/ext/czmq/doc/zbeacon.txt +13 -22
- data/ext/czmq/doc/zcert.txt +122 -0
- data/ext/czmq/doc/zcertstore.txt +107 -0
- data/ext/czmq/doc/zchunk.txt +77 -0
- data/ext/czmq/doc/zclock.txt +8 -0
- data/ext/czmq/doc/zconfig.txt +9 -63
- data/ext/czmq/doc/zctx.txt +26 -7
- data/ext/czmq/doc/zdir.txt +83 -0
- data/ext/czmq/doc/zfile.txt +130 -35
- data/ext/czmq/doc/zframe.txt +6 -39
- data/ext/czmq/doc/zhash.txt +55 -10
- data/ext/czmq/doc/zlist.txt +2 -4
- data/ext/czmq/doc/zloop.txt +7 -1
- data/ext/czmq/doc/zmsg.txt +75 -32
- data/ext/czmq/doc/zpoller.txt +88 -0
- data/ext/czmq/doc/zsocket.txt +50 -1
- data/ext/czmq/doc/zsockopt.txt +185 -251
- data/ext/czmq/doc/zstr.txt +14 -3
- data/ext/czmq/doc/zsys.txt +89 -1
- data/ext/czmq/doc/ztree.txt +21 -11
- data/ext/czmq/examples/security/LICENSE +18 -0
- data/ext/czmq/examples/security/README.txt +9 -0
- data/ext/czmq/examples/security/grasslands.c +29 -0
- data/ext/czmq/examples/security/hello.c +10 -0
- data/ext/czmq/examples/security/ironhouse.c +55 -0
- data/ext/czmq/examples/security/ironhouse2.c +103 -0
- data/ext/czmq/examples/security/stonehouse.c +51 -0
- data/ext/czmq/examples/security/strawhouse.c +44 -0
- data/ext/czmq/examples/security/woodhouse.c +40 -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 +10 -4
- data/ext/czmq/include/czmq_prelude.h +42 -42
- data/ext/czmq/include/zauth.h +97 -0
- data/ext/czmq/include/zbeacon.h +0 -5
- data/ext/czmq/include/zcert.h +118 -0
- data/ext/czmq/include/zcertstore.h +78 -0
- data/ext/czmq/include/zchunk.h +87 -0
- data/ext/czmq/include/zclock.h +4 -0
- data/ext/czmq/include/zconfig.h +21 -12
- data/ext/czmq/include/zctx.h +34 -11
- data/ext/czmq/include/zdir.h +90 -0
- data/ext/czmq/include/zfile.h +104 -25
- data/ext/czmq/include/zframe.h +7 -20
- data/ext/czmq/include/zhash.h +13 -0
- data/ext/czmq/include/zlist.h +0 -4
- data/ext/czmq/include/zloop.h +5 -5
- data/ext/czmq/include/zmsg.h +59 -29
- data/ext/czmq/include/zmutex.h +5 -0
- data/ext/czmq/include/zpoller.h +72 -0
- data/ext/czmq/include/zsocket.h +12 -15
- data/ext/czmq/include/zsockopt.h +124 -121
- data/ext/czmq/include/zstr.h +12 -9
- data/ext/czmq/include/zsys.h +50 -2
- data/ext/czmq/mkdoc +1 -1
- data/ext/czmq/model/sockopts.xml +101 -21
- data/ext/czmq/scripts/sockopts.gsl +95 -41
- data/ext/czmq/src/Makefile.am +13 -0
- data/ext/czmq/src/czmq_selftest.c +16 -10
- data/ext/czmq/src/selftest +2 -2
- data/ext/czmq/src/zauth.c +714 -0
- data/ext/czmq/src/zbeacon.c +27 -35
- data/ext/czmq/src/zcert.c +463 -0
- data/ext/czmq/src/zcertstore.c +265 -0
- data/ext/czmq/src/zchunk.c +207 -0
- data/ext/czmq/src/zclock.c +18 -0
- data/ext/czmq/src/zconfig.c +116 -99
- data/ext/czmq/src/zctx.c +103 -18
- data/ext/czmq/src/zdir.c +409 -0
- data/ext/czmq/src/zfile.c +421 -130
- data/ext/czmq/src/zframe.c +28 -127
- data/ext/czmq/src/zhash.c +255 -139
- data/ext/czmq/src/zlist.c +2 -8
- data/ext/czmq/src/zloop.c +40 -13
- data/ext/czmq/src/zmsg.c +109 -141
- data/ext/czmq/src/zmutex.c +27 -1
- data/ext/czmq/src/zpoller.c +218 -0
- data/ext/czmq/src/zsocket.c +53 -66
- data/ext/czmq/src/zsockopt.c +2337 -682
- data/ext/czmq/src/zstr.c +48 -118
- data/ext/czmq/src/zsys.c +270 -3
- data/ext/czmq/src/zthread.c +2 -2
- data/ext/czmq/src/ztree.c +179 -180
- data/ext/rbczmq/beacon.c +1 -1
- data/ext/rbczmq/context.c +12 -3
- data/ext/rbczmq/context.h +7 -0
- data/ext/rbczmq/extconf.rb +13 -4
- data/ext/rbczmq/pollitem.c +1 -1
- data/ext/rbczmq/socket.c +34 -24
- data/ext/rbczmq/socket.h +3 -2
- data/ext/zeromq/AUTHORS +17 -3
- data/ext/zeromq/CMakeLists.txt +742 -339
- data/ext/zeromq/COPYING.LESSER +2 -0
- data/ext/zeromq/Makefile.am +3 -3
- data/ext/zeromq/NEWS +130 -1
- data/ext/zeromq/{README → README.md} +8 -9
- data/ext/zeromq/builds/cmake/Modules/FindAsciiDoc.cmake +24 -0
- data/ext/zeromq/builds/cmake/Modules/TestZMQVersion.cmake +18 -0
- data/ext/zeromq/builds/cmake/Modules/ZMQSourceRunChecks.cmake +129 -0
- data/ext/zeromq/{cmake → builds/cmake}/NSIS.template32.in +1 -1
- data/ext/zeromq/{cmake → builds/cmake}/NSIS.template64.in +1 -1
- data/ext/zeromq/builds/cmake/platform.hpp.in +88 -0
- data/ext/zeromq/builds/mingw32/Makefile.mingw32 +47 -0
- data/ext/zeromq/{src/i_msg_sink.hpp → builds/mingw32/platform.hpp} +10 -21
- data/ext/zeromq/builds/msvc/Makefile.am +5 -2
- data/ext/zeromq/builds/msvc/c_local_lat/c_local_lat.vcxproj +1 -1
- data/ext/zeromq/builds/msvc/c_local_lat/c_local_lat11.vcxproj +91 -0
- data/ext/zeromq/builds/msvc/c_local_thr/c_local_thr.vcproj +2 -0
- data/ext/zeromq/builds/msvc/c_local_thr/c_local_thr.vcxproj +21 -1
- data/ext/zeromq/builds/msvc/c_local_thr/c_local_thr11.vcxproj +111 -0
- data/ext/zeromq/builds/msvc/c_remote_lat/c_remote_lat.vcxproj +1 -1
- data/ext/zeromq/builds/msvc/c_remote_lat/c_remote_lat11.vcxproj +91 -0
- data/ext/zeromq/builds/msvc/c_remote_thr/c_remote_thr.vcproj +2 -0
- data/ext/zeromq/builds/msvc/c_remote_thr/c_remote_thr.vcxproj +21 -1
- data/ext/zeromq/builds/msvc/c_remote_thr/c_remote_thr11.vcxproj +111 -0
- data/ext/zeromq/builds/msvc/errno.cpp +1 -1
- data/ext/zeromq/builds/msvc/errno.hpp +1 -1
- data/ext/zeromq/builds/msvc/inproc_lat/inproc_lat.vcproj +176 -174
- data/ext/zeromq/builds/msvc/inproc_lat/inproc_lat.vcxproj +21 -1
- data/ext/zeromq/builds/msvc/inproc_lat/inproc_lat11.vcxproj +110 -0
- data/ext/zeromq/builds/msvc/inproc_thr/inproc_thr.vcproj +176 -174
- data/ext/zeromq/builds/msvc/inproc_thr/inproc_thr.vcxproj +21 -1
- data/ext/zeromq/builds/msvc/inproc_thr/inproc_thr11.vcxproj +110 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcproj +997 -804
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcxproj +78 -2
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcxproj.filters +42 -6
- data/ext/zeromq/builds/msvc/libzmq/libzmq11.vcxproj +362 -0
- data/ext/zeromq/builds/msvc/msvc.sln +6 -0
- data/ext/zeromq/builds/msvc/msvc10.sln +36 -2
- data/ext/zeromq/builds/msvc/msvc11.sln +150 -0
- data/ext/zeromq/builds/msvc/properties/Static.props +15 -0
- data/ext/zeromq/builds/msvc/properties/ZeroMQ.props +0 -1
- data/ext/zeromq/builds/msvc/properties/ZeroMQ_Static.props +23 -0
- data/ext/zeromq/builds/redhat/zeromq.spec.in +2 -1
- data/ext/zeromq/{configure.in → configure.ac} +74 -15
- data/ext/zeromq/doc/Makefile.am +6 -4
- data/ext/zeromq/doc/zmq.txt +30 -3
- data/ext/zeromq/doc/zmq_bind.txt +2 -2
- data/ext/zeromq/doc/zmq_close.txt +2 -2
- data/ext/zeromq/doc/zmq_connect.txt +9 -7
- data/ext/zeromq/doc/zmq_ctx_destroy.txt +4 -3
- data/ext/zeromq/doc/zmq_ctx_get.txt +8 -3
- data/ext/zeromq/doc/zmq_ctx_new.txt +3 -2
- data/ext/zeromq/doc/zmq_ctx_set.txt +13 -1
- data/ext/zeromq/doc/zmq_ctx_shutdown.txt +52 -0
- data/ext/zeromq/doc/zmq_ctx_term.txt +67 -0
- data/ext/zeromq/doc/zmq_curve.txt +92 -0
- data/ext/zeromq/doc/zmq_curve_keypair.txt +56 -0
- data/ext/zeromq/doc/zmq_disconnect.txt +2 -2
- data/ext/zeromq/doc/zmq_epgm.txt +5 -4
- data/ext/zeromq/doc/zmq_errno.txt +2 -2
- data/ext/zeromq/doc/zmq_getsockopt.txt +149 -24
- data/ext/zeromq/doc/zmq_init.txt +2 -2
- data/ext/zeromq/doc/zmq_inproc.txt +2 -2
- data/ext/zeromq/doc/zmq_ipc.txt +10 -5
- data/ext/zeromq/doc/zmq_msg_close.txt +4 -3
- data/ext/zeromq/doc/zmq_msg_copy.txt +2 -2
- data/ext/zeromq/doc/zmq_msg_data.txt +2 -2
- data/ext/zeromq/doc/zmq_msg_get.txt +3 -3
- data/ext/zeromq/doc/zmq_msg_init.txt +2 -2
- data/ext/zeromq/doc/zmq_msg_init_data.txt +2 -2
- data/ext/zeromq/doc/zmq_msg_init_size.txt +2 -2
- data/ext/zeromq/doc/zmq_msg_more.txt +6 -4
- data/ext/zeromq/doc/zmq_msg_move.txt +2 -2
- data/ext/zeromq/doc/zmq_msg_recv.txt +3 -4
- data/ext/zeromq/doc/zmq_msg_send.txt +10 -7
- data/ext/zeromq/doc/zmq_msg_set.txt +2 -1
- data/ext/zeromq/doc/zmq_msg_size.txt +2 -2
- data/ext/zeromq/doc/zmq_null.txt +27 -0
- data/ext/zeromq/doc/zmq_pgm.txt +5 -4
- data/ext/zeromq/doc/zmq_plain.txt +37 -0
- data/ext/zeromq/doc/zmq_poll.txt +2 -6
- data/ext/zeromq/doc/zmq_proxy.txt +2 -1
- data/ext/zeromq/doc/zmq_recv.txt +2 -5
- data/ext/zeromq/doc/zmq_recvmsg.txt +3 -5
- data/ext/zeromq/doc/zmq_send.txt +9 -7
- data/ext/zeromq/doc/zmq_send_const.txt +103 -0
- data/ext/zeromq/doc/zmq_sendmsg.txt +8 -8
- data/ext/zeromq/doc/zmq_setsockopt.txt +291 -37
- data/ext/zeromq/doc/zmq_socket.txt +92 -21
- data/ext/zeromq/doc/zmq_socket_monitor.txt +102 -131
- data/ext/zeromq/doc/zmq_strerror.txt +3 -2
- data/ext/zeromq/doc/zmq_tcp.txt +4 -2
- data/ext/zeromq/doc/zmq_term.txt +3 -3
- data/ext/zeromq/doc/zmq_unbind.txt +2 -2
- data/ext/zeromq/doc/zmq_version.txt +3 -2
- data/ext/zeromq/doc/zmq_z85_decode.txt +50 -0
- data/ext/zeromq/doc/zmq_z85_encode.txt +57 -0
- data/ext/zeromq/foreign/openpgm/libpgm-5.2.122~dfsg.tar.gz +0 -0
- data/ext/zeromq/include/zmq.h +179 -136
- data/ext/zeromq/include/zmq_utils.h +44 -3
- data/ext/zeromq/perf/inproc_lat.cpp +2 -4
- data/ext/zeromq/perf/inproc_thr.cpp +1 -1
- data/ext/zeromq/perf/local_lat.cpp +1 -3
- data/ext/zeromq/perf/local_thr.cpp +1 -3
- data/ext/zeromq/perf/remote_lat.cpp +1 -3
- data/ext/zeromq/perf/remote_thr.cpp +1 -8
- data/ext/zeromq/src/Makefile.am +26 -7
- data/ext/zeromq/src/address.cpp +7 -8
- data/ext/zeromq/src/address.hpp +1 -2
- data/ext/zeromq/src/array.hpp +1 -3
- data/ext/zeromq/src/atomic_counter.hpp +11 -3
- data/ext/zeromq/src/atomic_ptr.hpp +9 -3
- data/ext/zeromq/src/blob.hpp +2 -2
- data/ext/zeromq/src/clock.cpp +3 -4
- data/ext/zeromq/src/clock.hpp +1 -2
- data/ext/zeromq/src/command.hpp +2 -3
- data/ext/zeromq/src/config.hpp +1 -3
- data/ext/zeromq/src/ctx.cpp +154 -15
- data/ext/zeromq/src/ctx.hpp +34 -3
- data/ext/zeromq/src/curve_client.cpp +410 -0
- data/ext/zeromq/src/curve_client.hpp +109 -0
- data/ext/zeromq/src/curve_server.cpp +629 -0
- data/ext/zeromq/src/curve_server.hpp +120 -0
- data/ext/zeromq/src/dbuffer.hpp +134 -0
- data/ext/zeromq/src/dealer.cpp +52 -60
- data/ext/zeromq/src/dealer.hpp +12 -26
- data/ext/zeromq/src/decoder.hpp +27 -102
- data/ext/zeromq/src/devpoll.cpp +1 -3
- data/ext/zeromq/src/devpoll.hpp +1 -3
- data/ext/zeromq/src/dist.cpp +17 -15
- data/ext/zeromq/src/dist.hpp +5 -6
- data/ext/zeromq/src/encoder.hpp +32 -52
- data/ext/zeromq/src/epoll.cpp +1 -3
- data/ext/zeromq/src/epoll.hpp +1 -3
- data/ext/zeromq/src/err.cpp +2 -4
- data/ext/zeromq/src/err.hpp +7 -4
- data/ext/zeromq/src/fd.hpp +1 -2
- data/ext/zeromq/src/fq.cpp +2 -5
- data/ext/zeromq/src/fq.hpp +2 -4
- data/ext/zeromq/src/i_decoder.hpp +11 -9
- data/ext/zeromq/src/i_encoder.hpp +7 -11
- data/ext/zeromq/src/i_engine.hpp +3 -3
- data/ext/zeromq/src/i_poll_events.hpp +1 -3
- data/ext/zeromq/src/io_object.cpp +1 -3
- data/ext/zeromq/src/io_object.hpp +1 -3
- data/ext/zeromq/src/io_thread.cpp +1 -3
- data/ext/zeromq/src/io_thread.hpp +1 -3
- data/ext/zeromq/src/ip.cpp +46 -5
- data/ext/zeromq/src/ip.hpp +7 -4
- data/ext/zeromq/src/ipc_address.cpp +13 -2
- data/ext/zeromq/src/ipc_address.hpp +1 -2
- data/ext/zeromq/src/ipc_connecter.cpp +3 -3
- data/ext/zeromq/src/ipc_connecter.hpp +1 -2
- data/ext/zeromq/src/ipc_listener.cpp +15 -10
- data/ext/zeromq/src/ipc_listener.hpp +1 -2
- data/ext/zeromq/src/kqueue.cpp +11 -3
- data/ext/zeromq/src/kqueue.hpp +7 -3
- data/ext/zeromq/src/lb.cpp +13 -11
- data/ext/zeromq/src/lb.hpp +10 -5
- data/ext/zeromq/src/libzmq.pc.cmake.in +10 -0
- data/ext/zeromq/src/likely.hpp +1 -2
- data/ext/zeromq/src/mailbox.cpp +1 -4
- data/ext/zeromq/src/mailbox.hpp +8 -3
- data/ext/zeromq/src/mechanism.cpp +163 -0
- data/ext/zeromq/src/mechanism.hpp +101 -0
- data/ext/zeromq/src/msg.cpp +38 -18
- data/ext/zeromq/src/msg.hpp +19 -7
- data/ext/zeromq/src/mtrie.cpp +16 -14
- data/ext/zeromq/src/mtrie.hpp +1 -3
- data/ext/zeromq/src/mutex.hpp +42 -3
- data/ext/zeromq/src/null_mechanism.cpp +282 -0
- data/ext/zeromq/src/null_mechanism.hpp +65 -0
- data/ext/zeromq/src/object.cpp +29 -3
- data/ext/zeromq/src/object.hpp +8 -5
- data/ext/zeromq/src/options.cpp +557 -485
- data/ext/zeromq/src/options.hpp +38 -24
- data/ext/zeromq/src/own.cpp +1 -2
- data/ext/zeromq/src/own.hpp +1 -2
- data/ext/zeromq/src/pair.cpp +8 -25
- data/ext/zeromq/src/pair.hpp +5 -22
- data/ext/zeromq/src/pgm_receiver.cpp +80 -67
- data/ext/zeromq/src/pgm_receiver.hpp +11 -10
- data/ext/zeromq/src/pgm_sender.cpp +37 -16
- data/ext/zeromq/src/pgm_sender.hpp +12 -6
- data/ext/zeromq/src/pgm_socket.cpp +8 -8
- data/ext/zeromq/src/pgm_socket.hpp +1 -4
- data/ext/zeromq/src/pipe.cpp +110 -72
- data/ext/zeromq/src/pipe.hpp +36 -27
- data/ext/zeromq/src/plain_mechanism.cpp +482 -0
- data/ext/zeromq/src/plain_mechanism.hpp +88 -0
- data/ext/zeromq/src/poll.cpp +1 -3
- data/ext/zeromq/src/poll.hpp +1 -3
- data/ext/zeromq/src/poller.hpp +1 -3
- data/ext/zeromq/src/poller_base.cpp +3 -3
- data/ext/zeromq/src/poller_base.hpp +1 -2
- data/ext/zeromq/src/precompiled.cpp +1 -2
- data/ext/zeromq/src/precompiled.hpp +1 -2
- data/ext/zeromq/src/proxy.cpp +1 -2
- data/ext/zeromq/src/proxy.hpp +1 -2
- data/ext/zeromq/src/pub.cpp +2 -16
- data/ext/zeromq/src/pub.hpp +2 -19
- data/ext/zeromq/src/pull.cpp +7 -24
- data/ext/zeromq/src/pull.hpp +4 -21
- data/ext/zeromq/src/push.cpp +8 -22
- data/ext/zeromq/src/push.hpp +4 -21
- data/ext/zeromq/src/random.cpp +1 -2
- data/ext/zeromq/src/random.hpp +1 -2
- data/ext/zeromq/src/raw_decoder.cpp +63 -0
- data/ext/zeromq/src/raw_decoder.hpp +66 -0
- data/ext/zeromq/src/raw_encoder.cpp +40 -0
- data/ext/zeromq/src/raw_encoder.hpp +60 -0
- data/ext/zeromq/src/reaper.cpp +12 -2
- data/ext/zeromq/src/reaper.hpp +6 -2
- data/ext/zeromq/src/rep.cpp +7 -21
- data/ext/zeromq/src/rep.hpp +3 -20
- data/ext/zeromq/src/req.cpp +132 -38
- data/ext/zeromq/src/req.hpp +27 -8
- data/ext/zeromq/src/router.cpp +109 -65
- data/ext/zeromq/src/router.hpp +9 -23
- data/ext/zeromq/src/select.cpp +1 -3
- data/ext/zeromq/src/select.hpp +1 -3
- data/ext/zeromq/src/session_base.cpp +164 -118
- data/ext/zeromq/src/session_base.hpp +29 -22
- data/ext/zeromq/src/signaler.cpp +127 -19
- data/ext/zeromq/src/signaler.hpp +20 -3
- data/ext/zeromq/src/socket_base.cpp +167 -134
- data/ext/zeromq/src/socket_base.hpp +18 -20
- data/ext/zeromq/src/stdint.hpp +1 -2
- data/ext/zeromq/src/stream.cpp +257 -0
- data/ext/zeromq/src/stream.hpp +97 -0
- data/ext/zeromq/src/stream_engine.cpp +405 -157
- data/ext/zeromq/src/stream_engine.hpp +72 -23
- data/ext/zeromq/src/sub.cpp +5 -18
- data/ext/zeromq/src/sub.hpp +2 -19
- data/ext/zeromq/src/tcp.cpp +23 -3
- data/ext/zeromq/src/tcp.hpp +7 -3
- data/ext/zeromq/src/tcp_address.cpp +35 -46
- data/ext/zeromq/src/tcp_address.hpp +7 -12
- data/ext/zeromq/src/tcp_connecter.cpp +10 -5
- data/ext/zeromq/src/tcp_connecter.hpp +1 -3
- data/ext/zeromq/src/tcp_listener.cpp +19 -8
- data/ext/zeromq/src/tcp_listener.hpp +1 -3
- data/ext/zeromq/src/thread.cpp +2 -4
- data/ext/zeromq/src/thread.hpp +1 -3
- data/ext/zeromq/src/trie.cpp +122 -125
- data/ext/zeromq/src/trie.hpp +1 -4
- data/ext/zeromq/src/v1_decoder.cpp +77 -91
- data/ext/zeromq/src/v1_decoder.hpp +10 -21
- data/ext/zeromq/src/v1_encoder.cpp +24 -62
- data/ext/zeromq/src/v1_encoder.hpp +7 -18
- data/ext/zeromq/src/v2_decoder.cpp +142 -0
- data/ext/zeromq/src/v2_decoder.hpp +57 -0
- data/ext/zeromq/src/v2_encoder.cpp +67 -0
- data/ext/zeromq/src/{i_msg_source.hpp → v2_encoder.hpp} +20 -15
- data/ext/zeromq/src/{v1_protocol.hpp → v2_protocol.hpp} +7 -11
- data/ext/zeromq/src/windows.hpp +2 -4
- data/ext/zeromq/src/wire.hpp +5 -6
- data/ext/zeromq/src/xpub.cpp +37 -46
- data/ext/zeromq/src/xpub.hpp +7 -23
- data/ext/zeromq/src/xsub.cpp +26 -40
- data/ext/zeromq/src/xsub.hpp +5 -21
- data/ext/zeromq/src/ypipe.hpp +3 -4
- data/ext/zeromq/src/ypipe_base.hpp +44 -0
- data/ext/zeromq/src/ypipe_conflate.hpp +127 -0
- data/ext/zeromq/src/yqueue.hpp +3 -7
- data/ext/zeromq/src/zmq.cpp +76 -96
- data/ext/zeromq/src/zmq_utils.cpp +146 -8
- data/ext/zeromq/tests/Makefile.am +56 -8
- data/ext/zeromq/tests/test_abstract_ipc.cpp +57 -0
- data/ext/zeromq/tests/test_conflate.cpp +75 -0
- data/ext/zeromq/tests/test_connect_resolve.cpp +14 -15
- data/ext/zeromq/tests/test_ctx_destroy.cpp +90 -0
- data/ext/zeromq/tests/test_ctx_options.cpp +52 -0
- data/ext/zeromq/tests/test_disconnect_inproc.cpp +35 -30
- data/ext/zeromq/tests/test_fork.cpp +81 -0
- data/ext/zeromq/tests/test_hwm.cpp +251 -35
- data/ext/zeromq/tests/test_immediate.cpp +229 -0
- data/ext/zeromq/tests/test_inproc_connect.cpp +339 -0
- data/ext/zeromq/tests/test_invalid_rep.cpp +9 -13
- data/ext/zeromq/tests/test_iov.cpp +106 -0
- data/ext/zeromq/tests/test_issue_566.cpp +85 -0
- data/ext/zeromq/tests/test_last_endpoint.cpp +14 -18
- data/ext/zeromq/tests/test_linger.cpp +93 -0
- data/ext/zeromq/tests/test_monitor.cpp +112 -129
- data/ext/zeromq/tests/test_msg_flags.cpp +17 -16
- data/ext/zeromq/tests/test_pair_inproc.cpp +25 -7
- data/ext/zeromq/tests/test_pair_ipc.cpp +4 -7
- data/ext/zeromq/tests/test_pair_tcp.cpp +4 -8
- data/ext/zeromq/tests/test_probe_router.cpp +72 -0
- data/ext/zeromq/tests/test_req_correlate.cpp +177 -0
- data/ext/zeromq/tests/test_req_relaxed.cpp +116 -0
- data/ext/zeromq/tests/test_reqrep_device.cpp +9 -17
- data/ext/zeromq/tests/test_reqrep_inproc.cpp +4 -7
- data/ext/zeromq/tests/test_reqrep_ipc.cpp +4 -7
- data/ext/zeromq/tests/test_reqrep_tcp.cpp +4 -8
- data/ext/zeromq/tests/test_router_mandatory.cpp +41 -22
- data/ext/zeromq/tests/test_security_curve.cpp +212 -0
- data/ext/zeromq/tests/test_security_null.cpp +148 -0
- data/ext/zeromq/tests/test_security_plain.cpp +150 -0
- data/ext/zeromq/tests/test_shutdown_stress.cpp +10 -23
- data/ext/zeromq/tests/test_spec_dealer.cpp +254 -0
- data/ext/zeromq/tests/test_spec_pushpull.cpp +293 -0
- data/ext/zeromq/tests/test_spec_rep.cpp +155 -0
- data/ext/zeromq/tests/test_spec_req.cpp +253 -0
- data/ext/zeromq/tests/test_spec_router.cpp +204 -0
- data/ext/zeromq/tests/test_stream.cpp +228 -0
- data/ext/zeromq/tests/test_sub_forward.cpp +14 -22
- data/ext/zeromq/tests/test_system.cpp +82 -0
- data/ext/zeromq/tests/test_term_endpoint.cpp +17 -31
- data/ext/zeromq/tests/test_timeo.cpp +34 -78
- data/ext/zeromq/tests/testutil.hpp +211 -26
- data/ext/zeromq/tools/Makefile.am +9 -0
- data/ext/zeromq/tools/curve_keygen.c +58 -0
- data/lib/zmq/version.rb +1 -1
- data/test/test_socket.rb +4 -3
- metadata +114 -15
- data/ext/zeromq/cmake/Modules/TestZMQVersion.cmake +0 -35
- data/ext/zeromq/foreign/openpgm/libpgm-5.1.118~dfsg.tar.gz +0 -0
- data/ext/zeromq/src/decoder.cpp +0 -166
- data/ext/zeromq/src/encoder.cpp +0 -102
- data/ext/zeromq/tests/test_connect_delay.cpp +0 -260
data/ext/zeromq/doc/Makefile.am
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
MAN3 = zmq_bind.3 zmq_unbind.3 zmq_connect.3 zmq_disconnect.3 zmq_close.3 \
|
2
|
-
zmq_ctx_new.3 zmq_ctx_destroy.3 zmq_ctx_get.3 zmq_ctx_set.3 \
|
2
|
+
zmq_ctx_new.3 zmq_ctx_term.3 zmq_ctx_destroy.3 zmq_ctx_get.3 zmq_ctx_set.3 \
|
3
3
|
zmq_msg_init.3 zmq_msg_init_data.3 zmq_msg_init_size.3 \
|
4
4
|
zmq_msg_move.3 zmq_msg_copy.3 zmq_msg_size.3 zmq_msg_data.3 zmq_msg_close.3 \
|
5
5
|
zmq_msg_send.3 zmq_msg_recv.3 \
|
6
|
-
zmq_send.3 zmq_recv.3 \
|
6
|
+
zmq_send.3 zmq_recv.3 zmq_send_const.3 \
|
7
7
|
zmq_msg_get.3 zmq_msg_set.3 zmq_msg_more.3 \
|
8
8
|
zmq_getsockopt.3 zmq_setsockopt.3 \
|
9
9
|
zmq_socket.3 zmq_socket_monitor.3 zmq_poll.3 \
|
10
10
|
zmq_errno.3 zmq_strerror.3 zmq_version.3 zmq_proxy.3 \
|
11
|
-
zmq_sendmsg.3 zmq_recvmsg.3 zmq_init.3 zmq_term.3
|
11
|
+
zmq_sendmsg.3 zmq_recvmsg.3 zmq_init.3 zmq_term.3 \
|
12
|
+
zmq_z85_encode.3 zmq_z85_decode.3 zmq_curve_keypair.3
|
12
13
|
|
13
|
-
MAN7 = zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7
|
14
|
+
MAN7 = zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7 \
|
15
|
+
zmq_null.7 zmq_plain.7 zmq_curve.7
|
14
16
|
|
15
17
|
MAN_DOC = $(MAN1) $(MAN3) $(MAN7)
|
16
18
|
|
data/ext/zeromq/doc/zmq.txt
CHANGED
@@ -42,7 +42,7 @@ Work with context properties::
|
|
42
42
|
linkzmq:zmq_ctx_get[3]
|
43
43
|
|
44
44
|
Destroy a 0MQ context::
|
45
|
-
linkzmq:
|
45
|
+
linkzmq:zmq_ctx_term[3]
|
46
46
|
|
47
47
|
Monitor a 0MQ context::
|
48
48
|
linkzmq:zmq_ctx_set_monitor[3]
|
@@ -140,6 +140,7 @@ Sending and receiving messages::
|
|
140
140
|
linkzmq:zmq_msg_recv[3]
|
141
141
|
linkzmq:zmq_send[3]
|
142
142
|
linkzmq:zmq_recv[3]
|
143
|
+
linkzmq:zmq_send_const[3]
|
143
144
|
|
144
145
|
.Input/output multiplexing
|
145
146
|
0MQ provides a mechanism for applications to multiplex input/output events over
|
@@ -177,6 +178,32 @@ two sockets, opaquely. A proxy may optionally capture all traffic to a third
|
|
177
178
|
socket. To start a proxy in an application thread, use linkzmq:zmq_proxy[3].
|
178
179
|
|
179
180
|
|
181
|
+
Security
|
182
|
+
~~~~~~~~
|
183
|
+
A 0MQ socket can select a security mechanism. Both peers must use the same
|
184
|
+
security mechanism.
|
185
|
+
|
186
|
+
The following security mechanisms are provided for IPC and TCP connections:
|
187
|
+
|
188
|
+
Null security::
|
189
|
+
linkzmq:zmq_null[7]
|
190
|
+
|
191
|
+
Plain-text authentication using username and password::
|
192
|
+
linkzmq:zmq_plain[7]
|
193
|
+
|
194
|
+
Elliptic curve authentication and encryption::
|
195
|
+
linkzmq:zmq_curve[7]
|
196
|
+
|
197
|
+
Generate a CURVE keypair in armored text format:
|
198
|
+
linkzmq:zmq_curve_keypair[3]
|
199
|
+
|
200
|
+
Convert an armored key into a 32-byte binary key:
|
201
|
+
linkzmq:zmq_z85_decode[3]
|
202
|
+
|
203
|
+
Convert a 32-byte binary CURVE key to an armored text string:
|
204
|
+
linkzmq:zmq_z85_encode[3]
|
205
|
+
|
206
|
+
|
180
207
|
ERROR HANDLING
|
181
208
|
--------------
|
182
209
|
The 0MQ library functions handle errors using the standard conventions found on
|
@@ -215,8 +242,8 @@ members of the 0MQ community and pointers can be found on the 0MQ website.
|
|
215
242
|
|
216
243
|
AUTHORS
|
217
244
|
-------
|
218
|
-
This
|
219
|
-
|
245
|
+
This page was written by the 0MQ community. To make a change please
|
246
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
220
247
|
|
221
248
|
|
222
249
|
RESOURCES
|
data/ext/zeromq/doc/zmq_bind.txt
CHANGED
@@ -98,5 +98,5 @@ linkzmq:zmq[7]
|
|
98
98
|
|
99
99
|
AUTHORS
|
100
100
|
-------
|
101
|
-
This
|
102
|
-
|
101
|
+
This page was written by the 0MQ community. To make a change please
|
102
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -48,5 +48,5 @@ linkzmq:zmq[7]
|
|
48
48
|
|
49
49
|
AUTHORS
|
50
50
|
-------
|
51
|
-
This
|
52
|
-
|
51
|
+
This page was written by the 0MQ community. To make a change please
|
52
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -41,11 +41,13 @@ matter. The first exception is when using the inproc:// transport: you must
|
|
41
41
|
call _zmq_bind()_ before calling _zmq_connect()_. The second exception are
|
42
42
|
_ZMQ_PAIR_ sockets, which do not automatically reconnect to endpoints.
|
43
43
|
|
44
|
-
NOTE: following a _zmq_connect()_,
|
45
|
-
|
46
|
-
|
47
|
-
defined in
|
48
|
-
|
44
|
+
NOTE: following a _zmq_connect()_, for socket types except for ZMQ_ROUTER,
|
45
|
+
the socket enters its normal 'ready' state. By contrast, following a
|
46
|
+
_zmq_bind()_ alone, the socket enters a 'mute' state in which the socket
|
47
|
+
blocks or drops messages according to the socket type, as defined in
|
48
|
+
linkzmq:zmq_socket[3]. A ZMQ_ROUTER socket enters its normal 'ready' state
|
49
|
+
for a specific peer only when handshaking is complete for that peer, which
|
50
|
+
may take an arbitrary time.
|
49
51
|
|
50
52
|
RETURN VALUE
|
51
53
|
------------
|
@@ -94,5 +96,5 @@ linkzmq:zmq[7]
|
|
94
96
|
|
95
97
|
AUTHORS
|
96
98
|
-------
|
97
|
-
This
|
98
|
-
|
99
|
+
This page was written by the 0MQ community. To make a change please
|
100
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -4,7 +4,7 @@ zmq_ctx_destroy(3)
|
|
4
4
|
|
5
5
|
NAME
|
6
6
|
----
|
7
|
-
zmq_ctx_destroy -
|
7
|
+
zmq_ctx_destroy - terminate a 0MQ context
|
8
8
|
|
9
9
|
|
10
10
|
SYNOPSIS
|
@@ -36,7 +36,7 @@ Context termination is performed in the following steps:
|
|
36
36
|
For further details regarding socket linger behavior refer to the _ZMQ_LINGER_
|
37
37
|
option in linkzmq:zmq_setsockopt[3].
|
38
38
|
|
39
|
-
This function
|
39
|
+
This function is deprecated by linkzmq:zmq_ctx_term[3].
|
40
40
|
|
41
41
|
|
42
42
|
RETURN VALUE
|
@@ -63,4 +63,5 @@ linkzmq:zmq_setsockopt[3]
|
|
63
63
|
|
64
64
|
AUTHORS
|
65
65
|
-------
|
66
|
-
This
|
66
|
+
This page was written by the 0MQ community. To make a change please
|
67
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -26,11 +26,15 @@ ZMQ_IO_THREADS: Get number of I/O threads
|
|
26
26
|
The 'ZMQ_IO_THREADS' argument returns the size of the 0MQ thread pool
|
27
27
|
for this context.
|
28
28
|
|
29
|
-
ZMQ_MAX_SOCKETS:
|
29
|
+
ZMQ_MAX_SOCKETS: Get maximum number of sockets
|
30
30
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
31
31
|
The 'ZMQ_MAX_SOCKETS' argument returns the maximum number of sockets
|
32
32
|
allowed for this context.
|
33
33
|
|
34
|
+
ZMQ_IPV6: Set IPv6 option
|
35
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~
|
36
|
+
The 'ZMQ_IPV6' argument returns the IPv6 option for the context.
|
37
|
+
|
34
38
|
|
35
39
|
RETURN VALUE
|
36
40
|
------------
|
@@ -50,7 +54,7 @@ EXAMPLE
|
|
50
54
|
.Setting a limit on the number of sockets
|
51
55
|
----
|
52
56
|
void *context = zmq_ctx_new ();
|
53
|
-
|
57
|
+
zmq_ctx_set (context, ZMQ_MAX_SOCKETS, 256);
|
54
58
|
int max_sockets = zmq_ctx_get (context, ZMQ_MAX_SOCKETS);
|
55
59
|
assert (max_sockets == 256);
|
56
60
|
----
|
@@ -64,4 +68,5 @@ linkzmq:zmq[7]
|
|
64
68
|
|
65
69
|
AUTHORS
|
66
70
|
-------
|
67
|
-
This
|
71
|
+
This page was written by the 0MQ community. To make a change please
|
72
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -41,9 +41,10 @@ SEE ALSO
|
|
41
41
|
linkzmq:zmq[7]
|
42
42
|
linkzmq:zmq_ctx_set[3]
|
43
43
|
linkzmq:zmq_ctx_get[3]
|
44
|
-
linkzmq:
|
44
|
+
linkzmq:zmq_ctx_term[3]
|
45
45
|
|
46
46
|
|
47
47
|
AUTHORS
|
48
48
|
-------
|
49
|
-
This
|
49
|
+
This page was written by the 0MQ community. To make a change please
|
50
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -40,6 +40,17 @@ on the context.
|
|
40
40
|
[horizontal]
|
41
41
|
Default value:: 1024
|
42
42
|
|
43
|
+
ZMQ_IPV6: Set IPv6 option
|
44
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~
|
45
|
+
The 'ZMQ_IPV6' argument sets the IPv6 value for all sockets created in
|
46
|
+
the context from this point onwards. A value of `1` means IPv6 is
|
47
|
+
enabled, while `0` means the socket will use only IPv4. When IPv6 is
|
48
|
+
enabled, a socket will connect to, or accept connections from, both
|
49
|
+
IPv4 and IPv6 hosts.
|
50
|
+
|
51
|
+
[horizontal]
|
52
|
+
Default value:: 0
|
53
|
+
|
43
54
|
|
44
55
|
RETURN VALUE
|
45
56
|
------------
|
@@ -72,4 +83,5 @@ linkzmq:zmq[7]
|
|
72
83
|
|
73
84
|
AUTHORS
|
74
85
|
-------
|
75
|
-
This
|
86
|
+
This page was written by the 0MQ community. To make a change please
|
87
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -0,0 +1,52 @@
|
|
1
|
+
zmq_ctx_shutdown(3)
|
2
|
+
==================
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_ctx_shutdown - shutdown a 0MQ context
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
*int zmq_ctx_shutdown (void '*context');*
|
13
|
+
|
14
|
+
|
15
|
+
DESCRIPTION
|
16
|
+
-----------
|
17
|
+
The _zmq_ctx_shutdown()_ function shall shutdown the 0MQ context 'context'.
|
18
|
+
|
19
|
+
Context shutdown will cause any blocking operations currently in progress on
|
20
|
+
sockets open within 'context' to return immediately with an error code of ETERM.
|
21
|
+
With the exception of _zmq_close()_, any further operations on sockets open within
|
22
|
+
'context' shall fail with an error code of ETERM.
|
23
|
+
|
24
|
+
This function is optional, client code is still required to call the linkzmq:zmq_ctx_term[3]
|
25
|
+
function to free all resources allocated by zeromq.
|
26
|
+
|
27
|
+
|
28
|
+
RETURN VALUE
|
29
|
+
------------
|
30
|
+
The _zmq_ctx_shutdown()_ function shall return zero if successful. Otherwise
|
31
|
+
it shall return `-1` and set 'errno' to one of the values defined below.
|
32
|
+
|
33
|
+
|
34
|
+
ERRORS
|
35
|
+
------
|
36
|
+
*EFAULT*::
|
37
|
+
The provided 'context' was invalid.
|
38
|
+
|
39
|
+
|
40
|
+
SEE ALSO
|
41
|
+
--------
|
42
|
+
linkzmq:zmq[7]
|
43
|
+
linkzmq:zmq_init[3]
|
44
|
+
linkzmq:zmq_ctx_term[3]
|
45
|
+
linkzmq:zmq_close[3]
|
46
|
+
linkzmq:zmq_setsockopt[3]
|
47
|
+
|
48
|
+
|
49
|
+
AUTHORS
|
50
|
+
-------
|
51
|
+
This page was written by the 0MQ community. To make a change please
|
52
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -0,0 +1,67 @@
|
|
1
|
+
zmq_ctx_term(3)
|
2
|
+
===============
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_ctx_term - destroy a 0MQ context
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
*int zmq_ctx_term (void '*context');*
|
13
|
+
|
14
|
+
|
15
|
+
DESCRIPTION
|
16
|
+
-----------
|
17
|
+
The _zmq_ctx_term()_ function shall destroy 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_ctx_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 behavior refer to the _ZMQ_LINGER_
|
37
|
+
option in linkzmq:zmq_setsockopt[3].
|
38
|
+
|
39
|
+
This function replaces the deprecated function linkzmq:zmq_term[3].
|
40
|
+
|
41
|
+
|
42
|
+
RETURN VALUE
|
43
|
+
------------
|
44
|
+
The _zmq_ctx_term()_ function shall return zero if successful. Otherwise
|
45
|
+
it shall return `-1` and set 'errno' to one of the values defined below.
|
46
|
+
|
47
|
+
|
48
|
+
ERRORS
|
49
|
+
------
|
50
|
+
*EFAULT*::
|
51
|
+
The provided 'context' was invalid.
|
52
|
+
*EINTR*::
|
53
|
+
Termination was interrupted by a signal. It can be restarted if needed.
|
54
|
+
|
55
|
+
|
56
|
+
SEE ALSO
|
57
|
+
--------
|
58
|
+
linkzmq:zmq[7]
|
59
|
+
linkzmq:zmq_init[3]
|
60
|
+
linkzmq:zmq_close[3]
|
61
|
+
linkzmq:zmq_setsockopt[3]
|
62
|
+
|
63
|
+
|
64
|
+
AUTHORS
|
65
|
+
-------
|
66
|
+
This page was written by the 0MQ community. To make a change please
|
67
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -0,0 +1,92 @@
|
|
1
|
+
zmq_curve(7)
|
2
|
+
============
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_curve - secure authentication and confidentiality
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
The CURVE mechanism defines a mechanism for secure authentication and
|
13
|
+
confidentiality for communications between a client and a server. CURVE
|
14
|
+
is intended for use on public networks. The CURVE mechanism is defined
|
15
|
+
by this document: <http://rfc.zeromq.org/spec:25>.
|
16
|
+
|
17
|
+
|
18
|
+
CLIENT AND SERVER ROLES
|
19
|
+
-----------------------
|
20
|
+
A socket using CURVE can be either client or server, at any moment, but
|
21
|
+
not both. The role is independent of bind/connect direction.
|
22
|
+
|
23
|
+
A socket can change roles at any point by setting new options. The role
|
24
|
+
affects all zmq_connect and zmq_bind calls that follow it.
|
25
|
+
|
26
|
+
To become a CURVE server, the application sets the ZMQ_CURVE_SERVER option
|
27
|
+
on the socket, and then sets the ZMQ_CURVE_SECRETKEY option to provide the
|
28
|
+
socket with its long-term secret key. The application does not provide the
|
29
|
+
socket with its long-term public key, which is used only by clients.
|
30
|
+
|
31
|
+
To become a CURVE client, the application sets the ZMQ_CURVE_SERVERKEY
|
32
|
+
option with the long-term public key of the server it intends to connect
|
33
|
+
to, or accept connections from, next. The application then sets the
|
34
|
+
ZMQ_CURVE_PUBLICKEY and ZMQ_CURVE_SECRETKEY options with its client
|
35
|
+
long-term key pair.
|
36
|
+
|
37
|
+
If the server does authentication it will be based on the client's long
|
38
|
+
term public key.
|
39
|
+
|
40
|
+
KEY ENCODING
|
41
|
+
------------
|
42
|
+
The standard representation for keys in source code is either 32 bytes of
|
43
|
+
base 256 (binary) data, or 40 characters of base 85 data encoded using the
|
44
|
+
Z85 algorithm defined by http://rfc.zeromq.org/spec:32.
|
45
|
+
|
46
|
+
The Z85 algorithm is designed to produce printable key strings for use in
|
47
|
+
configuration files, the command line, and code. There is a reference
|
48
|
+
implementation in C at https://github.com/zeromq/rfc/tree/master/src.
|
49
|
+
|
50
|
+
|
51
|
+
TEST KEY VALUES
|
52
|
+
---------------
|
53
|
+
For test cases, the client shall use this long-term key pair (specified
|
54
|
+
as hexadecimal and in Z85):
|
55
|
+
|
56
|
+
----
|
57
|
+
public:
|
58
|
+
BB88471D65E2659B30C55A5321CEBB5AAB2B70A398645C26DCA2B2FCB43FC518
|
59
|
+
Yne@$w-vo<fVvi]a<NY6T1ed:M$fCG*[IaLV{hID
|
60
|
+
|
61
|
+
secret:
|
62
|
+
7BB864B489AFA3671FBE69101F94B38972F24816DFB01B51656B3FEC8DFD0888
|
63
|
+
D:)Q[IlAW!ahhC2ac:9*A}h:p?([4%wOTJ%JR%cs
|
64
|
+
----
|
65
|
+
|
66
|
+
And the server shall use this long-term key pair (specified as hexadecimal
|
67
|
+
and in Z85):
|
68
|
+
|
69
|
+
----
|
70
|
+
public:
|
71
|
+
54FCBA24E93249969316FB617C872BB0C1D1FF14800427C594CBFACF1BC2D652
|
72
|
+
rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7
|
73
|
+
|
74
|
+
secret:
|
75
|
+
8E0BDD697628B91D8F245587EE95C5B04D48963F79259877B49CD9063AEAD3B7
|
76
|
+
JTKVSB%%)wK0E.X)V>+}o?pNmC{O&4W4b!Ni{Lh6
|
77
|
+
----
|
78
|
+
|
79
|
+
SEE ALSO
|
80
|
+
--------
|
81
|
+
linkzmq:zmq_z85_encode[3]
|
82
|
+
linkzmq:zmq_z85_decode[3]
|
83
|
+
linkzmq:zmq_setsockopt[3]
|
84
|
+
linkzmq:zmq_null[7]
|
85
|
+
linkzmq:zmq_plain[7]
|
86
|
+
linkzmq:zmq[7]
|
87
|
+
|
88
|
+
|
89
|
+
AUTHORS
|
90
|
+
-------
|
91
|
+
This page was written by the 0MQ community. To make a change please
|
92
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|
@@ -0,0 +1,56 @@
|
|
1
|
+
zmq_curve_keypair(3)
|
2
|
+
====================
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
----
|
7
|
+
zmq_curve_keypair - generate a new CURVE keypair
|
8
|
+
|
9
|
+
|
10
|
+
SYNOPSIS
|
11
|
+
--------
|
12
|
+
*int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key);*
|
13
|
+
|
14
|
+
|
15
|
+
DESCRIPTION
|
16
|
+
-----------
|
17
|
+
The _zmq_curve_keypair()_ function shall return a newly generated random
|
18
|
+
keypair consisting of a public key and a secret key. The caller provides
|
19
|
+
two buffers, each at least 41 octets large, in which this method will
|
20
|
+
store the keys. The keys are encoded using linkzmq:zmq_z85_encode[3].
|
21
|
+
|
22
|
+
|
23
|
+
RETURN VALUE
|
24
|
+
------------
|
25
|
+
The _zmq_curve_keypair()_ function shall return 0 if successful, else it
|
26
|
+
shall return `-1` and set 'errno' to one of the values defined below.
|
27
|
+
|
28
|
+
|
29
|
+
ERRORS
|
30
|
+
------
|
31
|
+
*ENOTSUP*::
|
32
|
+
The libzmq library was not built with cryptographic support (libsodium).
|
33
|
+
|
34
|
+
|
35
|
+
EXAMPLE
|
36
|
+
-------
|
37
|
+
.Generating a new CURVE keypair
|
38
|
+
----
|
39
|
+
char public_key [41];
|
40
|
+
char secret_key [41];
|
41
|
+
int rc = crypto_box_keypair (public_key, secret_key);
|
42
|
+
assert (rc == 0);
|
43
|
+
----
|
44
|
+
|
45
|
+
|
46
|
+
SEE ALSO
|
47
|
+
--------
|
48
|
+
linkzmq:zmq_z85_decode[3]
|
49
|
+
linkzmq:zmq_z85_encode[3]
|
50
|
+
linkzmq:zmq_curve[7]
|
51
|
+
|
52
|
+
|
53
|
+
AUTHORS
|
54
|
+
-------
|
55
|
+
This page was written by the 0MQ community. To make a change please
|
56
|
+
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
|