libzmq 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. data/LICENSE +703 -0
  2. data/README.md +31 -0
  3. data/lib/libzmq.rb +17 -0
  4. data/lib/libzmq/ffi-rzmq.rb +3 -0
  5. data/libzmq/Makefile +5 -0
  6. data/libzmq/extconf.rb +24 -0
  7. data/libzmq/zeromq-2.1.7/AUTHORS +92 -0
  8. data/libzmq/zeromq-2.1.7/COPYING +674 -0
  9. data/libzmq/zeromq-2.1.7/COPYING.LESSER +206 -0
  10. data/libzmq/zeromq-2.1.7/ChangeLog +15620 -0
  11. data/libzmq/zeromq-2.1.7/INSTALL +237 -0
  12. data/libzmq/zeromq-2.1.7/MAINTAINERS +56 -0
  13. data/libzmq/zeromq-2.1.7/Makefile.am +42 -0
  14. data/libzmq/zeromq-2.1.7/Makefile.in +779 -0
  15. data/libzmq/zeromq-2.1.7/NEWS +275 -0
  16. data/libzmq/zeromq-2.1.7/README +39 -0
  17. data/libzmq/zeromq-2.1.7/acinclude.m4 +582 -0
  18. data/libzmq/zeromq-2.1.7/aclocal.m4 +1206 -0
  19. data/libzmq/zeromq-2.1.7/autogen.sh +45 -0
  20. data/libzmq/zeromq-2.1.7/builds/msvc/Makefile.am +8 -0
  21. data/libzmq/zeromq-2.1.7/builds/msvc/Makefile.in +390 -0
  22. data/libzmq/zeromq-2.1.7/builds/msvc/c_local_lat/c_local_lat.vcproj +176 -0
  23. data/libzmq/zeromq-2.1.7/builds/msvc/c_local_thr/c_local_thr.vcproj +176 -0
  24. data/libzmq/zeromq-2.1.7/builds/msvc/c_remote_lat/c_remote_lat.vcproj +176 -0
  25. data/libzmq/zeromq-2.1.7/builds/msvc/c_remote_thr/c_remote_thr.vcproj +176 -0
  26. data/libzmq/zeromq-2.1.7/builds/msvc/libzmq/libzmq.vcproj +783 -0
  27. data/libzmq/zeromq-2.1.7/builds/msvc/msvc.sln +89 -0
  28. data/libzmq/zeromq-2.1.7/builds/msvc/platform.hpp +32 -0
  29. data/libzmq/zeromq-2.1.7/builds/redhat/zeromq.spec.in +139 -0
  30. data/libzmq/zeromq-2.1.7/config/compile +143 -0
  31. data/libzmq/zeromq-2.1.7/config/config.guess +1502 -0
  32. data/libzmq/zeromq-2.1.7/config/config.sub +1714 -0
  33. data/libzmq/zeromq-2.1.7/config/depcomp +630 -0
  34. data/libzmq/zeromq-2.1.7/config/install-sh +520 -0
  35. data/libzmq/zeromq-2.1.7/config/libtool.m4 +7377 -0
  36. data/libzmq/zeromq-2.1.7/config/ltmain.sh +8413 -0
  37. data/libzmq/zeromq-2.1.7/config/ltoptions.m4 +368 -0
  38. data/libzmq/zeromq-2.1.7/config/ltsugar.m4 +123 -0
  39. data/libzmq/zeromq-2.1.7/config/ltversion.m4 +23 -0
  40. data/libzmq/zeromq-2.1.7/config/lt~obsolete.m4 +92 -0
  41. data/libzmq/zeromq-2.1.7/config/missing +376 -0
  42. data/libzmq/zeromq-2.1.7/configure +21645 -0
  43. data/libzmq/zeromq-2.1.7/configure.in +380 -0
  44. data/libzmq/zeromq-2.1.7/doc/Makefile.am +46 -0
  45. data/libzmq/zeromq-2.1.7/doc/Makefile.in +546 -0
  46. data/libzmq/zeromq-2.1.7/doc/asciidoc.conf +56 -0
  47. data/libzmq/zeromq-2.1.7/doc/zmq.7 +242 -0
  48. data/libzmq/zeromq-2.1.7/doc/zmq.html +846 -0
  49. data/libzmq/zeromq-2.1.7/doc/zmq.txt +218 -0
  50. data/libzmq/zeromq-2.1.7/doc/zmq_bind.3 +166 -0
  51. data/libzmq/zeromq-2.1.7/doc/zmq_bind.html +746 -0
  52. data/libzmq/zeromq-2.1.7/doc/zmq_bind.txt +91 -0
  53. data/libzmq/zeromq-2.1.7/doc/zmq_close.3 +81 -0
  54. data/libzmq/zeromq-2.1.7/doc/zmq_close.html +645 -0
  55. data/libzmq/zeromq-2.1.7/doc/zmq_close.txt +52 -0
  56. data/libzmq/zeromq-2.1.7/doc/zmq_connect.3 +161 -0
  57. data/libzmq/zeromq-2.1.7/doc/zmq_connect.html +732 -0
  58. data/libzmq/zeromq-2.1.7/doc/zmq_connect.txt +89 -0
  59. data/libzmq/zeromq-2.1.7/doc/zmq_cpp.7 +410 -0
  60. data/libzmq/zeromq-2.1.7/doc/zmq_cpp.html +765 -0
  61. data/libzmq/zeromq-2.1.7/doc/zmq_cpp.txt +212 -0
  62. data/libzmq/zeromq-2.1.7/doc/zmq_device.3 +140 -0
  63. data/libzmq/zeromq-2.1.7/doc/zmq_device.html +736 -0
  64. data/libzmq/zeromq-2.1.7/doc/zmq_device.txt +138 -0
  65. data/libzmq/zeromq-2.1.7/doc/zmq_epgm.7 +209 -0
  66. data/libzmq/zeromq-2.1.7/doc/zmq_epgm.html +749 -0
  67. data/libzmq/zeromq-2.1.7/doc/zmq_epgm.txt +162 -0
  68. data/libzmq/zeromq-2.1.7/doc/zmq_errno.3 +78 -0
  69. data/libzmq/zeromq-2.1.7/doc/zmq_errno.html +634 -0
  70. data/libzmq/zeromq-2.1.7/doc/zmq_errno.txt +50 -0
  71. data/libzmq/zeromq-2.1.7/doc/zmq_getsockopt.3 +944 -0
  72. data/libzmq/zeromq-2.1.7/doc/zmq_getsockopt.html +1713 -0
  73. data/libzmq/zeromq-2.1.7/doc/zmq_getsockopt.txt +407 -0
  74. data/libzmq/zeromq-2.1.7/doc/zmq_init.3 +71 -0
  75. data/libzmq/zeromq-2.1.7/doc/zmq_init.html +635 -0
  76. data/libzmq/zeromq-2.1.7/doc/zmq_init.txt +51 -0
  77. data/libzmq/zeromq-2.1.7/doc/zmq_inproc.7 +115 -0
  78. data/libzmq/zeromq-2.1.7/doc/zmq_inproc.html +669 -0
  79. data/libzmq/zeromq-2.1.7/doc/zmq_inproc.txt +89 -0
  80. data/libzmq/zeromq-2.1.7/doc/zmq_ipc.7 +109 -0
  81. data/libzmq/zeromq-2.1.7/doc/zmq_ipc.html +662 -0
  82. data/libzmq/zeromq-2.1.7/doc/zmq_ipc.txt +80 -0
  83. data/libzmq/zeromq-2.1.7/doc/zmq_msg_close.3 +81 -0
  84. data/libzmq/zeromq-2.1.7/doc/zmq_msg_close.html +647 -0
  85. data/libzmq/zeromq-2.1.7/doc/zmq_msg_close.txt +55 -0
  86. data/libzmq/zeromq-2.1.7/doc/zmq_msg_copy.3 +95 -0
  87. data/libzmq/zeromq-2.1.7/doc/zmq_msg_copy.html +656 -0
  88. data/libzmq/zeromq-2.1.7/doc/zmq_msg_copy.txt +57 -0
  89. data/libzmq/zeromq-2.1.7/doc/zmq_msg_data.3 +76 -0
  90. data/libzmq/zeromq-2.1.7/doc/zmq_msg_data.html +633 -0
  91. data/libzmq/zeromq-2.1.7/doc/zmq_msg_data.txt +48 -0
  92. data/libzmq/zeromq-2.1.7/doc/zmq_msg_init.3 +110 -0
  93. data/libzmq/zeromq-2.1.7/doc/zmq_msg_init.html +656 -0
  94. data/libzmq/zeromq-2.1.7/doc/zmq_msg_init.txt +65 -0
  95. data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_data.3 +138 -0
  96. data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_data.html +678 -0
  97. data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_data.txt +83 -0
  98. data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_size.3 +97 -0
  99. data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_size.html +656 -0
  100. data/libzmq/zeromq-2.1.7/doc/zmq_msg_init_size.txt +58 -0
  101. data/libzmq/zeromq-2.1.7/doc/zmq_msg_move.3 +79 -0
  102. data/libzmq/zeromq-2.1.7/doc/zmq_msg_move.html +645 -0
  103. data/libzmq/zeromq-2.1.7/doc/zmq_msg_move.txt +52 -0
  104. data/libzmq/zeromq-2.1.7/doc/zmq_msg_size.3 +76 -0
  105. data/libzmq/zeromq-2.1.7/doc/zmq_msg_size.html +633 -0
  106. data/libzmq/zeromq-2.1.7/doc/zmq_msg_size.txt +48 -0
  107. data/libzmq/zeromq-2.1.7/doc/zmq_pgm.7 +209 -0
  108. data/libzmq/zeromq-2.1.7/doc/zmq_pgm.html +749 -0
  109. data/libzmq/zeromq-2.1.7/doc/zmq_pgm.txt +162 -0
  110. data/libzmq/zeromq-2.1.7/doc/zmq_poll.3 +204 -0
  111. data/libzmq/zeromq-2.1.7/doc/zmq_poll.html +755 -0
  112. data/libzmq/zeromq-2.1.7/doc/zmq_poll.txt +132 -0
  113. data/libzmq/zeromq-2.1.7/doc/zmq_recv.3 +172 -0
  114. data/libzmq/zeromq-2.1.7/doc/zmq_recv.html +746 -0
  115. data/libzmq/zeromq-2.1.7/doc/zmq_recv.txt +121 -0
  116. data/libzmq/zeromq-2.1.7/doc/zmq_send.3 +185 -0
  117. data/libzmq/zeromq-2.1.7/doc/zmq_send.html +755 -0
  118. data/libzmq/zeromq-2.1.7/doc/zmq_send.txt +120 -0
  119. data/libzmq/zeromq-2.1.7/doc/zmq_setsockopt.3 +878 -0
  120. data/libzmq/zeromq-2.1.7/doc/zmq_setsockopt.html +1603 -0
  121. data/libzmq/zeromq-2.1.7/doc/zmq_setsockopt.txt +382 -0
  122. data/libzmq/zeromq-2.1.7/doc/zmq_socket.3 +779 -0
  123. data/libzmq/zeromq-2.1.7/doc/zmq_socket.html +1424 -0
  124. data/libzmq/zeromq-2.1.7/doc/zmq_socket.txt +342 -0
  125. data/libzmq/zeromq-2.1.7/doc/zmq_strerror.3 +78 -0
  126. data/libzmq/zeromq-2.1.7/doc/zmq_strerror.html +634 -0
  127. data/libzmq/zeromq-2.1.7/doc/zmq_strerror.txt +55 -0
  128. data/libzmq/zeromq-2.1.7/doc/zmq_tcp.7 +244 -0
  129. data/libzmq/zeromq-2.1.7/doc/zmq_tcp.html +755 -0
  130. data/libzmq/zeromq-2.1.7/doc/zmq_tcp.txt +162 -0
  131. data/libzmq/zeromq-2.1.7/doc/zmq_term.3 +135 -0
  132. data/libzmq/zeromq-2.1.7/doc/zmq_term.html +672 -0
  133. data/libzmq/zeromq-2.1.7/doc/zmq_term.txt +65 -0
  134. data/libzmq/zeromq-2.1.7/doc/zmq_version.3 +78 -0
  135. data/libzmq/zeromq-2.1.7/doc/zmq_version.html +632 -0
  136. data/libzmq/zeromq-2.1.7/doc/zmq_version.txt +53 -0
  137. data/libzmq/zeromq-2.1.7/foreign/openpgm/Makefile.am +8 -0
  138. data/libzmq/zeromq-2.1.7/foreign/openpgm/Makefile.in +588 -0
  139. data/libzmq/zeromq-2.1.7/foreign/openpgm/libpgm-5.1.115~dfsg.tar.gz +0 -0
  140. data/libzmq/zeromq-2.1.7/foreign/xmlParser/xmlParser.cpp +2923 -0
  141. data/libzmq/zeromq-2.1.7/foreign/xmlParser/xmlParser.hpp +762 -0
  142. data/libzmq/zeromq-2.1.7/include/zmq.h +269 -0
  143. data/libzmq/zeromq-2.1.7/include/zmq.hpp +301 -0
  144. data/libzmq/zeromq-2.1.7/include/zmq_utils.h +64 -0
  145. data/libzmq/zeromq-2.1.7/perf/Makefile.am +21 -0
  146. data/libzmq/zeromq-2.1.7/perf/Makefile.in +566 -0
  147. data/libzmq/zeromq-2.1.7/perf/inproc_lat.cpp +232 -0
  148. data/libzmq/zeromq-2.1.7/perf/inproc_thr.cpp +246 -0
  149. data/libzmq/zeromq-2.1.7/perf/local_lat.cpp +108 -0
  150. data/libzmq/zeromq-2.1.7/perf/local_thr.cpp +138 -0
  151. data/libzmq/zeromq-2.1.7/perf/remote_lat.cpp +121 -0
  152. data/libzmq/zeromq-2.1.7/perf/remote_thr.cpp +104 -0
  153. data/libzmq/zeromq-2.1.7/src/Makefile.am +155 -0
  154. data/libzmq/zeromq-2.1.7/src/Makefile.in +1320 -0
  155. data/libzmq/zeromq-2.1.7/src/array.hpp +147 -0
  156. data/libzmq/zeromq-2.1.7/src/atomic_counter.hpp +164 -0
  157. data/libzmq/zeromq-2.1.7/src/atomic_ptr.hpp +159 -0
  158. data/libzmq/zeromq-2.1.7/src/blob.hpp +34 -0
  159. data/libzmq/zeromq-2.1.7/src/clock.cpp +118 -0
  160. data/libzmq/zeromq-2.1.7/src/clock.hpp +60 -0
  161. data/libzmq/zeromq-2.1.7/src/command.cpp +39 -0
  162. data/libzmq/zeromq-2.1.7/src/command.hpp +147 -0
  163. data/libzmq/zeromq-2.1.7/src/config.hpp +88 -0
  164. data/libzmq/zeromq-2.1.7/src/connect_session.cpp +119 -0
  165. data/libzmq/zeromq-2.1.7/src/connect_session.hpp +65 -0
  166. data/libzmq/zeromq-2.1.7/src/ctx.cpp +322 -0
  167. data/libzmq/zeromq-2.1.7/src/ctx.hpp +159 -0
  168. data/libzmq/zeromq-2.1.7/src/decoder.cpp +129 -0
  169. data/libzmq/zeromq-2.1.7/src/decoder.hpp +207 -0
  170. data/libzmq/zeromq-2.1.7/src/device.cpp +120 -0
  171. data/libzmq/zeromq-2.1.7/src/device.hpp +32 -0
  172. data/libzmq/zeromq-2.1.7/src/devpoll.cpp +190 -0
  173. data/libzmq/zeromq-2.1.7/src/devpoll.hpp +100 -0
  174. data/libzmq/zeromq-2.1.7/src/dist.cpp +200 -0
  175. data/libzmq/zeromq-2.1.7/src/dist.hpp +90 -0
  176. data/libzmq/zeromq-2.1.7/src/encoder.cpp +90 -0
  177. data/libzmq/zeromq-2.1.7/src/encoder.hpp +184 -0
  178. data/libzmq/zeromq-2.1.7/src/epoll.cpp +177 -0
  179. data/libzmq/zeromq-2.1.7/src/epoll.hpp +96 -0
  180. data/libzmq/zeromq-2.1.7/src/err.cpp +238 -0
  181. data/libzmq/zeromq-2.1.7/src/err.hpp +145 -0
  182. data/libzmq/zeromq-2.1.7/src/fd.hpp +45 -0
  183. data/libzmq/zeromq-2.1.7/src/fq.cpp +164 -0
  184. data/libzmq/zeromq-2.1.7/src/fq.hpp +80 -0
  185. data/libzmq/zeromq-2.1.7/src/i_engine.hpp +53 -0
  186. data/libzmq/zeromq-2.1.7/src/i_inout.hpp +50 -0
  187. data/libzmq/zeromq-2.1.7/src/i_poll_events.hpp +46 -0
  188. data/libzmq/zeromq-2.1.7/src/io_object.cpp +107 -0
  189. data/libzmq/zeromq-2.1.7/src/io_object.hpp +78 -0
  190. data/libzmq/zeromq-2.1.7/src/io_thread.cpp +109 -0
  191. data/libzmq/zeromq-2.1.7/src/io_thread.hpp +88 -0
  192. data/libzmq/zeromq-2.1.7/src/ip.cpp +339 -0
  193. data/libzmq/zeromq-2.1.7/src/ip.hpp +68 -0
  194. data/libzmq/zeromq-2.1.7/src/kqueue.cpp +194 -0
  195. data/libzmq/zeromq-2.1.7/src/kqueue.hpp +103 -0
  196. data/libzmq/zeromq-2.1.7/src/lb.cpp +174 -0
  197. data/libzmq/zeromq-2.1.7/src/lb.hpp +79 -0
  198. data/libzmq/zeromq-2.1.7/src/libzmq.pc.in +10 -0
  199. data/libzmq/zeromq-2.1.7/src/likely.hpp +33 -0
  200. data/libzmq/zeromq-2.1.7/src/mailbox.cpp +382 -0
  201. data/libzmq/zeromq-2.1.7/src/mailbox.hpp +62 -0
  202. data/libzmq/zeromq-2.1.7/src/msg_content.hpp +52 -0
  203. data/libzmq/zeromq-2.1.7/src/mutex.hpp +121 -0
  204. data/libzmq/zeromq-2.1.7/src/named_session.cpp +85 -0
  205. data/libzmq/zeromq-2.1.7/src/named_session.hpp +57 -0
  206. data/libzmq/zeromq-2.1.7/src/object.cpp +467 -0
  207. data/libzmq/zeromq-2.1.7/src/object.hpp +127 -0
  208. data/libzmq/zeromq-2.1.7/src/options.cpp +336 -0
  209. data/libzmq/zeromq-2.1.7/src/options.hpp +87 -0
  210. data/libzmq/zeromq-2.1.7/src/own.cpp +214 -0
  211. data/libzmq/zeromq-2.1.7/src/own.hpp +140 -0
  212. data/libzmq/zeromq-2.1.7/src/pair.cpp +180 -0
  213. data/libzmq/zeromq-2.1.7/src/pair.hpp +76 -0
  214. data/libzmq/zeromq-2.1.7/src/pgm_receiver.cpp +259 -0
  215. data/libzmq/zeromq-2.1.7/src/pgm_receiver.hpp +129 -0
  216. data/libzmq/zeromq-2.1.7/src/pgm_sender.cpp +215 -0
  217. data/libzmq/zeromq-2.1.7/src/pgm_sender.hpp +105 -0
  218. data/libzmq/zeromq-2.1.7/src/pgm_socket.cpp +705 -0
  219. data/libzmq/zeromq-2.1.7/src/pgm_socket.hpp +118 -0
  220. data/libzmq/zeromq-2.1.7/src/pipe.cpp +409 -0
  221. data/libzmq/zeromq-2.1.7/src/pipe.hpp +214 -0
  222. data/libzmq/zeromq-2.1.7/src/platform.hpp.in +228 -0
  223. data/libzmq/zeromq-2.1.7/src/poll.cpp +180 -0
  224. data/libzmq/zeromq-2.1.7/src/poll.hpp +104 -0
  225. data/libzmq/zeromq-2.1.7/src/poller.hpp +73 -0
  226. data/libzmq/zeromq-2.1.7/src/poller_base.cpp +99 -0
  227. data/libzmq/zeromq-2.1.7/src/poller_base.hpp +84 -0
  228. data/libzmq/zeromq-2.1.7/src/pub.cpp +31 -0
  229. data/libzmq/zeromq-2.1.7/src/pub.hpp +44 -0
  230. data/libzmq/zeromq-2.1.7/src/pull.cpp +61 -0
  231. data/libzmq/zeromq-2.1.7/src/pull.hpp +60 -0
  232. data/libzmq/zeromq-2.1.7/src/push.cpp +62 -0
  233. data/libzmq/zeromq-2.1.7/src/push.hpp +59 -0
  234. data/libzmq/zeromq-2.1.7/src/reaper.cpp +121 -0
  235. data/libzmq/zeromq-2.1.7/src/reaper.hpp +77 -0
  236. data/libzmq/zeromq-2.1.7/src/rep.cpp +131 -0
  237. data/libzmq/zeromq-2.1.7/src/rep.hpp +59 -0
  238. data/libzmq/zeromq-2.1.7/src/req.cpp +121 -0
  239. data/libzmq/zeromq-2.1.7/src/req.hpp +58 -0
  240. data/libzmq/zeromq-2.1.7/src/select.cpp +211 -0
  241. data/libzmq/zeromq-2.1.7/src/select.hpp +116 -0
  242. data/libzmq/zeromq-2.1.7/src/semaphore.hpp +189 -0
  243. data/libzmq/zeromq-2.1.7/src/session.cpp +347 -0
  244. data/libzmq/zeromq-2.1.7/src/session.hpp +150 -0
  245. data/libzmq/zeromq-2.1.7/src/socket_base.cpp +811 -0
  246. data/libzmq/zeromq-2.1.7/src/socket_base.hpp +207 -0
  247. data/libzmq/zeromq-2.1.7/src/stdint.hpp +63 -0
  248. data/libzmq/zeromq-2.1.7/src/sub.cpp +75 -0
  249. data/libzmq/zeromq-2.1.7/src/sub.hpp +50 -0
  250. data/libzmq/zeromq-2.1.7/src/swap.cpp +325 -0
  251. data/libzmq/zeromq-2.1.7/src/swap.hpp +123 -0
  252. data/libzmq/zeromq-2.1.7/src/tcp_connecter.cpp +310 -0
  253. data/libzmq/zeromq-2.1.7/src/tcp_connecter.hpp +81 -0
  254. data/libzmq/zeromq-2.1.7/src/tcp_listener.cpp +371 -0
  255. data/libzmq/zeromq-2.1.7/src/tcp_listener.hpp +73 -0
  256. data/libzmq/zeromq-2.1.7/src/tcp_socket.cpp +228 -0
  257. data/libzmq/zeromq-2.1.7/src/tcp_socket.hpp +72 -0
  258. data/libzmq/zeromq-2.1.7/src/thread.cpp +97 -0
  259. data/libzmq/zeromq-2.1.7/src/thread.hpp +78 -0
  260. data/libzmq/zeromq-2.1.7/src/transient_session.cpp +41 -0
  261. data/libzmq/zeromq-2.1.7/src/transient_session.hpp +52 -0
  262. data/libzmq/zeromq-2.1.7/src/trie.cpp +181 -0
  263. data/libzmq/zeromq-2.1.7/src/trie.hpp +59 -0
  264. data/libzmq/zeromq-2.1.7/src/uuid.cpp +233 -0
  265. data/libzmq/zeromq-2.1.7/src/uuid.hpp +111 -0
  266. data/libzmq/zeromq-2.1.7/src/windows.hpp +79 -0
  267. data/libzmq/zeromq-2.1.7/src/wire.hpp +99 -0
  268. data/libzmq/zeromq-2.1.7/src/xpub.cpp +76 -0
  269. data/libzmq/zeromq-2.1.7/src/xpub.hpp +61 -0
  270. data/libzmq/zeromq-2.1.7/src/xrep.cpp +337 -0
  271. data/libzmq/zeromq-2.1.7/src/xrep.hpp +116 -0
  272. data/libzmq/zeromq-2.1.7/src/xreq.cpp +74 -0
  273. data/libzmq/zeromq-2.1.7/src/xreq.hpp +65 -0
  274. data/libzmq/zeromq-2.1.7/src/xsub.cpp +172 -0
  275. data/libzmq/zeromq-2.1.7/src/xsub.hpp +80 -0
  276. data/libzmq/zeromq-2.1.7/src/ypipe.hpp +209 -0
  277. data/libzmq/zeromq-2.1.7/src/yqueue.hpp +198 -0
  278. data/libzmq/zeromq-2.1.7/src/zmq.cpp +798 -0
  279. data/libzmq/zeromq-2.1.7/src/zmq_connecter.cpp +166 -0
  280. data/libzmq/zeromq-2.1.7/src/zmq_connecter.hpp +92 -0
  281. data/libzmq/zeromq-2.1.7/src/zmq_engine.cpp +220 -0
  282. data/libzmq/zeromq-2.1.7/src/zmq_engine.hpp +87 -0
  283. data/libzmq/zeromq-2.1.7/src/zmq_init.cpp +216 -0
  284. data/libzmq/zeromq-2.1.7/src/zmq_init.hpp +93 -0
  285. data/libzmq/zeromq-2.1.7/src/zmq_listener.cpp +78 -0
  286. data/libzmq/zeromq-2.1.7/src/zmq_listener.hpp +67 -0
  287. data/libzmq/zeromq-2.1.7/tests/Makefile.am +30 -0
  288. data/libzmq/zeromq-2.1.7/tests/Makefile.in +713 -0
  289. data/libzmq/zeromq-2.1.7/tests/test_hwm.cpp +68 -0
  290. data/libzmq/zeromq-2.1.7/tests/test_pair_inproc.cpp +31 -0
  291. data/libzmq/zeromq-2.1.7/tests/test_pair_ipc.cpp +31 -0
  292. data/libzmq/zeromq-2.1.7/tests/test_pair_tcp.cpp +31 -0
  293. data/libzmq/zeromq-2.1.7/tests/test_reqrep_inproc.cpp +31 -0
  294. data/libzmq/zeromq-2.1.7/tests/test_reqrep_ipc.cpp +31 -0
  295. data/libzmq/zeromq-2.1.7/tests/test_reqrep_tcp.cpp +31 -0
  296. data/libzmq/zeromq-2.1.7/tests/test_shutdown_stress.cpp +87 -0
  297. data/libzmq/zeromq-2.1.7/tests/testutil.hpp +130 -0
  298. data/libzmq/zeromq-2.1.7/version.sh +21 -0
  299. data/libzmq/zeromq-2.1.7/zeromq.spec +139 -0
  300. metadata +348 -0
