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,60 @@
1
+ /*
2
+ Copyright (c) 2007-2011 iMatix Corporation
3
+ Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
4
+
5
+ This file is part of 0MQ.
6
+
7
+ 0MQ is free software; you can redistribute it and/or modify it under
8
+ the terms of the GNU Lesser General Public License as published by
9
+ the Free Software Foundation; either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ 0MQ is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ #ifndef __ZMQ_PULL_HPP_INCLUDED__
22
+ #define __ZMQ_PULL_HPP_INCLUDED__
23
+
24
+ #include "socket_base.hpp"
25
+ #include "fq.hpp"
26
+
27
+ namespace zmq
28
+ {
29
+
30
+ class pull_t : public socket_base_t
31
+ {
32
+ public:
33
+
34
+ pull_t (class ctx_t *parent_, uint32_t tid_);
35
+ ~pull_t ();
36
+
37
+ protected:
38
+
39
+ // Overloads of functions from socket_base_t.
40
+ void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
41
+ const blob_t &peer_identity_);
42
+ int xrecv (zmq_msg_t *msg_, int flags_);
43
+ bool xhas_in ();
44
+
45
+ private:
46
+
47
+ // Hook into the termination process.
48
+ void process_term (int linger_);
49
+
50
+ // Fair queueing object for inbound pipes.
51
+ fq_t fq;
52
+
53
+ pull_t (const pull_t&);
54
+ const pull_t &operator = (const pull_t&);
55
+
56
+ };
57
+
58
+ }
59
+
60
+ #endif
@@ -0,0 +1,62 @@
1
+ /*
2
+ Copyright (c) 2007-2011 iMatix Corporation
3
+ Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
4
+
5
+ This file is part of 0MQ.
6
+
7
+ 0MQ is free software; you can redistribute it and/or modify it under
8
+ the terms of the GNU Lesser General Public License as published by
9
+ the Free Software Foundation; either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ 0MQ is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ #include "../include/zmq.h"
22
+
23
+ #include "push.hpp"
24
+ #include "err.hpp"
25
+ #include "pipe.hpp"
26
+
27
+ zmq::push_t::push_t (class ctx_t *parent_, uint32_t tid_) :
28
+ socket_base_t (parent_, tid_),
29
+ lb (this)
30
+ {
31
+ options.type = ZMQ_PUSH;
32
+ options.requires_in = false;
33
+ options.requires_out = true;
34
+ }
35
+
36
+ zmq::push_t::~push_t ()
37
+ {
38
+ }
39
+
40
+ void zmq::push_t::xattach_pipes (class reader_t *inpipe_,
41
+ class writer_t *outpipe_, const blob_t &peer_identity_)
42
+ {
43
+ zmq_assert (!inpipe_ && outpipe_);
44
+ lb.attach (outpipe_);
45
+ }
46
+
47
+ void zmq::push_t::process_term (int linger_)
48
+ {
49
+ lb.terminate ();
50
+ socket_base_t::process_term (linger_);
51
+ }
52
+
53
+ int zmq::push_t::xsend (zmq_msg_t *msg_, int flags_)
54
+ {
55
+ return lb.send (msg_, flags_);
56
+ }
57
+
58
+ bool zmq::push_t::xhas_out ()
59
+ {
60
+ return lb.has_out ();
61
+ }
62
+
@@ -0,0 +1,59 @@
1
+ /*
2
+ Copyright (c) 2007-2011 iMatix Corporation
3
+ Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
4
+
5
+ This file is part of 0MQ.
6
+
7
+ 0MQ is free software; you can redistribute it and/or modify it under
8
+ the terms of the GNU Lesser General Public License as published by
9
+ the Free Software Foundation; either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ 0MQ is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ #ifndef __ZMQ_PUSH_HPP_INCLUDED__
22
+ #define __ZMQ_PUSH_HPP_INCLUDED__
23
+
24
+ #include "socket_base.hpp"
25
+ #include "lb.hpp"
26
+
27
+ namespace zmq
28
+ {
29
+
30
+ class push_t : public socket_base_t
31
+ {
32
+ public:
33
+
34
+ push_t (class ctx_t *parent_, uint32_t tid_);
35
+ ~push_t ();
36
+
37
+ protected:
38
+
39
+ // Overloads of functions from socket_base_t.
40
+ void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_,
41
+ const blob_t &peer_identity_);
42
+ int xsend (zmq_msg_t *msg_, int flags_);
43
+ bool xhas_out ();
44
+
45
+ private:
46
+
47
+ // Hook into the termination process.
48
+ void process_term (int linger_);
49
+
50
+ // Load balancer managing the outbound pipes.
51
+ lb_t lb;
52
+
53
+ push_t (const push_t&);
54
+ const push_t &operator = (const push_t&);
55
+ };
56
+
57
+ }
58
+
59
+ #endif
@@ -0,0 +1,121 @@
1
+ /*
2
+ Copyright (c) 2007-2011 iMatix Corporation
3
+ Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
4
+
5
+ This file is part of 0MQ.
6
+
7
+ 0MQ is free software; you can redistribute it and/or modify it under
8
+ the terms of the GNU Lesser General Public License as published by
9
+ the Free Software Foundation; either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ 0MQ is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ #include "reaper.hpp"
22
+ #include "socket_base.hpp"
23
+ #include "err.hpp"
24
+
25
+ zmq::reaper_t::reaper_t (class ctx_t *ctx_, uint32_t tid_) :
26
+ object_t (ctx_, tid_),
27
+ sockets (0),
28
+ terminating (false)
29
+ {
30
+ poller = new (std::nothrow) poller_t;
31
+ alloc_assert (poller);
32
+
33
+ mailbox_handle = poller->add_fd (mailbox.get_fd (), this);
34
+ poller->set_pollin (mailbox_handle);
35
+ }
36
+
37
+ zmq::reaper_t::~reaper_t ()
38
+ {
39
+ delete poller;
40
+ }
41
+
42
+ zmq::mailbox_t *zmq::reaper_t::get_mailbox ()
43
+ {
44
+ return &mailbox;
45
+ }
46
+
47
+ void zmq::reaper_t::start ()
48
+ {
49
+ // Start the thread.
50
+ poller->start ();
51
+ }
52
+
53
+ void zmq::reaper_t::stop ()
54
+ {
55
+ send_stop ();
56
+ }
57
+
58
+ void zmq::reaper_t::in_event ()
59
+ {
60
+ while (true) {
61
+
62
+ // Get the next command. If there is none, exit.
63
+ command_t cmd;
64
+ int rc = mailbox.recv (&cmd, false);
65
+ if (rc != 0 && errno == EINTR)
66
+ continue;
67
+ if (rc != 0 && errno == EAGAIN)
68
+ break;
69
+ errno_assert (rc == 0);
70
+
71
+ // Process the command.
72
+ cmd.destination->process_command (cmd);
73
+ }
74
+ }
75
+
76
+ void zmq::reaper_t::out_event ()
77
+ {
78
+ zmq_assert (false);
79
+ }
80
+
81
+ void zmq::reaper_t::timer_event (int id_)
82
+ {
83
+ zmq_assert (false);
84
+ }
85
+
86
+ void zmq::reaper_t::process_stop ()
87
+ {
88
+ terminating = true;
89
+
90
+ // If there are no sockets beig reaped finish immediately.
91
+ if (!sockets) {
92
+ send_done ();
93
+ poller->rm_fd (mailbox_handle);
94
+ poller->stop ();
95
+ }
96
+ }
97
+
98
+ void zmq::reaper_t::process_reap (socket_base_t *socket_)
99
+ {
100
+ // Add the socket to the poller.
101
+ socket_->start_reaping (poller);
102
+
103
+ // Start termination of associated I/O object hierarchy.
104
+ socket_->terminate ();
105
+ socket_->check_destroy ();
106
+
107
+ ++sockets;
108
+ }
109
+
110
+ void zmq::reaper_t::process_reaped ()
111
+ {
112
+ --sockets;
113
+
114
+ // If reaped was already asked to terminate and there are no more sockets,
115
+ // finish immediately.
116
+ if (!sockets && terminating) {
117
+ send_done ();
118
+ poller->rm_fd (mailbox_handle);
119
+ poller->stop ();
120
+ }
121
+ }
@@ -0,0 +1,77 @@
1
+ /*
2
+ Copyright (c) 2007-2011 iMatix Corporation
3
+ Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
4
+
5
+ This file is part of 0MQ.
6
+
7
+ 0MQ is free software; you can redistribute it and/or modify it under
8
+ the terms of the GNU Lesser General Public License as published by
9
+ the Free Software Foundation; either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ 0MQ is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ #ifndef __ZMQ_REAPER_HPP_INCLUDED__
22
+ #define __ZMQ_REAPER_HPP_INCLUDED__
23
+
24
+ #include "object.hpp"
25
+ #include "mailbox.hpp"
26
+ #include "poller.hpp"
27
+ #include "i_poll_events.hpp"
28
+
29
+ namespace zmq
30
+ {
31
+
32
+ class reaper_t : public object_t, public i_poll_events
33
+ {
34
+ public:
35
+
36
+ reaper_t (class ctx_t *ctx_, uint32_t tid_);
37
+ ~reaper_t ();
38
+
39
+ mailbox_t *get_mailbox ();
40
+
41
+ void start ();
42
+ void stop ();
43
+
44
+ // i_poll_events implementation.
45
+ void in_event ();
46
+ void out_event ();
47
+ void timer_event (int id_);
48
+
49
+ private:
50
+
51
+ // Command handlers.
52
+ void process_stop ();
53
+ void process_reap (class socket_base_t *socket_);
54
+ void process_reaped ();
55
+
56
+ // Reaper thread accesses incoming commands via this mailbox.
57
+ mailbox_t mailbox;
58
+
59
+ // Handle associated with mailbox' file descriptor.
60
+ poller_t::handle_t mailbox_handle;
61
+
62
+ // I/O multiplexing is performed using a poller object.
63
+ poller_t *poller;
64
+
65
+ // Number of sockets being reaped at the moment.
66
+ int sockets;
67
+
68
+ // If true, we were already asked to terminate.
69
+ bool terminating;
70
+
71
+ reaper_t (const reaper_t&);
72
+ const reaper_t &operator = (const reaper_t&);
73
+ };
74
+
75
+ }
76
+
77
+ #endif
@@ -0,0 +1,131 @@
1
+ /*
2
+ Copyright (c) 2007-2011 iMatix Corporation
3
+ Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
4
+
5
+ This file is part of 0MQ.
6
+
7
+ 0MQ is free software; you can redistribute it and/or modify it under
8
+ the terms of the GNU Lesser General Public License as published by
9
+ the Free Software Foundation; either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ 0MQ is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General Public License
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+
21
+ #include "../include/zmq.h"
22
+
23
+ #include "rep.hpp"
24
+ #include "err.hpp"
25
+
26
+ zmq::rep_t::rep_t (class ctx_t *parent_, uint32_t tid_) :
27
+ xrep_t (parent_, tid_),
28
+ sending_reply (false),
29
+ request_begins (true)
30
+ {
31
+ options.type = ZMQ_REP;
32
+ }
33
+
34
+ zmq::rep_t::~rep_t ()
35
+ {
36
+ }
37
+
38
+ int zmq::rep_t::xsend (zmq_msg_t *msg_, int flags_)
39
+ {
40
+ // If we are in the middle of receiving a request, we cannot send reply.
41
+ if (!sending_reply) {
42
+ errno = EFSM;
43
+ return -1;
44
+ }
45
+
46
+ bool more = (msg_->flags & ZMQ_MSG_MORE);
47
+
48
+ // Push message to the reply pipe.
49
+ int rc = xrep_t::xsend (msg_, flags_);
50
+ if (rc != 0)
51
+ return rc;
52
+
53
+ // If the reply is complete flip the FSM back to request receiving state.
54
+ if (!more)
55
+ sending_reply = false;
56
+
57
+ return 0;
58
+ }
59
+
60
+ int zmq::rep_t::xrecv (zmq_msg_t *msg_, int flags_)
61
+ {
62
+ // If we are in middle of sending a reply, we cannot receive next request.
63
+ if (sending_reply) {
64
+ errno = EFSM;
65
+ return -1;
66
+ }
67
+
68
+ if (request_begins) {
69
+
70
+ // Copy the backtrace stack to the reply pipe.
71
+ bool bottom = false;
72
+ while (!bottom) {
73
+
74
+ // TODO: What if request can be read but reply pipe is not
75
+ // ready for writing?
76
+
77
+ // Get next part of the backtrace stack.
78
+ int rc = xrep_t::xrecv (msg_, flags_);
79
+ if (rc != 0)
80
+ return rc;
81
+
82
+ if ((msg_->flags & ZMQ_MSG_MORE)) {
83
+ // Empty message part delimits the traceback stack.
84
+ bottom = (zmq_msg_size (msg_) == 0);
85
+
86
+ // Push it to the reply pipe.
87
+ rc = xrep_t::xsend (msg_, flags_);
88
+ zmq_assert (rc == 0);
89
+ }
90
+ else {
91
+ // If the traceback stack is malformed, discard anything
92
+ // already sent to pipe (we're at end of invalid message).
93
+ rc = xrep_t::rollback ();
94
+ zmq_assert (rc == 0);
95
+ }
96
+ }
97
+
98
+ request_begins = false;
99
+ }
100
+
101
+ // Now the routing info is safely stored. Get the first part
102
+ // of the message payload and exit.
103
+ int rc = xrep_t::xrecv (msg_, flags_);
104
+ if (rc != 0)
105
+ return rc;
106
+
107
+ // If whole request is read, flip the FSM to reply-sending state.
108
+ if (!(msg_->flags & ZMQ_MSG_MORE)) {
109
+ sending_reply = true;
110
+ request_begins = true;
111
+ }
112
+
113
+ return 0;
114
+ }
115
+
116
+ bool zmq::rep_t::xhas_in ()
117
+ {
118
+ if (sending_reply)
119
+ return false;
120
+
121
+ return xrep_t::xhas_in ();
122
+ }
123
+
124
+ bool zmq::rep_t::xhas_out ()
125
+ {
126
+ if (!sending_reply)
127
+ return false;
128
+
129
+ return xrep_t::xhas_out ();
130
+ }
131
+