@@ -0,0 +1,212 @@
1
+ zmq_cpp(7)
2
+ ==========
3
+
4
+
5
+ NAME
6
+ ----
7
+ zmq_cpp - interface between 0MQ and C++ applications
8
+
9
+
10
+ SYNOPSIS
11
+ --------
12
+ *#include <zmq.hpp>*
13
+
14
+ *c$$++$$* ['flags'] 'files' *-lzmq* ['libraries']
15
+
16
+
17
+ DESCRIPTION
18
+ -----------
19
+ This manual page describes how the 0MQ C++ language binding maps to the
20
+ underlying 0MQ C library functions.
21
+
22
+ All 0MQ constants defined by _zmq.h_ are also available to the C++ language
23
+ binding.
24
+
25
+ The following classes are provided in the 'zmq' namespace:
26
+
27
+
28
+ Context
29
+ ~~~~~~~
30
+ The 'context_t' class encapsulates functionality dealing with the
31
+ initialisation and termination of a 0MQ _context_.
32
+
33
+
34
+ Constructor
35
+ ^^^^^^^^^^^
36
+ [verse]
37
+ *context_t::context_t(int 'io_threads')*
38
+
39
+ Maps to the _zmq_init()_ function, as described in linkzmq:zmq_init[3].
40
+
41
+ Destructor
42
+ ^^^^^^^^^^
43
+ [verse]
44
+ *context_t::~context_t(void)*
45
+
46
+ Maps to the _zmq_term()_ function, as described in linkzmq:zmq_term[3].
47
+
48
+
49
+ Methods
50
+ ^^^^^^^
51
+ None.
52
+
53
+
54
+ Socket
55
+ ~~~~~~
56
+ The 'socket_t' class encapsulates a 0MQ socket.
57
+
58
+
59
+ Constructor
60
+ ^^^^^^^^^^^
61
+ [verse]
62
+ *socket_t::socket_t(context_t '&context', int 'type')*
63
+
64
+ Maps to the _zmq_socket()_ function, as described in linkzmq:zmq_socket[3].
65
+
66
+
67
+ Destructor
68
+ ^^^^^^^^^^
69
+ [verse]
70
+ *socket_t::~socket_t(void)*
71
+
72
+ Calls the _zmq_close()_ function, as described in linkzmq:zmq_close[3].
73
+
74
+
75
+ Methods
76
+ ^^^^^^^
77
+ [verse]
78
+ *void socket_t::getsockopt(int 'option_name', void '*option_value', size_t
79
+ '*option_len')*
80
+
81
+ Maps to the _zmq_getsockopt()_ function, as described in
82
+ linkzmq:zmq_getsockopt[3].
83
+
84
+ [verse]
85
+ *void socket_t::setsockopt(int 'option_name', const void '*option_value', size_t
86
+ 'option_len')*
87
+
88
+ Maps to the _zmq_setsockopt()_ function, as described in
89
+ linkzmq:zmq_setsockopt[3].
90
+
91
+ [verse]
92
+ *void socket_t::bind(const char '*endpoint')*
93
+
94
+ Maps to the _zmq_bind()_ function, as described in linkzmq:zmq_bind[3].
95
+
96
+ [verse]
97
+ *void socket_t::connect(const char '*endpoint')*
98
+
99
+ Maps to the _zmq_connect()_ function, as described in linkzmq:zmq_connect[3].
100
+
101
+ [verse]
102
+ *bool socket_t::send(message_t '&msg', int 'flags' = 0)*
103
+
104
+ Maps to the _zmq_send()_ function, as described in linkzmq:zmq_send[3].
105
+ Returns true if message is successfully sent, false if it is not.
106
+
107
+ [verse]
108
+ *bool socket_t::recv(message_t '*msg', int 'flags' = 0)*
109
+
110
+ Maps to the _zmq_recv()_ function, as described in linkzmq:zmq_recv[3].
111
+ Returns true if message is successfully received, false if it is not.
112
+
113
+
114
+ Message
115
+ ~~~~~~~
116
+ The 'zmq::message_t' class encapsulates the 'zmq_msg_t' structure and
117
+ functions to construct, destruct and manipulate 0MQ messages.
118
+
119
+
120
+ Constructor
121
+ ^^^^^^^^^^^
122
+ [verse]
123
+ *message_t::message_t(void)*
124
+ *message_t::message_t(size_t 'size')*
125
+ *message_t::message_t(void '*data', size_t 'size', free_fn '*ffn')*
126
+
127
+ These map to the _zmq_msg_init()_, _zmq_msg_init_size()_ and
128
+ _zmq_msg_init_data()_ functions, described in linkzmq:zmq_msg_init[3],
129
+ linkzmq:zmq_msg_init_size[3] and linkzmq:zmq_msg_init_data[3] respectively.
130
+
131
+
132
+ Destructor
133
+ ^^^^^^^^^^
134
+ [verse]
135
+ *message_t::~message_t(void)*
136
+
137
+ Calls the _zmq_msg_close()_ function, as described in linkzmq:zmq_msg_close[3].
138
+
139
+
140
+ Methods
141
+ ^^^^^^^
142
+ [verse]
143
+ *void *message_t::data (void)*
144
+
145
+ Maps to the _zmq_msg_data()_ function, as described in linkzmq:zmq_msg_data[3].
146
+
147
+ [verse]
148
+ *size_t message_t::size (void)*
149
+
150
+ Maps to the _zmq_msg_size()_ function, as described in linkzmq:zmq_msg_size[3].
151
+
152
+ [verse]
153
+ *void message_t::copy (message_t '*src')*
154
+
155
+ Maps to the _zmq_msg_copy()_ function, as described in linkzmq:zmq_msg_copy[3].
156
+
157
+ [verse]
158
+ *void message_t::move (message_t '*src')*
159
+
160
+ Maps to the _zmq_msg_move()_ function, as described in linkzmq:zmq_msg_move[3].
161
+
162
+ [verse]
163
+ *message_t::rebuild(void)*
164
+ *message_t::rebuild(size_t 'size')*
165
+ *message_t::rebuild(void '*data', size_t 'size', free_fn '*ffn')*
166
+
167
+ Equivalent to calling the _zmq_msg_close()_ function followed by the
168
+ corresponding _zmq_msg_init()_ function.
169
+
170
+
171
+ Input/output multiplexing
172
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
173
+
174
+ [verse]
175
+ *int poll (zmq_pollitem_t *items, int nitems, long timeout = -1)*
176
+
177
+ The _poll()_ function is a namespaced equivalent of the _zmq_poll()_ function,
178
+ as described in linkzmq:zmq_poll[3].
179
+
180
+ NOTE: To obtain a 0MQ _socket_ for use in a _zmq_pollitem_t_ structure, you
181
+ should cast an instance of the _socket_t_ class to `(void *)`.
182
+
183
+
184
+ ERROR HANDLING
185
+ --------------
186
+ All errors reported by the underlying 0MQ C library functions are automatically
187
+ converted to exceptions by the C++ language binding. The 'zmq::error_t' class
188
+ is derived from the 'std::exception' class and uses the _zmq_strerror()_
189
+ function to convert the error code to human-readable string.
190
+
191
+
192
+ EXAMPLE
193
+ -------
194
+ ----
195
+ zmq::context_t ctx (1);
196
+ zmq::socket_t s (ctx, ZMQ_PUB);
197
+ s.connect ("tcp://192.168.0.115:5555");
198
+ zmq::message_t msg (100);
199
+ memset (msg.data (), 0, 100);
200
+ s.send (msg);
201
+ ----
202
+
203
+
204
+ SEE ALSO
205
+ --------
206
+ linkzmq:zmq[7]
207
+
208
+
209
+ AUTHORS
210
+ -------
211
+ This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
212
+ Martin Lucina <mato@kotelna.sk>.
@@ -0,0 +1,140 @@
1
+ '\" t
2
+ .\" Title: zmq_device
3
+ .\" Author: [see the "AUTHORS" section]
4
+ .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5
+ .\" Date: 05/06/2011
6
+ .\" Manual: 0MQ Manual
7
+ .\" Source: 0MQ 2.1.6
8
+ .\" Language: English
9
+ .\"
10
+ .TH "ZMQ_DEVICE" "3" "05/06/2011" "0MQ 2\&.1\&.6" "0MQ Manual"
11
+ .\" -----------------------------------------------------------------
12
+ .\" * Define some portability stuff
13
+ .\" -----------------------------------------------------------------
14
+ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
+ .\" http://bugs.debian.org/507673
16
+ .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
+ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
+ .ie \n(.g .ds Aq \(aq
19
+ .el .ds Aq '
20
+ .\" -----------------------------------------------------------------
21
+ .\" * set default formatting
22
+ .\" -----------------------------------------------------------------
23
+ .\" disable hyphenation
24
+ .nh
25
+ .\" disable justification (adjust text to left margin only)
26
+ .ad l
27
+ .\" -----------------------------------------------------------------
28
+ .\" * MAIN CONTENT STARTS HERE *
29
+ .\" -----------------------------------------------------------------
30
+ .SH "NAME"
31
+ zmq_device \- start built\-in 0MQ device
32
+ .SH "SYNOPSIS"
33
+ .sp
34
+ \fBint zmq_device (int \fR\fB\fIdevice\fR\fR\fB, const void \fR\fB\fI*frontend\fR\fR\fB, const void \fR\fB\fI*backend\fR\fR\fB);\fR
35
+ .SH "DESCRIPTION"
36
+ .sp
37
+ The \fIzmq_device()\fR function starts a built\-in 0MQ device\&. The \fIdevice\fR argument is one of:
38
+ .PP
39
+ \fIZMQ_QUEUE\fR
40
+ .RS 4
41
+ starts a queue device
42
+ .RE
43
+ .PP
44
+ \fIZMQ_FORWARDER\fR
45
+ .RS 4
46
+ starts a forwarder device
47
+ .RE
48
+ .PP
49
+ \fIZMQ_STREAMER\fR
50
+ .RS 4
51
+ starts a streamer device
52
+ .RE
53
+ .sp
54
+ The device connects a frontend socket to a backend socket\&. Conceptually, data flows from frontend to backend\&. Depending on the socket types, replies may flow in the opposite direction\&.
55
+ .sp
56
+ Before calling \fIzmq_device()\fR you must set any socket options, and connect or bind both frontend and backend sockets\&. The two conventional device models are:
57
+ .PP
58
+ \fBproxy\fR
59
+ .RS 4
60
+ bind frontend socket to an endpoint, and connect backend socket to downstream components\&. A proxy device model does not require changes to the downstream topology but that topology is static (any changes require reconfiguring the device)\&.
61
+ .RE
62
+ .PP
63
+ \fBbroker\fR
64
+ .RS 4
65
+ bind frontend socket to one endpoint and bind backend socket to a second endpoint\&. Downstream components must now connect into the device\&. A broker device model allows a dynamic downstream topology (components can come and go at any time)\&.
66
+ .RE
67
+ .sp
68
+ \fIzmq_device()\fR runs in the current thread and returns only if/when the current context is closed\&.
69
+ .SH "QUEUE DEVICE"
70
+ .sp
71
+ \fIZMQ_QUEUE\fR creates a shared queue that collects requests from a set of clients, and distributes these fairly among a set of services\&. Requests are fair\-queued from frontend connections and load\-balanced between backend connections\&. Replies automatically return to the client that made the original request\&.
72
+ .sp
73
+ This device is part of the \fIrequest\-reply\fR pattern\&. The frontend speaks to clients and the backend speaks to services\&. You should use \fIZMQ_QUEUE\fR with a \fIZMQ_XREP\fR socket for the frontend and a \fIZMQ_XREQ\fR socket for the backend\&. Other combinations are not documented\&.
74
+ .sp
75
+ Refer to \fBzmq_socket\fR(3) for a description of these socket types\&.
76
+ .SH "FORWARDER DEVICE"
77
+ .sp
78
+ \fIZMQ_FORWARDER\fR collects messages from a set of publishers and forwards these to a set of subscribers\&. You will generally use this to bridge networks, e\&.g\&. read on TCP unicast and forward on multicast\&.
79
+ .sp
80
+ This device is part of the \fIpublish\-subscribe\fR pattern\&. The frontend speaks to publishers and the backend speaks to subscribers\&. You should use \fIZMQ_FORWARDER\fR with a \fIZMQ_SUB\fR socket for the frontend and a \fIZMQ_PUB\fR socket for the backend\&. Other combinations are not documented\&.
81
+ .sp
82
+ Refer to \fBzmq_socket\fR(3) for a description of these socket types\&.
83
+ .SH "STREAMER DEVICE"
84
+ .sp
85
+ \fIZMQ_STREAMER\fR collects tasks from a set of pushers and forwards these to a set of pullers\&. You will generally use this to bridge networks\&. Messages are fair\-queued from pushers and load\-balanced to pullers\&.
86
+ .sp
87
+ This device is part of the \fIpipeline\fR pattern\&. The frontend speaks to pushers and the backend speaks to pullers\&. You should use \fIZMQ_STREAMER\fR with a \fIZMQ_PULL\fR socket for the frontend and a \fIZMQ_PUSH\fR socket for the backend\&. Other combinations are not documented\&.
88
+ .sp
89
+ Refer to \fBzmq_socket\fR(3) for a description of these socket types\&.
90
+ .SH "RETURN VALUE"
91
+ .sp
92
+ The \fIzmq_device()\fR function always returns \-1 and \fIerrno\fR set to \fBETERM\fR (the 0MQ \fIcontext\fR associated with either of the specified sockets was terminated)\&.
93
+ .SH "EXAMPLE"
94
+ .PP
95
+ \fBCreating a queue broker\fR.
96
+ .sp
97
+ .if n \{\
98
+ .RS 4
99
+ .\}
100
+ .nf
101
+ // Create frontend and backend sockets
102
+ void *frontend = zmq_socket (context, ZMQ_XREP);
103
+ assert (backend);
104
+ void *backend = zmq_socket (context, ZMQ_XREQ);
105
+ assert (frontend);
106
+ // Bind both sockets to TCP ports
107
+ assert (zmq_bind (frontend, "tcp://*:5555") == 0);
108
+ assert (zmq_bind (backend, "tcp://*:5556") == 0);
109
+ // Start a queue device
110
+ zmq_device (ZMQ_QUEUE, frontend, backend);
111
+ .fi
112
+ .if n \{\
113
+ .RE
114
+ .\}
115
+ .sp
116
+ .SH "SEE ALSO"
117
+ .sp
118
+ \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7)
119
+ .SH "AUTHORS"
120
+ .sp
121
+ This 0MQ manual page was written by Pieter Hintjens <\m[blue]\fBph@imatix\&.com\fR\m[]\&\s-2\u[1]\d\s+2>
122
+ .SH "RESOURCES"
123
+ .sp
124
+ Main web site: \m[blue]\fBhttp://www\&.zeromq\&.org/\fR\m[]
125
+ .sp
126
+ Report bugs to the 0MQ development mailing list: <\m[blue]\fBzeromq\-dev@lists\&.zeromq\&.org\fR\m[]\&\s-2\u[2]\d\s+2>
127
+ .SH "COPYING"
128
+ .sp
129
+ Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL)\&. For details see the files COPYING and COPYING\&.LESSER included with the 0MQ distribution\&.
130
+ .SH "NOTES"
131
+ .IP " 1." 4
132
+ ph@imatix.com
133
+ .RS 4
134
+ \%mailto:ph@imatix.com
135
+ .RE
136
+ .IP " 2." 4
137
+ zeromq-dev@lists.zeromq.org
138
+ .RS 4
139
+ \%mailto:zeromq-dev@lists.zeromq.org
140
+ .RE
@@ -0,0 +1,736 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <meta name="generator" content="AsciiDoc 8.5.2" />
7
+ <title>zmq_device(3)</title>
8
+ <style type="text/css">
9
+ /* Debug borders */
10
+ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
11
+ /*
12
+ border: 1px solid red;
13
+ */
14
+ }
15
+
16
+ body {
17
+ margin: 1em 5% 1em 5%;
18
+ }
19
+
20
+ a {
21
+ color: blue;
22
+ text-decoration: underline;
23
+ }
24
+ a:visited {
25
+ color: fuchsia;
26
+ }
27
+
28
+ em {
29
+ font-style: italic;
30
+ color: navy;
31
+ }
32
+
33
+ strong {
34
+ font-weight: bold;
35
+ color: #083194;
36
+ }
37
+
38
+ tt {
39
+ color: navy;
40
+ }
41
+
42
+ h1, h2, h3, h4, h5, h6 {
43
+ color: #527bbd;
44
+ font-family: sans-serif;
45
+ margin-top: 1.2em;
46
+ margin-bottom: 0.5em;
47
+ line-height: 1.3;
48
+ }
49
+
50
+ h1, h2, h3 {
51
+ border-bottom: 2px solid silver;
52
+ }
53
+ h2 {
54
+ padding-top: 0.5em;
55
+ }
56
+ h3 {
57
+ float: left;
58
+ }
59
+ h3 + * {
60
+ clear: left;
61
+ }
62
+
63
+ div.sectionbody {
64
+ font-family: serif;
65
+ margin-left: 0;
66
+ }
67
+
68
+ hr {
69
+ border: 1px solid silver;
70
+ }
71
+
72
+ p {
73
+ margin-top: 0.5em;
74
+ margin-bottom: 0.5em;
75
+ }
76
+
77
+ ul, ol, li > p {
78
+ margin-top: 0;
79
+ }
80
+
81
+ pre {
82
+ padding: 0;
83
+ margin: 0;
84
+ }
85
+
86
+ span#author {
87
+ color: #527bbd;
88
+ font-family: sans-serif;
89
+ font-weight: bold;
90
+ font-size: 1.1em;
91
+ }
92
+ span#email {
93
+ }
94
+ span#revnumber, span#revdate, span#revremark {
95
+ font-family: sans-serif;
96
+ }
97
+
98
+ div#footer {
99
+ font-family: sans-serif;
100
+ font-size: small;
101
+ border-top: 2px solid silver;
102
+ padding-top: 0.5em;
103
+ margin-top: 4.0em;
104
+ }
105
+ div#footer-text {
106
+ float: left;
107
+ padding-bottom: 0.5em;
108
+ }
109
+ div#footer-badges {
110
+ float: right;
111
+ padding-bottom: 0.5em;
112
+ }
113
+
114
+ div#preamble {
115
+ margin-top: 1.5em;
116
+ margin-bottom: 1.5em;
117
+ }
118
+ div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
119
+ div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
120
+ div.admonitionblock {
121
+ margin-top: 1.0em;
122
+ margin-bottom: 1.5em;
123
+ }
124
+ div.admonitionblock {
125
+ margin-top: 2.0em;
126
+ margin-bottom: 2.0em;
127
+ margin-right: 10%;
128
+ color: #606060;
129
+ }
130
+
131
+ div.content { /* Block element content. */
132
+ padding: 0;
133
+ }
134
+
135
+ /* Block element titles. */
136
+ div.title, caption.title {
137
+ color: #527bbd;
138
+ font-family: sans-serif;
139
+ font-weight: bold;
140
+ text-align: left;
141
+ margin-top: 1.0em;
142
+ margin-bottom: 0.5em;
143
+ }
144
+ div.title + * {
145
+ margin-top: 0;
146
+ }
147
+
148
+ td div.title:first-child {
149
+ margin-top: 0.0em;
150
+ }
151
+ div.content div.title:first-child {
152
+ margin-top: 0.0em;
153
+ }
154
+ div.content + div.title {
155
+ margin-top: 0.0em;
156
+ }
157
+
158
+ div.sidebarblock > div.content {
159
+ background: #ffffee;
160
+ border: 1px solid silver;
161
+ padding: 0.5em;
162
+ }
163
+
164
+ div.listingblock > div.content {
165
+ border: 1px solid silver;
166
+ background: #f4f4f4;
167
+ padding: 0.5em;
168
+ }
169
+
170
+ div.quoteblock, div.verseblock {
171
+ padding-left: 1.0em;
172
+ margin-left: 1.0em;
173
+ margin-right: 10%;
174
+ border-left: 5px solid #dddddd;
175
+ color: #777777;
176
+ }
177
+
178
+ div.quoteblock > div.attribution {
179
+ padding-top: 0.5em;
180
+ text-align: right;
181
+ }
182
+
183
+ div.verseblock > div.content {
184
+ white-space: pre;
185
+ }
186
+ div.verseblock > div.attribution {
187
+ padding-top: 0.75em;
188
+ text-align: left;
189
+ }
190
+ /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
191
+ div.verseblock + div.attribution {
192
+ text-align: left;
193
+ }
194
+
195
+ div.admonitionblock .icon {
196
+ vertical-align: top;
197
+ font-size: 1.1em;
198
+ font-weight: bold;
199
+ text-decoration: underline;
200
+ color: #527bbd;
201
+ padding-right: 0.5em;
202
+ }
203
+ div.admonitionblock td.content {
204
+ padding-left: 0.5em;
205
+ border-left: 3px solid #dddddd;
206
+ }
207
+
208
+ div.exampleblock > div.content {
209
+ border-left: 3px solid #dddddd;
210
+ padding-left: 0.5em;
211
+ }
212
+
213
+ div.imageblock div.content { padding-left: 0; }
214
+ span.image img { border-style: none; }
215
+ a.image:visited { color: white; }
216
+
217
+ dl {
218
+ margin-top: 0.8em;
219
+ margin-bottom: 0.8em;
220
+ }
221
+ dt {
222
+ margin-top: 0.5em;
223
+ margin-bottom: 0;
224
+ font-style: normal;
225
+ color: navy;
226
+ }
227
+ dd > *:first-child {
228
+ margin-top: 0.1em;
229
+ }
230
+
231
+ ul, ol {
232
+ list-style-position: outside;
233
+ }
234
+ ol.arabic {
235
+ list-style-type: decimal;
236
+ }
237
+ ol.loweralpha {
238
+ list-style-type: lower-alpha;
239
+ }
240
+ ol.upperalpha {
241
+ list-style-type: upper-alpha;
242
+ }
243
+ ol.lowerroman {
244
+ list-style-type: lower-roman;
245
+ }
246
+ ol.upperroman {
247
+ list-style-type: upper-roman;
248
+ }
249
+
250
+ div.compact ul, div.compact ol,
251
+ div.compact p, div.compact p,
252
+ div.compact div, div.compact div {
253
+ margin-top: 0.1em;
254
+ margin-bottom: 0.1em;
255
+ }
256
+
257
+ div.tableblock > table {
258
+ border: 3px solid #527bbd;
259
+ }
260
+ thead, p.table.header {
261
+ font-family: sans-serif;
262
+ font-weight: bold;
263
+ }
264
+ tfoot {
265
+ font-weight: bold;
266
+ }
267
+ td > div.verse {
268
+ white-space: pre;
269
+ }
270
+ p.table {
271
+ margin-top: 0;
272
+ }
273
+ /* Because the table frame attribute is overriden by CSS in most browsers. */
274
+ div.tableblock > table[frame="void"] {
275
+ border-style: none;
276
+ }
277
+ div.tableblock > table[frame="hsides"] {
278
+ border-left-style: none;
279
+ border-right-style: none;
280
+ }
281
+ div.tableblock > table[frame="vsides"] {
282
+ border-top-style: none;
283
+ border-bottom-style: none;
284
+ }
285
+
286
+
287
+ div.hdlist {
288
+ margin-top: 0.8em;
289
+ margin-bottom: 0.8em;
290
+ }
291
+ div.hdlist tr {
292
+ padding-bottom: 15px;
293
+ }
294
+ dt.hdlist1.strong, td.hdlist1.strong {
295
+ font-weight: bold;
296
+ }
297
+ td.hdlist1 {
298
+ vertical-align: top;
299
+ font-style: normal;
300
+ padding-right: 0.8em;
301
+ color: navy;
302
+ }
303
+ td.hdlist2 {
304
+ vertical-align: top;
305
+ }
306
+ div.hdlist.compact tr {
307
+ margin: 0;
308
+ padding-bottom: 0;
309
+ }
310
+
311
+ .comment {
312
+ background: yellow;
313
+ }
314
+
315
+ .footnote, .footnoteref {
316
+ font-size: 0.8em;
317
+ }
318
+
319
+ span.footnote, span.footnoteref {
320
+ vertical-align: super;
321
+ }
322
+
323
+ #footnotes {
324
+ margin: 20px 0 20px 0;
325
+ padding: 7px 0 0 0;
326
+ }
327
+
328
+ #footnotes div.footnote {
329
+ margin: 0 0 5px 0;
330
+ }
331
+
332
+ #footnotes hr {
333
+ border: none;
334
+ border-top: 1px solid silver;
335
+ height: 1px;
336
+ text-align: left;
337
+ margin-left: 0;
338
+ width: 20%;
339
+ min-width: 100px;
340
+ }
341
+
342
+
343
+ @media print {
344
+ div#footer-badges { display: none; }
345
+ }
346
+
347
+ div#toc {
348
+ margin-bottom: 2.5em;
349
+ }
350
+
351
+ div#toctitle {
352
+ color: #527bbd;
353
+ font-family: sans-serif;
354
+ font-size: 1.1em;
355
+ font-weight: bold;
356
+ margin-top: 1.0em;
357
+ margin-bottom: 0.1em;
358
+ }
359
+
360
+ div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
361
+ margin-top: 0;
362
+ margin-bottom: 0;
363
+ }
364
+ div.toclevel2 {
365
+ margin-left: 2em;
366
+ font-size: 0.9em;
367
+ }
368
+ div.toclevel3 {
369
+ margin-left: 4em;
370
+ font-size: 0.9em;
371
+ }
372
+ div.toclevel4 {
373
+ margin-left: 6em;
374
+ font-size: 0.9em;
375
+ }
376
+ /* Overrides for manpage documents */
377
+ h1 {
378
+ padding-top: 0.5em;
379
+ padding-bottom: 0.5em;
380
+ border-top: 2px solid silver;
381
+ border-bottom: 2px solid silver;
382
+ }
383
+ h2 {
384
+ border-style: none;
385
+ }
386
+ div.sectionbody {
387
+ margin-left: 5%;
388
+ }
389
+
390
+ @media print {
391
+ div#toc { display: none; }
392
+ }
393
+
394
+ /* Workarounds for IE6's broken and incomplete CSS2. */
395
+
396
+ div.sidebar-content {
397
+ background: #ffffee;
398
+ border: 1px solid silver;
399
+ padding: 0.5em;
400
+ }
401
+ div.sidebar-title, div.image-title {
402
+ color: #527bbd;
403
+ font-family: sans-serif;
404
+ font-weight: bold;
405
+ margin-top: 0.0em;
406
+ margin-bottom: 0.5em;
407
+ }
408
+
409
+ div.listingblock div.content {
410
+ border: 1px solid silver;
411
+ background: #f4f4f4;
412
+ padding: 0.5em;
413
+ }
414
+
415
+ div.quoteblock-attribution {
416
+ padding-top: 0.5em;
417
+ text-align: right;
418
+ }
419
+
420
+ div.verseblock-content {
421
+ white-space: pre;
422
+ }
423
+ div.verseblock-attribution {
424
+ padding-top: 0.75em;
425
+ text-align: left;
426
+ }
427
+
428
+ div.exampleblock-content {
429
+ border-left: 3px solid #dddddd;
430
+ padding-left: 0.5em;
431
+ }
432
+
433
+ /* IE6 sets dynamically generated links as visited. */
434
+ div#toc a:visited { color: blue; }
435
+ </style>
436
+ <script type="text/javascript">
437
+ /*<![CDATA[*/
438
+ window.onload = function(){asciidoc.footnotes();}
439
+ var asciidoc = { // Namespace.
440
+
441
+ /////////////////////////////////////////////////////////////////////
442
+ // Table Of Contents generator
443
+ /////////////////////////////////////////////////////////////////////
444
+
445
+ /* Author: Mihai Bazon, September 2002
446
+ * http://students.infoiasi.ro/~mishoo
447
+ *
448
+ * Table Of Content generator
449
+ * Version: 0.4
450
+ *
451
+ * Feel free to use this script under the terms of the GNU General Public
452
+ * License, as long as you do not remove or alter this notice.
453
+ */
454
+
455
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
456
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
457
+
458
+ // toclevels = 1..4.
459
+ toc: function (toclevels) {
460
+
461
+ function getText(el) {
462
+ var text = "";
463
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
464
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
465
+ text += i.data;
466
+ else if (i.firstChild != null)
467
+ text += getText(i);
468
+ }
469
+ return text;
470
+ }
471
+
472
+ function TocEntry(el, text, toclevel) {
473
+ this.element = el;
474
+ this.text = text;
475
+ this.toclevel = toclevel;
476
+ }
477
+
478
+ function tocEntries(el, toclevels) {
479
+ var result = new Array;
480
+ var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
481
+ // Function that scans the DOM tree for header elements (the DOM2
482
+ // nodeIterator API would be a better technique but not supported by all
483
+ // browsers).
484
+ var iterate = function (el) {
485
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
486
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
487
+ var mo = re.exec(i.tagName);
488
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
489
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
490
+ }
491
+ iterate(i);
492
+ }
493
+ }
494
+ }
495
+ iterate(el);
496
+ return result;
497
+ }
498
+
499
+ var toc = document.getElementById("toc");
500
+ var entries = tocEntries(document.getElementById("content"), toclevels);
501
+ for (var i = 0; i < entries.length; ++i) {
502
+ var entry = entries[i];
503
+ if (entry.element.id == "")
504
+ entry.element.id = "_toc_" + i;
505
+ var a = document.createElement("a");
506
+ a.href = "#" + entry.element.id;
507
+ a.appendChild(document.createTextNode(entry.text));
508
+ var div = document.createElement("div");
509
+ div.appendChild(a);
510
+ div.className = "toclevel" + entry.toclevel;
511
+ toc.appendChild(div);
512
+ }
513
+ if (entries.length == 0)
514
+ toc.parentNode.removeChild(toc);
515
+ },
516
+
517
+
518
+ /////////////////////////////////////////////////////////////////////
519
+ // Footnotes generator
520
+ /////////////////////////////////////////////////////////////////////
521
+
522
+ /* Based on footnote generation code from:
523
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
524
+ */
525
+
526
+ footnotes: function () {
527
+ var cont = document.getElementById("content");
528
+ var noteholder = document.getElementById("footnotes");
529
+ var spans = cont.getElementsByTagName("span");
530
+ var refs = {};
531
+ var n = 0;
532
+ for (i=0; i<spans.length; i++) {
533
+ if (spans[i].className == "footnote") {
534
+ n++;
535
+ // Use [\s\S] in place of . so multi-line matches work.
536
+ // Because JavaScript has no s (dotall) regex flag.
537
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
538
+ noteholder.innerHTML +=
539
+ "<div class='footnote' id='_footnote_" + n + "'>" +
540
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
541
+ n + "</a>. " + note + "</div>";
542
+ spans[i].innerHTML =
543
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
544
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
545
+ var id =spans[i].getAttribute("id");
546
+ if (id != null) refs["#"+id] = n;
547
+ }
548
+ }
549
+ if (n == 0)
550
+ noteholder.parentNode.removeChild(noteholder);
551
+ else {
552
+ // Process footnoterefs.
553
+ for (i=0; i<spans.length; i++) {
554
+ if (spans[i].className == "footnoteref") {
555
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
556
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
557
+ n = refs[href];
558
+ spans[i].innerHTML =
559
+ "[<a href='#_footnote_" + n +
560
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
561
+ }
562
+ }
563
+ }
564
+ }
565
+
566
+ }
567
+ /*]]>*/
568
+ </script>
569
+ </head>
570
+ <body>
571
+ <div id="header">
572
+ <h1>
573
+ zmq_device(3) Manual Page
574
+ </h1>
575
+ <h2>NAME</h2>
576
+ <div class="sectionbody">
577
+ <p>zmq_device -
578
+ start built-in 0MQ device
579
+ </p>
580
+ </div>
581
+ </div>
582
+ <div id="content">
583
+ <h2 id="_synopsis">SYNOPSIS</h2>
584
+ <div class="sectionbody">
585
+ <div class="paragraph"><p><strong>int zmq_device (int <em>device</em>, const void <em>*frontend</em>, const void <em>*backend</em>);</strong></p></div>
586
+ </div>
587
+ <h2 id="_description">DESCRIPTION</h2>
588
+ <div class="sectionbody">
589
+ <div class="paragraph"><p>The <em>zmq_device()</em> function starts a built-in ØMQ device. The <em>device</em> argument
590
+ is one of:</p></div>
591
+ <div class="dlist"><dl>
592
+ <dt class="hdlist1">
593
+ <em>ZMQ_QUEUE</em>
594
+ </dt>
595
+ <dd>
596
+ <p>
597
+ starts a queue device
598
+ </p>
599
+ </dd>
600
+ <dt class="hdlist1">
601
+ <em>ZMQ_FORWARDER</em>
602
+ </dt>
603
+ <dd>
604
+ <p>
605
+ starts a forwarder device
606
+ </p>
607
+ </dd>
608
+ <dt class="hdlist1">
609
+ <em>ZMQ_STREAMER</em>
610
+ </dt>
611
+ <dd>
612
+ <p>
613
+ starts a streamer device
614
+ </p>
615
+ </dd>
616
+ </dl></div>
617
+ <div class="paragraph"><p>The device connects a frontend socket to a backend socket. Conceptually, data
618
+ flows from frontend to backend. Depending on the socket types, replies may flow
619
+ in the opposite direction.</p></div>
620
+ <div class="paragraph"><p>Before calling <em>zmq_device()</em> you must set any socket options, and connect or
621
+ bind both frontend and backend sockets. The two conventional device models are:</p></div>
622
+ <div class="dlist"><dl>
623
+ <dt class="hdlist1">
624
+ <strong>proxy</strong>
625
+ </dt>
626
+ <dd>
627
+ <p>
628
+ bind frontend socket to an endpoint, and connect backend socket to
629
+ downstream components. A proxy device model does not require changes to
630
+ the downstream topology but that topology is static (any changes require
631
+ reconfiguring the device).
632
+ </p>
633
+ </dd>
634
+ <dt class="hdlist1">
635
+ <strong>broker</strong>
636
+ </dt>
637
+ <dd>
638
+ <p>
639
+ bind frontend socket to one endpoint and bind backend socket to a second
640
+ endpoint. Downstream components must now connect into the device. A broker
641
+ device model allows a dynamic downstream topology (components can come and
642
+ go at any time).
643
+ </p>
644
+ </dd>
645
+ </dl></div>
646
+ <div class="paragraph"><p><em>zmq_device()</em> runs in the current thread and returns only if/when the current
647
+ context is closed.</p></div>
648
+ </div>
649
+ <h2 id="_queue_device">QUEUE DEVICE</h2>
650
+ <div class="sectionbody">
651
+ <div class="paragraph"><p><em>ZMQ_QUEUE</em> creates a shared queue that collects requests from a set of clients,
652
+ and distributes these fairly among a set of services. Requests are fair-queued
653
+ from frontend connections and load-balanced between backend connections.
654
+ Replies automatically return to the client that made the original request.</p></div>
655
+ <div class="paragraph"><p>This device is part of the <em>request-reply</em> pattern. The frontend speaks to
656
+ clients and the backend speaks to services. You should use <em>ZMQ_QUEUE</em> with a
657
+ <em>ZMQ_XREP</em> socket for the frontend and a <em>ZMQ_XREQ</em> socket for the backend.
658
+ Other combinations are not documented.</p></div>
659
+ <div class="paragraph"><p>Refer to <a href="zmq_socket.html">zmq_socket(3)</a> for a description of these socket types.</p></div>
660
+ </div>
661
+ <h2 id="_forwarder_device">FORWARDER DEVICE</h2>
662
+ <div class="sectionbody">
663
+ <div class="paragraph"><p><em>ZMQ_FORWARDER</em> collects messages from a set of publishers and forwards these to
664
+ a set of subscribers. You will generally use this to bridge networks, e.g. read
665
+ on TCP unicast and forward on multicast.</p></div>
666
+ <div class="paragraph"><p>This device is part of the <em>publish-subscribe</em> pattern. The frontend speaks to
667
+ publishers and the backend speaks to subscribers. You should use
668
+ <em>ZMQ_FORWARDER</em> with a <em>ZMQ_SUB</em> socket for the frontend and a <em>ZMQ_PUB</em> socket
669
+ for the backend. Other combinations are not documented.</p></div>
670
+ <div class="paragraph"><p>Refer to <a href="zmq_socket.html">zmq_socket(3)</a> for a description of these socket types.</p></div>
671
+ </div>
672
+ <h2 id="_streamer_device">STREAMER DEVICE</h2>
673
+ <div class="sectionbody">
674
+ <div class="paragraph"><p><em>ZMQ_STREAMER</em> collects tasks from a set of pushers and forwards these to a set
675
+ of pullers. You will generally use this to bridge networks. Messages are
676
+ fair-queued from pushers and load-balanced to pullers.</p></div>
677
+ <div class="paragraph"><p>This device is part of the <em>pipeline</em> pattern. The frontend speaks to pushers
678
+ and the backend speaks to pullers. You should use <em>ZMQ_STREAMER</em> with a
679
+ <em>ZMQ_PULL</em> socket for the frontend and a <em>ZMQ_PUSH</em> socket for the backend.
680
+ Other combinations are not documented.</p></div>
681
+ <div class="paragraph"><p>Refer to <a href="zmq_socket.html">zmq_socket(3)</a> for a description of these socket types.</p></div>
682
+ </div>
683
+ <h2 id="_return_value">RETURN VALUE</h2>
684
+ <div class="sectionbody">
685
+ <div class="paragraph"><p>The <em>zmq_device()</em> function always returns <tt>-1</tt> and <em>errno</em> set to <strong>ETERM</strong> (the
686
+ ØMQ <em>context</em> associated with either of the specified sockets was terminated).</p></div>
687
+ </div>
688
+ <h2 id="_example">EXAMPLE</h2>
689
+ <div class="sectionbody">
690
+ <div class="listingblock">
691
+ <div class="title">Creating a queue broker</div>
692
+ <div class="content">
693
+ <pre><tt>// Create frontend and backend sockets
694
+ void *frontend = zmq_socket (context, ZMQ_XREP);
695
+ assert (backend);
696
+ void *backend = zmq_socket (context, ZMQ_XREQ);
697
+ assert (frontend);
698
+ // Bind both sockets to TCP ports
699
+ assert (zmq_bind (frontend, "tcp://*:5555") == 0);
700
+ assert (zmq_bind (backend, "tcp://*:5556") == 0);
701
+ // Start a queue device
702
+ zmq_device (ZMQ_QUEUE, frontend, backend);</tt></pre>
703
+ </div></div>
704
+ </div>
705
+ <h2 id="_see_also">SEE ALSO</h2>
706
+ <div class="sectionbody">
707
+ <div class="paragraph"><p><a href="zmq_bind.html">zmq_bind(3)</a>
708
+ <a href="zmq_connect.html">zmq_connect(3)</a>
709
+ <a href="zmq_socket.html">zmq_socket(3)</a>
710
+ <a href="zmq.html">zmq(7)</a></p></div>
711
+ </div>
712
+ <h2 id="_authors">AUTHORS</h2>
713
+ <div class="sectionbody">
714
+ <div class="paragraph"><p>This ØMQ manual page was written by Pieter Hintjens &lt;<a href="mailto:ph@imatix.com">ph@imatix.com</a>&gt;</p></div>
715
+ </div>
716
+ <h2 id="_resources">RESOURCES</h2>
717
+ <div class="sectionbody">
718
+ <div class="paragraph"><p>Main web site: <a href="http://www.zeromq.org/">http://www.zeromq.org/</a></p></div>
719
+ <div class="paragraph"><p>Report bugs to the ØMQ development mailing list: &lt;<a href="mailto:zeromq-dev@lists.zeromq.org">zeromq-dev@lists.zeromq.org</a>&gt;</p></div>
720
+ </div>
721
+ <h2 id="_copying">COPYING</h2>
722
+ <div class="sectionbody">
723
+ <div class="paragraph"><p>Free use of this software is granted under the terms of the GNU Lesser General
724
+ Public License (LGPL). For details see the files <tt>COPYING</tt> and <tt>COPYING.LESSER</tt>
725
+ included with the ØMQ distribution.</p></div>
726
+ </div>
727
+ </div>
728
+ <div id="footnotes"><hr /></div>
729
+ <div id="footer">
730
+ <div id="footer-text">
731
+ ØMQ 2.1.4<br />
732
+ Last updated 2011-03-13 18:00:00 CEST
733
+ </div>
734
+ </div>
735
+ </body>
736
+ </html>