laag-libczmq 4.1.0.0

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 (697) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +57 -0
  3. data/LICENSE.txt +373 -0
  4. data/README.org +34 -0
  5. data/ext/laag/libczmq/extconf.rb +24 -0
  6. data/laag-libczmq.gemspec +21 -0
  7. data/lib/laag/libczmq.rb +30 -0
  8. data/vendor/github.com/zeromq/czmq/.editorconfig +19 -0
  9. data/vendor/github.com/zeromq/czmq/.gitattributes +5 -0
  10. data/vendor/github.com/zeromq/czmq/.github/PULL_REQUEST_TEMPLATE.md +28 -0
  11. data/vendor/github.com/zeromq/czmq/.gitignore +137 -0
  12. data/vendor/github.com/zeromq/czmq/.travis.yml +126 -0
  13. data/vendor/github.com/zeromq/czmq/AUTHORS +69 -0
  14. data/vendor/github.com/zeromq/czmq/CMakeLists.txt +653 -0
  15. data/vendor/github.com/zeromq/czmq/CONTRIBUTING.md +19 -0
  16. data/vendor/github.com/zeromq/czmq/Dockerfile +29 -0
  17. data/vendor/github.com/zeromq/czmq/Findlibsodium.cmake +47 -0
  18. data/vendor/github.com/zeromq/czmq/Findlibzmq.cmake +49 -0
  19. data/vendor/github.com/zeromq/czmq/Findlz4.cmake +49 -0
  20. data/vendor/github.com/zeromq/czmq/Findsystemd.cmake +49 -0
  21. data/vendor/github.com/zeromq/czmq/Finduuid.cmake +49 -0
  22. data/vendor/github.com/zeromq/czmq/INSTALL.cygwin +13 -0
  23. data/vendor/github.com/zeromq/czmq/ISSUES.cygwin +6 -0
  24. data/vendor/github.com/zeromq/czmq/Jenkinsfile +439 -0
  25. data/vendor/github.com/zeromq/czmq/LICENSE +373 -0
  26. data/vendor/github.com/zeromq/czmq/Makefile.am +70 -0
  27. data/vendor/github.com/zeromq/czmq/NEWS +823 -0
  28. data/vendor/github.com/zeromq/czmq/README.cygwin +23 -0
  29. data/vendor/github.com/zeromq/czmq/README.md +9345 -0
  30. data/vendor/github.com/zeromq/czmq/README.txt +512 -0
  31. data/vendor/github.com/zeromq/czmq/Vagrantfile +49 -0
  32. data/vendor/github.com/zeromq/czmq/acinclude.m4 +7 -0
  33. data/vendor/github.com/zeromq/czmq/api/zactor.api +77 -0
  34. data/vendor/github.com/zeromq/czmq/api/zargs.api +110 -0
  35. data/vendor/github.com/zeromq/czmq/api/zarmour.api +103 -0
  36. data/vendor/github.com/zeromq/czmq/api/zcert.api +128 -0
  37. data/vendor/github.com/zeromq/czmq/api/zcertstore.api +80 -0
  38. data/vendor/github.com/zeromq/czmq/api/zchunk.api +171 -0
  39. data/vendor/github.com/zeromq/czmq/api/zclock.api +43 -0
  40. data/vendor/github.com/zeromq/czmq/api/zconfig.api +205 -0
  41. data/vendor/github.com/zeromq/czmq/api/zdigest.api +45 -0
  42. data/vendor/github.com/zeromq/czmq/api/zdir.api +124 -0
  43. data/vendor/github.com/zeromq/czmq/api/zdir_patch.api +62 -0
  44. data/vendor/github.com/zeromq/czmq/api/zfile.api +157 -0
  45. data/vendor/github.com/zeromq/czmq/api/zframe.api +157 -0
  46. data/vendor/github.com/zeromq/czmq/api/zgossip_msg.api +104 -0
  47. data/vendor/github.com/zeromq/czmq/api/zhash.api +184 -0
  48. data/vendor/github.com/zeromq/czmq/api/zhashx.api +295 -0
  49. data/vendor/github.com/zeromq/czmq/api/ziflist.api +73 -0
  50. data/vendor/github.com/zeromq/czmq/api/zlist.api +158 -0
  51. data/vendor/github.com/zeromq/czmq/api/zlistx.api +220 -0
  52. data/vendor/github.com/zeromq/czmq/api/zloop.api +176 -0
  53. data/vendor/github.com/zeromq/czmq/api/zmsg.api +250 -0
  54. data/vendor/github.com/zeromq/czmq/api/zpoller.api +71 -0
  55. data/vendor/github.com/zeromq/czmq/api/zproc.api +247 -0
  56. data/vendor/github.com/zeromq/czmq/api/zsock.api +412 -0
  57. data/vendor/github.com/zeromq/czmq/api/zsock_option.api +847 -0
  58. data/vendor/github.com/zeromq/czmq/api/zstr.api +119 -0
  59. data/vendor/github.com/zeromq/czmq/api/zsys.api +490 -0
  60. data/vendor/github.com/zeromq/czmq/api/ztimerset.api +69 -0
  61. data/vendor/github.com/zeromq/czmq/api/ztrie.api +80 -0
  62. data/vendor/github.com/zeromq/czmq/api/zuuid.api +82 -0
  63. data/vendor/github.com/zeromq/czmq/appveyor.yml +73 -0
  64. data/vendor/github.com/zeromq/czmq/autogen.sh +52 -0
  65. data/vendor/github.com/zeromq/czmq/bindings/jni/.gitignore +8 -0
  66. data/vendor/github.com/zeromq/czmq/bindings/jni/CMakeLists.txt +79 -0
  67. data/vendor/github.com/zeromq/czmq/bindings/jni/Findczmq.cmake +47 -0
  68. data/vendor/github.com/zeromq/czmq/bindings/jni/README.md +130 -0
  69. data/vendor/github.com/zeromq/czmq/bindings/jni/android/CMakeLists.txt +79 -0
  70. data/vendor/github.com/zeromq/czmq/bindings/jni/android/android_toolchain.cmake +52 -0
  71. data/vendor/github.com/zeromq/czmq/bindings/jni/android/build.sh +68 -0
  72. data/vendor/github.com/zeromq/czmq/bindings/jni/build.gradle +151 -0
  73. data/vendor/github.com/zeromq/czmq/bindings/jni/ci_build.sh +96 -0
  74. data/vendor/github.com/zeromq/czmq/bindings/jni/gradle/wrapper/gradle-wrapper.jar +0 -0
  75. data/vendor/github.com/zeromq/czmq/bindings/jni/gradle/wrapper/gradle-wrapper.properties +6 -0
  76. data/vendor/github.com/zeromq/czmq/bindings/jni/gradlew +164 -0
  77. data/vendor/github.com/zeromq/czmq/bindings/jni/gradlew.bat +90 -0
  78. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/.gitignore +8 -0
  79. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/configure.bat +93 -0
  80. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/platform.h +1 -0
  81. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/Common.props +21 -0
  82. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/DLL.props +16 -0
  83. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/Debug.props +29 -0
  84. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/DebugDEXE.props +21 -0
  85. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/DebugDLL.props +20 -0
  86. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/DebugLEXE.props +20 -0
  87. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/DebugLIB.props +21 -0
  88. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/DebugLTCG.props +20 -0
  89. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/DebugSEXE.props +21 -0
  90. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/EXE.props +17 -0
  91. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/LIB.props +16 -0
  92. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/LTCG.props +13 -0
  93. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/Link.props +21 -0
  94. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/Messages.props +15 -0
  95. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/Output.props +30 -0
  96. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/Release.props +41 -0
  97. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/ReleaseDEXE.props +20 -0
  98. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/ReleaseDLL.props +19 -0
  99. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/ReleaseLEXE.props +20 -0
  100. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/ReleaseLIB.props +19 -0
  101. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/ReleaseLTCG.props +19 -0
  102. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/ReleaseSEXE.props +20 -0
  103. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/Win32.props +20 -0
  104. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/properties/x64.props +23 -0
  105. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/resource.h +14 -0
  106. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/resource.rc +94 -0
  107. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2010/build.bat +48 -0
  108. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2010/call_javah.bat +84 -0
  109. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2010/czmq.sln +25 -0
  110. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2010/libczmqjni/libczmqjni.props +69 -0
  111. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2010/libczmqjni/libczmqjni.vcxproj +165 -0
  112. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2010/libczmqjni/libczmqjni.vcxproj.filters +210 -0
  113. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2012/build.bat +48 -0
  114. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2012/call_javah.bat +84 -0
  115. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2012/czmq.sln +25 -0
  116. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2012/libczmqjni/libczmqjni.props +69 -0
  117. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2012/libczmqjni/libczmqjni.vcxproj +165 -0
  118. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2012/libczmqjni/libczmqjni.vcxproj.filters +210 -0
  119. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2013/build.bat +48 -0
  120. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2013/call_javah.bat +84 -0
  121. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2013/czmq.sln +25 -0
  122. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2013/libczmqjni/libczmqjni.props +69 -0
  123. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2013/libczmqjni/libczmqjni.vcxproj +165 -0
  124. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2013/libczmqjni/libczmqjni.vcxproj.filters +210 -0
  125. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2015/build.bat +48 -0
  126. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2015/call_javah.bat +84 -0
  127. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2015/czmq.sln +25 -0
  128. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2015/libczmqjni/libczmqjni.props +69 -0
  129. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2015/libczmqjni/libczmqjni.vcxproj +165 -0
  130. data/vendor/github.com/zeromq/czmq/bindings/jni/msvc/vs2015/libczmqjni/libczmqjni.vcxproj.filters +210 -0
  131. data/vendor/github.com/zeromq/czmq/bindings/jni/settings.gradle +1 -0
  132. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zarmour.c +132 -0
  133. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zcert.c +188 -0
  134. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zcertstore.c +69 -0
  135. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zchunk.c +191 -0
  136. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zclock.c +54 -0
  137. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zconfig.c +252 -0
  138. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zdigest.c +66 -0
  139. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zdir.c +116 -0
  140. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_ZdirPatch.c +88 -0
  141. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zfile.c +186 -0
  142. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zframe.c +199 -0
  143. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zhash.c +174 -0
  144. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zhashx.c +175 -0
  145. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Ziflist.c +112 -0
  146. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zlist.c +135 -0
  147. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zlistx.c +189 -0
  148. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zloop.c +95 -0
  149. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zmsg.c +261 -0
  150. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zpoller.c +74 -0
  151. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zproc.c +278 -0
  152. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zsock.c +1310 -0
  153. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zstr.c +108 -0
  154. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zsys.c +445 -0
  155. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Ztimerset.c +68 -0
  156. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Ztrie.c +86 -0
  157. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/c/org_zeromq_czmq_Zuuid.c +125 -0
  158. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zarmour.java +148 -0
  159. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zcert.java +178 -0
  160. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zcertstore.java +94 -0
  161. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zchunk.java +204 -0
  162. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zclock.java +67 -0
  163. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zconfig.java +253 -0
  164. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zdigest.java +78 -0
  165. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zdir.java +159 -0
  166. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/ZdirPatch.java +96 -0
  167. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zfile.java +217 -0
  168. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zframe.java +212 -0
  169. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zhash.java +223 -0
  170. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zhashx.java +248 -0
  171. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Ziflist.java +124 -0
  172. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zlist.java +171 -0
  173. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zlistx.java +247 -0
  174. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zloop.java +134 -0
  175. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zmsg.java +308 -0
  176. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zpoller.java +105 -0
  177. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zproc.java +331 -0
  178. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zsock.java +1556 -0
  179. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zstr.java +117 -0
  180. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zsys.java +534 -0
  181. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Ztimerset.java +87 -0
  182. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Ztrie.java +102 -0
  183. data/vendor/github.com/zeromq/czmq/bindings/jni/src/main/java/org/zeromq/czmq/Zuuid.java +127 -0
  184. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZarmourTest.java +25 -0
  185. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZcertTest.java +25 -0
  186. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZcertstoreTest.java +25 -0
  187. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZchunkTest.java +25 -0
  188. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZclockTest.java +25 -0
  189. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZconfigTest.java +25 -0
  190. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZdigestTest.java +25 -0
  191. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZdirPatchTest.java +25 -0
  192. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZdirTest.java +25 -0
  193. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZfileTest.java +25 -0
  194. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZframeTest.java +25 -0
  195. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZhashTest.java +25 -0
  196. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZhashxTest.java +25 -0
  197. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZiflistTest.java +25 -0
  198. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZlistTest.java +25 -0
  199. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZlistxTest.java +25 -0
  200. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZloopTest.java +25 -0
  201. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZmsgTest.java +25 -0
  202. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZpollerTest.java +25 -0
  203. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZprocTest.java +25 -0
  204. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZsockTest.java +25 -0
  205. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZstrTest.java +25 -0
  206. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZsysTest.java +25 -0
  207. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZtimersetTest.java +25 -0
  208. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZtrieTest.java +25 -0
  209. data/vendor/github.com/zeromq/czmq/bindings/jni/src/test/java/org/zeromq/czmq/ZuuidTest.java +25 -0
  210. data/vendor/github.com/zeromq/czmq/bindings/lua_ffi/czmq_ffi.lua +4079 -0
  211. data/vendor/github.com/zeromq/czmq/bindings/nodejs/.gitignore +10 -0
  212. data/vendor/github.com/zeromq/czmq/bindings/nodejs/.prebuildrc +2 -0
  213. data/vendor/github.com/zeromq/czmq/bindings/nodejs/README.md +4373 -0
  214. data/vendor/github.com/zeromq/czmq/bindings/nodejs/binding.cc +8324 -0
  215. data/vendor/github.com/zeromq/czmq/bindings/nodejs/binding.gyp +49 -0
  216. data/vendor/github.com/zeromq/czmq/bindings/nodejs/binding.h +952 -0
  217. data/vendor/github.com/zeromq/czmq/bindings/nodejs/build.sh +79 -0
  218. data/vendor/github.com/zeromq/czmq/bindings/nodejs/index.js +39 -0
  219. data/vendor/github.com/zeromq/czmq/bindings/nodejs/package.json +26 -0
  220. data/vendor/github.com/zeromq/czmq/bindings/nodejs/test_binding.js +32 -0
  221. data/vendor/github.com/zeromq/czmq/bindings/python/ci_build.sh +59 -0
  222. data/vendor/github.com/zeromq/czmq/bindings/python/czmq/__init__.py +3 -0
  223. data/vendor/github.com/zeromq/czmq/bindings/python/czmq/_czmq_ctypes.py +8344 -0
  224. data/vendor/github.com/zeromq/czmq/bindings/python/test.py +1078 -0
  225. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/README.md +28 -0
  226. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zactor.py +78 -0
  227. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zargs.py +133 -0
  228. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zarmour.py +124 -0
  229. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zcert.py +132 -0
  230. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zcertstore.py +84 -0
  231. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zchunk.py +192 -0
  232. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zclock.py +59 -0
  233. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zconfig.py +211 -0
  234. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zdigest.py +64 -0
  235. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zdir.py +144 -0
  236. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/ZdirPatch.py +79 -0
  237. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zfile.py +185 -0
  238. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zframe.py +160 -0
  239. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zhash.py +197 -0
  240. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zhashx.py +271 -0
  241. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Ziflist.py +103 -0
  242. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zlist.py +176 -0
  243. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zlistx.py +235 -0
  244. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zloop.py +171 -0
  245. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zmsg.py +250 -0
  246. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zpoller.py +89 -0
  247. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zproc.py +287 -0
  248. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zsock.py +1283 -0
  249. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zstr.py +123 -0
  250. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zsys.py +532 -0
  251. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Ztimerset.py +78 -0
  252. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Ztrie.py +93 -0
  253. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/Zuuid.py +100 -0
  254. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/__init__.py +33 -0
  255. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/_cdefs.inc +4081 -0
  256. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/build.py +345 -0
  257. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/cdefs.py +4086 -0
  258. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/dlopen.py +33 -0
  259. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/czmq_cffi/utils.py +50 -0
  260. data/vendor/github.com/zeromq/czmq/bindings/python_cffi/setup.py +23 -0
  261. data/vendor/github.com/zeromq/czmq/bindings/qml/.gitignore +1 -0
  262. data/vendor/github.com/zeromq/czmq/bindings/qml/README.md +157 -0
  263. data/vendor/github.com/zeromq/czmq/bindings/qml/Rakefile +34 -0
  264. data/vendor/github.com/zeromq/czmq/bindings/qml/qml_czmq_bindings.pro +136 -0
  265. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZactor.cpp +88 -0
  266. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZactor.h +86 -0
  267. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZargs.cpp +121 -0
  268. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZargs.h +105 -0
  269. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZarmour.cpp +135 -0
  270. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZarmour.h +108 -0
  271. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZcert.cpp +166 -0
  272. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZcert.h +122 -0
  273. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZcertstore.cpp +95 -0
  274. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZcertstore.h +93 -0
  275. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZchunk.cpp +214 -0
  276. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZchunk.h +149 -0
  277. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZclock.cpp +67 -0
  278. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZclock.h +77 -0
  279. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZconfig.cpp +255 -0
  280. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZconfig.h +165 -0
  281. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZdigest.cpp +70 -0
  282. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZdigest.h +78 -0
  283. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZdir.cpp +158 -0
  284. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZdir.h +134 -0
  285. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZdirPatch.cpp +89 -0
  286. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZdirPatch.h +84 -0
  287. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZfile.cpp +204 -0
  288. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZfile.h +152 -0
  289. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZframe.cpp +200 -0
  290. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZframe.h +143 -0
  291. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZhash.cpp +219 -0
  292. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZhash.h +174 -0
  293. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZhashx.cpp +308 -0
  294. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZhashx.h +225 -0
  295. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZiflist.cpp +111 -0
  296. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZiflist.h +96 -0
  297. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZlist.cpp +184 -0
  298. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZlist.h +148 -0
  299. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZlistx.cpp +244 -0
  300. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZlistx.h +184 -0
  301. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZloop.cpp +177 -0
  302. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZloop.h +149 -0
  303. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZmsg.cpp +313 -0
  304. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZmsg.h +209 -0
  305. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZpoller.cpp +95 -0
  306. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZpoller.h +97 -0
  307. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZproc.cpp +296 -0
  308. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZproc.h +211 -0
  309. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZsock.cpp +1471 -0
  310. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZsock.h +882 -0
  311. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZstr.cpp +137 -0
  312. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZstr.h +120 -0
  313. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZsys.cpp +541 -0
  314. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZsys.h +373 -0
  315. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZtimerset.cpp +84 -0
  316. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZtimerset.h +86 -0
  317. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZtrie.cpp +101 -0
  318. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZtrie.h +95 -0
  319. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZuuid.cpp +116 -0
  320. data/vendor/github.com/zeromq/czmq/bindings/qml/src/QmlZuuid.h +99 -0
  321. data/vendor/github.com/zeromq/czmq/bindings/qml/src/qml_czmq_plugin.h +174 -0
  322. data/vendor/github.com/zeromq/czmq/bindings/qml/src/qmldir +2 -0
  323. data/vendor/github.com/zeromq/czmq/bindings/qml/test/tst_QmlCZMQ.qml +16 -0
  324. data/vendor/github.com/zeromq/czmq/bindings/qt/README.md +87 -0
  325. data/vendor/github.com/zeromq/czmq/bindings/qt/buildlib/buildlib.pro +36 -0
  326. data/vendor/github.com/zeromq/czmq/bindings/qt/common.pri +20 -0
  327. data/vendor/github.com/zeromq/czmq/bindings/qt/config.pri +1 -0
  328. data/vendor/github.com/zeromq/czmq/bindings/qt/qczmq.pro +13 -0
  329. data/vendor/github.com/zeromq/czmq/bindings/qt/selftest/main.cpp +57 -0
  330. data/vendor/github.com/zeromq/czmq/bindings/qt/selftest/selftest.pro +19 -0
  331. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qczmq.h +96 -0
  332. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qczmq.pri +81 -0
  333. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzactor.cpp +98 -0
  334. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzactor.h +61 -0
  335. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzargs.cpp +130 -0
  336. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzargs.h +72 -0
  337. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzarmour.cpp +162 -0
  338. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzarmour.h +83 -0
  339. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzcert.cpp +191 -0
  340. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzcert.h +97 -0
  341. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzcertstore.cpp +105 -0
  342. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzcertstore.h +68 -0
  343. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzchunk.cpp +250 -0
  344. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzchunk.h +124 -0
  345. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzclock.cpp +78 -0
  346. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzclock.h +52 -0
  347. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzconfig.cpp +292 -0
  348. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzconfig.h +140 -0
  349. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzdigest.cpp +80 -0
  350. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzdigest.h +53 -0
  351. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzdir.cpp +176 -0
  352. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzdir.h +109 -0
  353. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzdirpatch.cpp +101 -0
  354. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzdirpatch.h +59 -0
  355. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzfile.cpp +243 -0
  356. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzfile.h +127 -0
  357. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzframe.cpp +231 -0
  358. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzframe.h +118 -0
  359. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzhash.cpp +250 -0
  360. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzhash.h +149 -0
  361. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzhashx.cpp +350 -0
  362. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzhashx.h +200 -0
  363. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qziflist.cpp +133 -0
  364. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qziflist.h +71 -0
  365. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzlist.cpp +220 -0
  366. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzlist.h +123 -0
  367. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzlistx.cpp +296 -0
  368. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzlistx.h +159 -0
  369. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzloop.cpp +211 -0
  370. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzloop.h +124 -0
  371. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzmsg.cpp +354 -0
  372. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzmsg.h +184 -0
  373. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzpoller.cpp +100 -0
  374. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzpoller.h +67 -0
  375. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzproc.cpp +365 -0
  376. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzproc.h +186 -0
  377. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzsock.cpp +1719 -0
  378. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzsock.h +815 -0
  379. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzstr.cpp +128 -0
  380. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzstr.h +78 -0
  381. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzsys.cpp +600 -0
  382. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzsys.h +321 -0
  383. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qztimerset.cpp +98 -0
  384. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qztimerset.h +61 -0
  385. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qztrie.cpp +117 -0
  386. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qztrie.h +70 -0
  387. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzuuid.cpp +135 -0
  388. data/vendor/github.com/zeromq/czmq/bindings/qt/src/qzuuid.h +74 -0
  389. data/vendor/github.com/zeromq/czmq/bindings/ruby/Rakefile +8 -0
  390. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi.rb +875 -0
  391. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/version.rb +15 -0
  392. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zactor.rb +219 -0
  393. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zargs.rb +259 -0
  394. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zarmour.rb +286 -0
  395. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zcert.rb +304 -0
  396. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zcertstore.rb +224 -0
  397. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zchunk.rb +388 -0
  398. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zclock.rb +140 -0
  399. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zconfig.rb +462 -0
  400. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zdigest.rb +156 -0
  401. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zdir.rb +283 -0
  402. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zdir_patch.rb +194 -0
  403. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zfile.rb +361 -0
  404. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zframe.rb +360 -0
  405. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zhash.rb +386 -0
  406. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zhashx.rb +617 -0
  407. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/ziflist.rb +219 -0
  408. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zlist.rb +365 -0
  409. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zlistx.rb +478 -0
  410. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zloop.rb +396 -0
  411. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zmsg.rb +515 -0
  412. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zpoller.rb +194 -0
  413. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zproc.rb +497 -0
  414. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zsock.rb +4673 -0
  415. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zstr.rb +242 -0
  416. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zsys.rb +836 -0
  417. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/ztimerset.rb +203 -0
  418. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/ztrie.rb +221 -0
  419. data/vendor/github.com/zeromq/czmq/bindings/ruby/lib/czmq/ffi/zuuid.rb +227 -0
  420. data/vendor/github.com/zeromq/czmq/bindings/ruby/spec/ffi_spec.rb +15 -0
  421. data/vendor/github.com/zeromq/czmq/bindings/ruby/spec/spec_helper.rb +8 -0
  422. data/vendor/github.com/zeromq/czmq/builds/android/android_build_helper.sh +298 -0
  423. data/vendor/github.com/zeromq/czmq/builds/android/build.sh +94 -0
  424. data/vendor/github.com/zeromq/czmq/builds/android/ci_build.sh +41 -0
  425. data/vendor/github.com/zeromq/czmq/builds/check_zproject/ci_build.sh +52 -0
  426. data/vendor/github.com/zeromq/czmq/builds/check_zproto/ci_build.sh +23 -0
  427. data/vendor/github.com/zeromq/czmq/builds/cmake/ci_build.sh +93 -0
  428. data/vendor/github.com/zeromq/czmq/builds/cygwin/Makefile.cygwin +32 -0
  429. data/vendor/github.com/zeromq/czmq/builds/docs/ci_build.sh +24 -0
  430. data/vendor/github.com/zeromq/czmq/builds/gyp/.gitignore +5 -0
  431. data/vendor/github.com/zeromq/czmq/builds/gyp/README.md +33 -0
  432. data/vendor/github.com/zeromq/czmq/builds/gyp/platform.h +46 -0
  433. data/vendor/github.com/zeromq/czmq/builds/gyp/project.gyp +195 -0
  434. data/vendor/github.com/zeromq/czmq/builds/mingw32/Makefile.mingw32 +33 -0
  435. data/vendor/github.com/zeromq/czmq/builds/mingw32/platform.h +0 -0
  436. data/vendor/github.com/zeromq/czmq/builds/msvc/.gitignore +8 -0
  437. data/vendor/github.com/zeromq/czmq/builds/msvc/configure.bat +93 -0
  438. data/vendor/github.com/zeromq/czmq/builds/msvc/nuget/package.bat +14 -0
  439. data/vendor/github.com/zeromq/czmq/builds/msvc/nuget/package.nuspec +92 -0
  440. data/vendor/github.com/zeromq/czmq/builds/msvc/nuget/package.targets +128 -0
  441. data/vendor/github.com/zeromq/czmq/builds/msvc/nuget/package.xml +29 -0
  442. data/vendor/github.com/zeromq/czmq/builds/msvc/platform.h +1 -0
  443. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/Common.props +21 -0
  444. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/DLL.props +16 -0
  445. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/Debug.props +29 -0
  446. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/DebugDEXE.props +21 -0
  447. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/DebugDLL.props +20 -0
  448. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/DebugLEXE.props +20 -0
  449. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/DebugLIB.props +21 -0
  450. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/DebugLTCG.props +20 -0
  451. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/DebugSEXE.props +21 -0
  452. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/EXE.props +17 -0
  453. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/LIB.props +16 -0
  454. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/LTCG.props +13 -0
  455. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/Link.props +21 -0
  456. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/Messages.props +15 -0
  457. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/Output.props +30 -0
  458. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/Release.props +41 -0
  459. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/ReleaseDEXE.props +20 -0
  460. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/ReleaseDLL.props +19 -0
  461. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/ReleaseLEXE.props +20 -0
  462. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/ReleaseLIB.props +19 -0
  463. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/ReleaseLTCG.props +19 -0
  464. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/ReleaseSEXE.props +20 -0
  465. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/Win32.props +20 -0
  466. data/vendor/github.com/zeromq/czmq/builds/msvc/properties/x64.props +23 -0
  467. data/vendor/github.com/zeromq/czmq/builds/msvc/resource.h +14 -0
  468. data/vendor/github.com/zeromq/czmq/builds/msvc/resource.rc +94 -0
  469. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2008/czmq/czmq.sln +65 -0
  470. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2008/czmq/czmq.vcproj +1411 -0
  471. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/.gitignore +1 -0
  472. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/build.bat +129 -0
  473. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/czmq.import.props +59 -0
  474. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/czmq.sln +81 -0
  475. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/czmq_selftest/czmq_selftest.props +75 -0
  476. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/czmq_selftest/czmq_selftest.vcxproj +146 -0
  477. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/libczmq/libczmq.import.xml +29 -0
  478. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/libczmq/libczmq.props +81 -0
  479. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/libczmq/libczmq.vcxproj +215 -0
  480. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/libczmq/libczmq.vcxproj.filters +203 -0
  481. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/test_randof/test_randof.props +75 -0
  482. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/test_randof/test_randof.vcxproj +146 -0
  483. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/zmakecert/zmakecert.props +75 -0
  484. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/zmakecert/zmakecert.vcxproj +146 -0
  485. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/zsp/zsp.props +75 -0
  486. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2010/zsp/zsp.vcxproj +146 -0
  487. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/.gitignore +1 -0
  488. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/build.bat +129 -0
  489. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/czmq.import.props +59 -0
  490. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/czmq.sln +81 -0
  491. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/czmq_selftest/czmq_selftest.props +75 -0
  492. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/czmq_selftest/czmq_selftest.vcxproj +146 -0
  493. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/libczmq/libczmq.import.xml +29 -0
  494. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/libczmq/libczmq.props +81 -0
  495. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/libczmq/libczmq.vcxproj +215 -0
  496. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/libczmq/libczmq.vcxproj.filters +203 -0
  497. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/test_randof/test_randof.props +75 -0
  498. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/test_randof/test_randof.vcxproj +146 -0
  499. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/zmakecert/zmakecert.props +75 -0
  500. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/zmakecert/zmakecert.vcxproj +146 -0
  501. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/zsp/zsp.props +75 -0
  502. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2012/zsp/zsp.vcxproj +146 -0
  503. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/build.bat +129 -0
  504. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/czmq.import.props +59 -0
  505. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/czmq.sln +81 -0
  506. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/czmq_selftest/czmq_selftest.props +75 -0
  507. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/czmq_selftest/czmq_selftest.vcxproj +146 -0
  508. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/libczmq/libczmq.import.xml +29 -0
  509. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/libczmq/libczmq.props +81 -0
  510. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/libczmq/libczmq.vcxproj +215 -0
  511. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/libczmq/libczmq.vcxproj.filters +203 -0
  512. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/test_randof/test_randof.props +75 -0
  513. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/test_randof/test_randof.vcxproj +146 -0
  514. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/zmakecert/zmakecert.props +75 -0
  515. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/zmakecert/zmakecert.vcxproj +146 -0
  516. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/zsp/zsp.props +75 -0
  517. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2013/zsp/zsp.vcxproj +146 -0
  518. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/build.bat +129 -0
  519. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/czmq.import.props +59 -0
  520. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/czmq.sln +81 -0
  521. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/czmq_selftest/czmq_selftest.props +75 -0
  522. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/czmq_selftest/czmq_selftest.vcxproj +146 -0
  523. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/libczmq/libczmq.import.xml +29 -0
  524. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/libczmq/libczmq.props +81 -0
  525. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/libczmq/libczmq.vcxproj +215 -0
  526. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/libczmq/libczmq.vcxproj.filters +203 -0
  527. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/test_randof/test_randof.props +75 -0
  528. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/test_randof/test_randof.vcxproj +146 -0
  529. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/zmakecert/zmakecert.props +75 -0
  530. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/zmakecert/zmakecert.vcxproj +146 -0
  531. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/zsp/zsp.props +75 -0
  532. data/vendor/github.com/zeromq/czmq/builds/msvc/vs2015/zsp/zsp.vcxproj +146 -0
  533. data/vendor/github.com/zeromq/czmq/builds/nuget/czmq.autobuild +49 -0
  534. data/vendor/github.com/zeromq/czmq/builds/nuget/readme.nuget +18 -0
  535. data/vendor/github.com/zeromq/czmq/builds/rpi/.gitignore +8 -0
  536. data/vendor/github.com/zeromq/czmq/builds/rpi/README.md +62 -0
  537. data/vendor/github.com/zeromq/czmq/builds/rpi/build.sh +142 -0
  538. data/vendor/github.com/zeromq/czmq/builds/rpi/build_image.sh +32 -0
  539. data/vendor/github.com/zeromq/czmq/builds/rpi/prepare_img.sh +111 -0
  540. data/vendor/github.com/zeromq/czmq/builds/stable_zmq/ci_build.sh +62 -0
  541. data/vendor/github.com/zeromq/czmq/builds/valgrind/ci_build.sh +43 -0
  542. data/vendor/github.com/zeromq/czmq/ci_build.sh +317 -0
  543. data/vendor/github.com/zeromq/czmq/ci_deploy.sh +29 -0
  544. data/vendor/github.com/zeromq/czmq/ci_deploy_obs.sh +23 -0
  545. data/vendor/github.com/zeromq/czmq/configure.ac +856 -0
  546. data/vendor/github.com/zeromq/czmq/doc/.gitignore +91 -0
  547. data/vendor/github.com/zeromq/czmq/doc/Makefile.am +222 -0
  548. data/vendor/github.com/zeromq/czmq/doc/asciidoc.conf +64 -0
  549. data/vendor/github.com/zeromq/czmq/doc/czmq.adoc +51 -0
  550. data/vendor/github.com/zeromq/czmq/doc/czmq.txt +380 -0
  551. data/vendor/github.com/zeromq/czmq/doc/mkman +217 -0
  552. data/vendor/github.com/zeromq/czmq/doc/mkmans +15 -0
  553. data/vendor/github.com/zeromq/czmq/doc/wdput +43 -0
  554. data/vendor/github.com/zeromq/czmq/examples/security/LICENSE +18 -0
  555. data/vendor/github.com/zeromq/czmq/examples/security/README.txt +9 -0
  556. data/vendor/github.com/zeromq/czmq/examples/security/grasslands.c +32 -0
  557. data/vendor/github.com/zeromq/czmq/examples/security/hello.c +13 -0
  558. data/vendor/github.com/zeromq/czmq/examples/security/ironhouse.c +64 -0
  559. data/vendor/github.com/zeromq/czmq/examples/security/ironhouse2.c +123 -0
  560. data/vendor/github.com/zeromq/czmq/examples/security/ironhouse2_v2.c +107 -0
  561. data/vendor/github.com/zeromq/czmq/examples/security/passwords +2 -0
  562. data/vendor/github.com/zeromq/czmq/examples/security/stonehouse.c +59 -0
  563. data/vendor/github.com/zeromq/czmq/examples/security/strawhouse.c +49 -0
  564. data/vendor/github.com/zeromq/czmq/examples/security/woodhouse.c +47 -0
  565. data/vendor/github.com/zeromq/czmq/images/README_1.png +0 -0
  566. data/vendor/github.com/zeromq/czmq/include/.gitignore +1 -0
  567. data/vendor/github.com/zeromq/czmq/include/czmq.h +39 -0
  568. data/vendor/github.com/zeromq/czmq/include/czmq_library.h +190 -0
  569. data/vendor/github.com/zeromq/czmq/include/czmq_prelude.h +735 -0
  570. data/vendor/github.com/zeromq/czmq/include/test_zgossip.h +44 -0
  571. data/vendor/github.com/zeromq/czmq/include/zactor.h +94 -0
  572. data/vendor/github.com/zeromq/czmq/include/zargs.h +134 -0
  573. data/vendor/github.com/zeromq/czmq/include/zarmour.h +114 -0
  574. data/vendor/github.com/zeromq/czmq/include/zauth.h +100 -0
  575. data/vendor/github.com/zeromq/czmq/include/zbeacon.h +86 -0
  576. data/vendor/github.com/zeromq/czmq/include/zcert.h +133 -0
  577. data/vendor/github.com/zeromq/czmq/include/zcertstore.h +101 -0
  578. data/vendor/github.com/zeromq/czmq/include/zchunk.h +163 -0
  579. data/vendor/github.com/zeromq/czmq/include/zclock.h +73 -0
  580. data/vendor/github.com/zeromq/czmq/include/zconfig.h +199 -0
  581. data/vendor/github.com/zeromq/czmq/include/zdigest.h +65 -0
  582. data/vendor/github.com/zeromq/czmq/include/zdir.h +149 -0
  583. data/vendor/github.com/zeromq/czmq/include/zdir_patch.h +82 -0
  584. data/vendor/github.com/zeromq/czmq/include/zfile.h +185 -0
  585. data/vendor/github.com/zeromq/czmq/include/zframe.h +177 -0
  586. data/vendor/github.com/zeromq/czmq/include/zgossip.h +95 -0
  587. data/vendor/github.com/zeromq/czmq/include/zhash.h +183 -0
  588. data/vendor/github.com/zeromq/czmq/include/zhashx.h +279 -0
  589. data/vendor/github.com/zeromq/czmq/include/ziflist.h +98 -0
  590. data/vendor/github.com/zeromq/czmq/include/zlist.h +158 -0
  591. data/vendor/github.com/zeromq/czmq/include/zlistx.h +205 -0
  592. data/vendor/github.com/zeromq/czmq/include/zloop.h +163 -0
  593. data/vendor/github.com/zeromq/czmq/include/zmonitor.h +73 -0
  594. data/vendor/github.com/zeromq/czmq/include/zmsg.h +280 -0
  595. data/vendor/github.com/zeromq/czmq/include/zpoller.h +87 -0
  596. data/vendor/github.com/zeromq/czmq/include/zproc.h +270 -0
  597. data/vendor/github.com/zeromq/czmq/include/zproxy.h +111 -0
  598. data/vendor/github.com/zeromq/czmq/include/zrex.h +82 -0
  599. data/vendor/github.com/zeromq/czmq/include/zsock.h +1209 -0
  600. data/vendor/github.com/zeromq/czmq/include/zstr.h +135 -0
  601. data/vendor/github.com/zeromq/czmq/include/zsys.h +439 -0
  602. data/vendor/github.com/zeromq/czmq/include/ztimerset.h +90 -0
  603. data/vendor/github.com/zeromq/czmq/include/ztrie.h +106 -0
  604. data/vendor/github.com/zeromq/czmq/include/zuuid.h +96 -0
  605. data/vendor/github.com/zeromq/czmq/issues/README.md +6 -0
  606. data/vendor/github.com/zeromq/czmq/issues/c +520 -0
  607. data/vendor/github.com/zeromq/czmq/issues/issue-407.c +146 -0
  608. data/vendor/github.com/zeromq/czmq/license.xml +9 -0
  609. data/vendor/github.com/zeromq/czmq/mkdoc +7 -0
  610. data/vendor/github.com/zeromq/czmq/model/chkopts.pl +47 -0
  611. data/vendor/github.com/zeromq/czmq/model/rename_class +42 -0
  612. data/vendor/github.com/zeromq/czmq/packaging/debian/changelog +5 -0
  613. data/vendor/github.com/zeromq/czmq/packaging/debian/compat +1 -0
  614. data/vendor/github.com/zeromq/czmq/packaging/debian/control +86 -0
  615. data/vendor/github.com/zeromq/czmq/packaging/debian/copyright +13 -0
  616. data/vendor/github.com/zeromq/czmq/packaging/debian/czmq.dsc.obs +20 -0
  617. data/vendor/github.com/zeromq/czmq/packaging/debian/czmq.install +2 -0
  618. data/vendor/github.com/zeromq/czmq/packaging/debian/czmq.manpages +1 -0
  619. data/vendor/github.com/zeromq/czmq/packaging/debian/format +1 -0
  620. data/vendor/github.com/zeromq/czmq/packaging/debian/libczmq-dev.install +4 -0
  621. data/vendor/github.com/zeromq/czmq/packaging/debian/libczmq-dev.manpages +2 -0
  622. data/vendor/github.com/zeromq/czmq/packaging/debian/libczmq4.install +1 -0
  623. data/vendor/github.com/zeromq/czmq/packaging/debian/rules +96 -0
  624. data/vendor/github.com/zeromq/czmq/packaging/dist/gitlog2changelog.py +125 -0
  625. data/vendor/github.com/zeromq/czmq/packaging/obs/_service +91 -0
  626. data/vendor/github.com/zeromq/czmq/packaging/redhat/czmq.spec +202 -0
  627. data/vendor/github.com/zeromq/czmq/project.gyp +121 -0
  628. data/vendor/github.com/zeromq/czmq/project.xml +99 -0
  629. data/vendor/github.com/zeromq/czmq/setup.py +9 -0
  630. data/vendor/github.com/zeromq/czmq/src/.gitignore +20 -0
  631. data/vendor/github.com/zeromq/czmq/src/.valgrind.supp +33 -0
  632. data/vendor/github.com/zeromq/czmq/src/CMakeLists-local.txt +22 -0
  633. data/vendor/github.com/zeromq/czmq/src/Makemodule-local.am +15 -0
  634. data/vendor/github.com/zeromq/czmq/src/Makemodule.am +353 -0
  635. data/vendor/github.com/zeromq/czmq/src/czmq_classes.h +388 -0
  636. data/vendor/github.com/zeromq/czmq/src/czmq_private_selftest.c +40 -0
  637. data/vendor/github.com/zeromq/czmq/src/czmq_selftest.c +220 -0
  638. data/vendor/github.com/zeromq/czmq/src/foreign/sha1/sha1.h +76 -0
  639. data/vendor/github.com/zeromq/czmq/src/foreign/sha1/sha1.inc_c +335 -0
  640. data/vendor/github.com/zeromq/czmq/src/foreign/slre/readme.txt +83 -0
  641. data/vendor/github.com/zeromq/czmq/src/foreign/slre/slre.h +92 -0
  642. data/vendor/github.com/zeromq/czmq/src/foreign/slre/slre.inc_c +660 -0
  643. data/vendor/github.com/zeromq/czmq/src/libczmq.pc.in +24 -0
  644. data/vendor/github.com/zeromq/czmq/src/python_cffi.inc +17 -0
  645. data/vendor/github.com/zeromq/czmq/src/selftest-ro/.gitkeep +0 -0
  646. data/vendor/github.com/zeromq/czmq/src/selftest.cfg +5 -0
  647. data/vendor/github.com/zeromq/czmq/src/sockopts.gsl +36 -0
  648. data/vendor/github.com/zeromq/czmq/src/sockopts.xml +193 -0
  649. data/vendor/github.com/zeromq/czmq/src/test_randof.c +182 -0
  650. data/vendor/github.com/zeromq/czmq/src/test_zgossip.c +188 -0
  651. data/vendor/github.com/zeromq/czmq/src/valgrind.supp +14 -0
  652. data/vendor/github.com/zeromq/czmq/src/zactor.c +338 -0
  653. data/vendor/github.com/zeromq/czmq/src/zargs.c +289 -0
  654. data/vendor/github.com/zeromq/czmq/src/zarmour.c +941 -0
  655. data/vendor/github.com/zeromq/czmq/src/zauth.c +821 -0
  656. data/vendor/github.com/zeromq/czmq/src/zbeacon.c +651 -0
  657. data/vendor/github.com/zeromq/czmq/src/zcert.c +557 -0
  658. data/vendor/github.com/zeromq/czmq/src/zcertstore.c +407 -0
  659. data/vendor/github.com/zeromq/czmq/src/zchunk.c +609 -0
  660. data/vendor/github.com/zeromq/czmq/src/zclock.c +237 -0
  661. data/vendor/github.com/zeromq/czmq/src/zconfig.c +1369 -0
  662. data/vendor/github.com/zeromq/czmq/src/zdigest.c +163 -0
  663. data/vendor/github.com/zeromq/czmq/src/zdir.c +1138 -0
  664. data/vendor/github.com/zeromq/czmq/src/zdir_patch.c +227 -0
  665. data/vendor/github.com/zeromq/czmq/src/zfile.c +920 -0
  666. data/vendor/github.com/zeromq/czmq/src/zframe.c +756 -0
  667. data/vendor/github.com/zeromq/czmq/src/zgossip.c +689 -0
  668. data/vendor/github.com/zeromq/czmq/src/zgossip.xml +57 -0
  669. data/vendor/github.com/zeromq/czmq/src/zgossip_engine.inc +1008 -0
  670. data/vendor/github.com/zeromq/czmq/src/zgossip_msg.bnf +43 -0
  671. data/vendor/github.com/zeromq/czmq/src/zgossip_msg.c +688 -0
  672. data/vendor/github.com/zeromq/czmq/src/zgossip_msg.h +127 -0
  673. data/vendor/github.com/zeromq/czmq/src/zgossip_msg.xml +46 -0
  674. data/vendor/github.com/zeromq/czmq/src/zhash.c +956 -0
  675. data/vendor/github.com/zeromq/czmq/src/zhash_primes.inc +329 -0
  676. data/vendor/github.com/zeromq/czmq/src/zhashx.c +1369 -0
  677. data/vendor/github.com/zeromq/czmq/src/ziflist.c +517 -0
  678. data/vendor/github.com/zeromq/czmq/src/zlist.c +634 -0
  679. data/vendor/github.com/zeromq/czmq/src/zlistx.c +753 -0
  680. data/vendor/github.com/zeromq/czmq/src/zloop.c +1000 -0
  681. data/vendor/github.com/zeromq/czmq/src/zmakecert.c +64 -0
  682. data/vendor/github.com/zeromq/czmq/src/zmonitor.c +447 -0
  683. data/vendor/github.com/zeromq/czmq/src/zmsg.c +1258 -0
  684. data/vendor/github.com/zeromq/czmq/src/zpoller.c +397 -0
  685. data/vendor/github.com/zeromq/czmq/src/zproc.c +1160 -0
  686. data/vendor/github.com/zeromq/czmq/src/zproxy.c +791 -0
  687. data/vendor/github.com/zeromq/czmq/src/zrex.c +310 -0
  688. data/vendor/github.com/zeromq/czmq/src/zsock.c +2207 -0
  689. data/vendor/github.com/zeromq/czmq/src/zsock_option.gsl +404 -0
  690. data/vendor/github.com/zeromq/czmq/src/zsock_option.inc +3946 -0
  691. data/vendor/github.com/zeromq/czmq/src/zsp.c +118 -0
  692. data/vendor/github.com/zeromq/czmq/src/zstr.c +548 -0
  693. data/vendor/github.com/zeromq/czmq/src/zsys.c +2225 -0
  694. data/vendor/github.com/zeromq/czmq/src/ztimerset.c +227 -0
  695. data/vendor/github.com/zeromq/czmq/src/ztrie.c +809 -0
  696. data/vendor/github.com/zeromq/czmq/src/zuuid.c +344 -0
  697. metadata +780 -0
@@ -0,0 +1,25 @@
1
+ /*
2
+ ################################################################################
3
+ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
4
+ # Read the zproject/README.md for information about making permanent changes. #
5
+ ################################################################################
6
+ */
7
+ package org.zeromq.czmq;
8
+
9
+ import org.junit.Assert;
10
+ import org.junit.Test;
11
+
12
+ public class ZsysTest {
13
+ static {
14
+ try {
15
+ System.loadLibrary ("czmqjni");
16
+ }
17
+ catch (Exception e) {
18
+ System.exit (-1);
19
+ }
20
+ }
21
+ @Test
22
+ public void test () {
23
+ Zsys.test (false);
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ /*
2
+ ################################################################################
3
+ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
4
+ # Read the zproject/README.md for information about making permanent changes. #
5
+ ################################################################################
6
+ */
7
+ package org.zeromq.czmq;
8
+
9
+ import org.junit.Assert;
10
+ import org.junit.Test;
11
+
12
+ public class ZtimersetTest {
13
+ static {
14
+ try {
15
+ System.loadLibrary ("czmqjni");
16
+ }
17
+ catch (Exception e) {
18
+ System.exit (-1);
19
+ }
20
+ }
21
+ @Test
22
+ public void test () {
23
+ Ztimerset.test (false);
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ /*
2
+ ################################################################################
3
+ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
4
+ # Read the zproject/README.md for information about making permanent changes. #
5
+ ################################################################################
6
+ */
7
+ package org.zeromq.czmq;
8
+
9
+ import org.junit.Assert;
10
+ import org.junit.Test;
11
+
12
+ public class ZtrieTest {
13
+ static {
14
+ try {
15
+ System.loadLibrary ("czmqjni");
16
+ }
17
+ catch (Exception e) {
18
+ System.exit (-1);
19
+ }
20
+ }
21
+ @Test
22
+ public void test () {
23
+ Ztrie.test (false);
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ /*
2
+ ################################################################################
3
+ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
4
+ # Read the zproject/README.md for information about making permanent changes. #
5
+ ################################################################################
6
+ */
7
+ package org.zeromq.czmq;
8
+
9
+ import org.junit.Assert;
10
+ import org.junit.Test;
11
+
12
+ public class ZuuidTest {
13
+ static {
14
+ try {
15
+ System.loadLibrary ("czmqjni");
16
+ }
17
+ catch (Exception e) {
18
+ System.exit (-1);
19
+ }
20
+ }
21
+ @Test
22
+ public void test () {
23
+ Zuuid.test (false);
24
+ }
25
+ }
@@ -0,0 +1,4079 @@
1
+ --------------------------------------------------------------------------------
2
+ -- THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY -
3
+ -- Read the zproject/README.md for information about making permanent changes. -
4
+ --------------------------------------------------------------------------------
5
+
6
+ czmq_ffi = {}
7
+ czmq_ffi.ffi = require ("ffi")
8
+
9
+ -- typedefs simulating C standard library
10
+ -- see https://github.com/eliben/pycparser/blob/master/utils/fake_libc_include/_fake_defines.h
11
+ czmq_ffi.ffi.cdef [[
12
+ typedef struct __FILE FILE;
13
+ typedef int time_t;
14
+ typedef int off_t;
15
+ ]]
16
+
17
+ -- czmq_prelude.h
18
+ czmq_ffi.ffi.cdef [[
19
+ typedef unsigned char byte;
20
+ typedef int SOCKET;
21
+ ]]
22
+ czmq_ffi.ffi.cdef [[
23
+ typedef struct _zactor_t zactor_t;
24
+ typedef struct _zsock_t zsock_t;
25
+ typedef struct _zmsg_t zmsg_t;
26
+ typedef struct _zargs_t zargs_t;
27
+ typedef struct _zarmour_t zarmour_t;
28
+ typedef struct _zchunk_t zchunk_t;
29
+ typedef struct _char_t char_t;
30
+ typedef struct _zcert_t zcert_t;
31
+ typedef struct _zlist_t zlist_t;
32
+ typedef struct _zcertstore_t zcertstore_t;
33
+ typedef struct _zlistx_t zlistx_t;
34
+ typedef struct _zframe_t zframe_t;
35
+ typedef struct _zclock_t zclock_t;
36
+ typedef struct _msecs_t msecs_t;
37
+ typedef struct _zconfig_t zconfig_t;
38
+ typedef struct _zdigest_t zdigest_t;
39
+ typedef struct _zdir_t zdir_t;
40
+ typedef struct _zhash_t zhash_t;
41
+ typedef struct _zdir_patch_t zdir_patch_t;
42
+ typedef struct _zfile_t zfile_t;
43
+ typedef struct _zhashx_t zhashx_t;
44
+ typedef struct _ziflist_t ziflist_t;
45
+ typedef struct _zloop_t zloop_t;
46
+ typedef struct _zmq_pollitem_t zmq_pollitem_t;
47
+ typedef struct _zpoller_t zpoller_t;
48
+ typedef struct _zproc_t zproc_t;
49
+ typedef struct _va_list_t va_list_t;
50
+ typedef struct _socket_t socket_t;
51
+ typedef struct _zstr_t zstr_t;
52
+ typedef struct _zsys_t zsys_t;
53
+ typedef struct _ztimerset_t ztimerset_t;
54
+ typedef struct _ztrie_t ztrie_t;
55
+ typedef struct _zuuid_t zuuid_t;
56
+ // Actors get a pipe and arguments from caller
57
+ typedef void (zactor_fn) (
58
+ zsock_t *pipe, void *args);
59
+
60
+ // Function to be called on zactor_destroy. Default behavior is to send zmsg_t with string "$TERM" in a first frame.
61
+ //
62
+ // An example - to send $KTHXBAI string
63
+ //
64
+ // if (zstr_send (self->pipe, "$KTHXBAI") == 0)
65
+ // zsock_wait (self->pipe);
66
+ typedef void (zactor_destructor_fn) (
67
+ zactor_t *self);
68
+
69
+ // Loaders retrieve certificates from an arbitrary source.
70
+ typedef void (zcertstore_loader) (
71
+ zcertstore_t *self);
72
+
73
+ // Destructor for loader state.
74
+ typedef void (zcertstore_destructor) (
75
+ void **self_p);
76
+
77
+ //
78
+ typedef int (zconfig_fct) (
79
+ zconfig_t *self, void *arg, int level);
80
+
81
+ // Callback function for zhash_freefn method
82
+ typedef void (zhash_free_fn) (
83
+ void *data);
84
+
85
+ // Destroy an item
86
+ typedef void (zhashx_destructor_fn) (
87
+ void **item);
88
+
89
+ // Duplicate an item
90
+ typedef void * (zhashx_duplicator_fn) (
91
+ const void *item);
92
+
93
+ // Compare two items, for sorting
94
+ typedef int (zhashx_comparator_fn) (
95
+ const void *item1, const void *item2);
96
+
97
+ // Destroy an item.
98
+ typedef void (zhashx_free_fn) (
99
+ void *data);
100
+
101
+ // Hash function for keys.
102
+ typedef size_t (zhashx_hash_fn) (
103
+ const void *key);
104
+
105
+ // Serializes an item to a longstr.
106
+ // The caller takes ownership of the newly created object.
107
+ typedef char * (zhashx_serializer_fn) (
108
+ const void *item);
109
+
110
+ // Deserializes a longstr into an item.
111
+ // The caller takes ownership of the newly created object.
112
+ typedef void * (zhashx_deserializer_fn) (
113
+ const char *item_str);
114
+
115
+ // Comparison function e.g. for sorting and removing.
116
+ typedef int (zlist_compare_fn) (
117
+ void *item1, void *item2);
118
+
119
+ // Callback function for zlist_freefn method
120
+ typedef void (zlist_free_fn) (
121
+ void *data);
122
+
123
+ // Destroy an item
124
+ typedef void (zlistx_destructor_fn) (
125
+ void **item);
126
+
127
+ // Duplicate an item
128
+ typedef void * (zlistx_duplicator_fn) (
129
+ const void *item);
130
+
131
+ // Compare two items, for sorting
132
+ typedef int (zlistx_comparator_fn) (
133
+ const void *item1, const void *item2);
134
+
135
+ // Callback function for reactor socket activity
136
+ typedef int (zloop_reader_fn) (
137
+ zloop_t *loop, zsock_t *reader, void *arg);
138
+
139
+ // Callback function for reactor events (low-level)
140
+ typedef int (zloop_fn) (
141
+ zloop_t *loop, zmq_pollitem_t *item, void *arg);
142
+
143
+ // Callback for reactor timer events
144
+ typedef int (zloop_timer_fn) (
145
+ zloop_t *loop, int timer_id, void *arg);
146
+
147
+ // Callback for interrupt signal handler
148
+ typedef void (zsys_handler_fn) (
149
+ int signal_value);
150
+
151
+ // Callback function for timer event.
152
+ typedef void (ztimerset_fn) (
153
+ int timer_id, void *arg);
154
+
155
+ // Callback function for ztrie_node to destroy node data.
156
+ typedef void (ztrie_destroy_data_fn) (
157
+ void **data);
158
+
159
+ // CLASS: zactor
160
+ // Create a new actor passing arbitrary arguments reference.
161
+ zactor_t *
162
+ zactor_new (zactor_fn task, void *args);
163
+
164
+ // Destroy an actor.
165
+ void
166
+ zactor_destroy (zactor_t **self_p);
167
+
168
+ // Send a zmsg message to the actor, take ownership of the message
169
+ // and destroy when it has been sent.
170
+ int
171
+ zactor_send (zactor_t *self, zmsg_t **msg_p);
172
+
173
+ // Receive a zmsg message from the actor. Returns NULL if the actor
174
+ // was interrupted before the message could be received, or if there
175
+ // was a timeout on the actor.
176
+ zmsg_t *
177
+ zactor_recv (zactor_t *self);
178
+
179
+ // Probe the supplied object, and report if it looks like a zactor_t.
180
+ bool
181
+ zactor_is (void *self);
182
+
183
+ // Probe the supplied reference. If it looks like a zactor_t instance,
184
+ // return the underlying libzmq actor handle; else if it looks like
185
+ // a libzmq actor handle, return the supplied value.
186
+ void *
187
+ zactor_resolve (void *self);
188
+
189
+ // Return the actor's zsock handle. Use this when you absolutely need
190
+ // to work with the zsock instance rather than the actor.
191
+ zsock_t *
192
+ zactor_sock (zactor_t *self);
193
+
194
+ // Change default destructor by custom function. Actor MUST be able to handle new message instead of default $TERM.
195
+ void
196
+ zactor_set_destructor (zactor_t *self, zactor_destructor_fn destructor);
197
+
198
+ // Self test of this class.
199
+ void
200
+ zactor_test (bool verbose);
201
+
202
+ // CLASS: zargs
203
+ // Create a new zargs from command line arguments.
204
+ zargs_t *
205
+ zargs_new (int argc, char **argv);
206
+
207
+ // Destroy zargs instance.
208
+ void
209
+ zargs_destroy (zargs_t **self_p);
210
+
211
+ // Return program name (argv[0])
212
+ const char *
213
+ zargs_progname (zargs_t *self);
214
+
215
+ // Return number of positional arguments
216
+ size_t
217
+ zargs_arguments (zargs_t *self);
218
+
219
+ // Return first positional argument or NULL
220
+ const char *
221
+ zargs_first (zargs_t *self);
222
+
223
+ // Return next positional argument or NULL
224
+ const char *
225
+ zargs_next (zargs_t *self);
226
+
227
+ // Return first named parameter value, or NULL if there are no named
228
+ // parameters, or value for which zargs_param_empty (arg) returns true.
229
+ const char *
230
+ zargs_param_first (zargs_t *self);
231
+
232
+ // Return next named parameter value, or NULL if there are no named
233
+ // parameters, or value for which zargs_param_empty (arg) returns true.
234
+ const char *
235
+ zargs_param_next (zargs_t *self);
236
+
237
+ // Return current parameter name, or NULL if there are no named
238
+ // parameters.
239
+ const char *
240
+ zargs_param_name (zargs_t *self);
241
+
242
+ // Return value of named parameter, NULL if no given parameter has
243
+ // been specified, or special value for wich zargs_param_empty ()
244
+ // returns true.
245
+ const char *
246
+ zargs_param_lookup (zargs_t *self, const char *keys);
247
+
248
+ // Return value of named parameter(s), NULL if no given parameter has
249
+ // been specified, or special value for wich zargs_param_empty ()
250
+ // returns true.
251
+ const char *
252
+ zargs_param_lookupx (zargs_t *self, const char *keys, ...);
253
+
254
+ // Returns true if there are --help -h arguments
255
+ bool
256
+ zargs_has_help (zargs_t *self);
257
+
258
+ // Returns true if parameter did not have a value
259
+ bool
260
+ zargs_param_empty (const char *arg);
261
+
262
+ // Print an instance of zargs.
263
+ void
264
+ zargs_print (zargs_t *self);
265
+
266
+ // Self test of this class.
267
+ void
268
+ zargs_test (bool verbose);
269
+
270
+ // CLASS: zarmour
271
+ // Create a new zarmour
272
+ zarmour_t *
273
+ zarmour_new (void);
274
+
275
+ // Destroy the zarmour
276
+ void
277
+ zarmour_destroy (zarmour_t **self_p);
278
+
279
+ // Encode a stream of bytes into an armoured string. Returns the armoured
280
+ // string, or NULL if there was insufficient memory available to allocate
281
+ // a new string.
282
+ char *
283
+ zarmour_encode (zarmour_t *self, const byte *data, size_t size);
284
+
285
+ // Decode an armoured string into a chunk. The decoded output is
286
+ // null-terminated, so it may be treated as a string, if that's what
287
+ // it was prior to encoding.
288
+ zchunk_t *
289
+ zarmour_decode (zarmour_t *self, const char *data);
290
+
291
+ // Get the mode property.
292
+ int
293
+ zarmour_mode (zarmour_t *self);
294
+
295
+ // Get printable string for mode.
296
+ const char *
297
+ zarmour_mode_str (zarmour_t *self);
298
+
299
+ // Set the mode property.
300
+ void
301
+ zarmour_set_mode (zarmour_t *self, int mode);
302
+
303
+ // Return true if padding is turned on.
304
+ bool
305
+ zarmour_pad (zarmour_t *self);
306
+
307
+ // Turn padding on or off. Default is on.
308
+ void
309
+ zarmour_set_pad (zarmour_t *self, bool pad);
310
+
311
+ // Get the padding character.
312
+ char
313
+ zarmour_pad_char (zarmour_t *self);
314
+
315
+ // Set the padding character.
316
+ void
317
+ zarmour_set_pad_char (zarmour_t *self, char pad_char);
318
+
319
+ // Return if splitting output into lines is turned on. Default is off.
320
+ bool
321
+ zarmour_line_breaks (zarmour_t *self);
322
+
323
+ // Turn splitting output into lines on or off.
324
+ void
325
+ zarmour_set_line_breaks (zarmour_t *self, bool line_breaks);
326
+
327
+ // Get the line length used for splitting lines.
328
+ size_t
329
+ zarmour_line_length (zarmour_t *self);
330
+
331
+ // Set the line length used for splitting lines.
332
+ void
333
+ zarmour_set_line_length (zarmour_t *self, size_t line_length);
334
+
335
+ // Print properties of object
336
+ void
337
+ zarmour_print (zarmour_t *self);
338
+
339
+ // Self test of this class.
340
+ void
341
+ zarmour_test (bool verbose);
342
+
343
+ // CLASS: zcert
344
+ // Create and initialize a new certificate in memory
345
+ zcert_t *
346
+ zcert_new (void);
347
+
348
+ // Accepts public/secret key pair from caller
349
+ zcert_t *
350
+ zcert_new_from (const byte *public_key, const byte *secret_key);
351
+
352
+ // Accepts public/secret key text pair from caller
353
+ zcert_t *
354
+ zcert_new_from_txt (const char *public_txt, const char *secret_txt);
355
+
356
+ // Load certificate from file
357
+ zcert_t *
358
+ zcert_load (const char *filename);
359
+
360
+ // Destroy a certificate in memory
361
+ void
362
+ zcert_destroy (zcert_t **self_p);
363
+
364
+ // Return public part of key pair as 32-byte binary string
365
+ const byte *
366
+ zcert_public_key (zcert_t *self);
367
+
368
+ // Return secret part of key pair as 32-byte binary string
369
+ const byte *
370
+ zcert_secret_key (zcert_t *self);
371
+
372
+ // Return public part of key pair as Z85 armored string
373
+ const char *
374
+ zcert_public_txt (zcert_t *self);
375
+
376
+ // Return secret part of key pair as Z85 armored string
377
+ const char *
378
+ zcert_secret_txt (zcert_t *self);
379
+
380
+ // Set certificate metadata from formatted string.
381
+ void
382
+ zcert_set_meta (zcert_t *self, const char *name, const char *format, ...);
383
+
384
+ // Unset certificate metadata.
385
+ void
386
+ zcert_unset_meta (zcert_t *self, const char *name);
387
+
388
+ // Get metadata value from certificate; if the metadata value doesn't
389
+ // exist, returns NULL.
390
+ const char *
391
+ zcert_meta (zcert_t *self, const char *name);
392
+
393
+ // Get list of metadata fields from certificate. Caller is responsible for
394
+ // destroying list. Caller should not modify the values of list items.
395
+ zlist_t *
396
+ zcert_meta_keys (zcert_t *self);
397
+
398
+ // Save full certificate (public + secret) to file for persistent storage
399
+ // This creates one public file and one secret file (filename + "_secret").
400
+ int
401
+ zcert_save (zcert_t *self, const char *filename);
402
+
403
+ // Save public certificate only to file for persistent storage
404
+ int
405
+ zcert_save_public (zcert_t *self, const char *filename);
406
+
407
+ // Save secret certificate only to file for persistent storage
408
+ int
409
+ zcert_save_secret (zcert_t *self, const char *filename);
410
+
411
+ // Apply certificate to socket, i.e. use for CURVE security on socket.
412
+ // If certificate was loaded from public file, the secret key will be
413
+ // undefined, and this certificate will not work successfully.
414
+ void
415
+ zcert_apply (zcert_t *self, void *socket);
416
+
417
+ // Return copy of certificate; if certificate is NULL or we exhausted
418
+ // heap memory, returns NULL.
419
+ zcert_t *
420
+ zcert_dup (zcert_t *self);
421
+
422
+ // Return true if two certificates have the same keys
423
+ bool
424
+ zcert_eq (zcert_t *self, zcert_t *compare);
425
+
426
+ // Print certificate contents to stdout
427
+ void
428
+ zcert_print (zcert_t *self);
429
+
430
+ // Self test of this class
431
+ void
432
+ zcert_test (bool verbose);
433
+
434
+ // CLASS: zcertstore
435
+ // Create a new certificate store from a disk directory, loading and
436
+ // indexing all certificates in that location. The directory itself may be
437
+ // absent, and created later, or modified at any time. The certificate store
438
+ // is automatically refreshed on any zcertstore_lookup() call. If the
439
+ // location is specified as NULL, creates a pure-memory store, which you
440
+ // can work with by inserting certificates at runtime.
441
+ zcertstore_t *
442
+ zcertstore_new (const char *location);
443
+
444
+ // Destroy a certificate store object in memory. Does not affect anything
445
+ // stored on disk.
446
+ void
447
+ zcertstore_destroy (zcertstore_t **self_p);
448
+
449
+ // Override the default disk loader with a custom loader fn.
450
+ void
451
+ zcertstore_set_loader (zcertstore_t *self, zcertstore_loader loader, zcertstore_destructor destructor, void *state);
452
+
453
+ // Look up certificate by public key, returns zcert_t object if found,
454
+ // else returns NULL. The public key is provided in Z85 text format.
455
+ zcert_t *
456
+ zcertstore_lookup (zcertstore_t *self, const char *public_key);
457
+
458
+ // Insert certificate into certificate store in memory. Note that this
459
+ // does not save the certificate to disk. To do that, use zcert_save()
460
+ // directly on the certificate. Takes ownership of zcert_t object.
461
+ void
462
+ zcertstore_insert (zcertstore_t *self, zcert_t **cert_p);
463
+
464
+ // Empty certificate hashtable. This wrapper exists to be friendly to bindings,
465
+ // which don't usually have access to struct internals.
466
+ void
467
+ zcertstore_empty (zcertstore_t *self);
468
+
469
+ // Print list of certificates in store to logging facility
470
+ void
471
+ zcertstore_print (zcertstore_t *self);
472
+
473
+ // Return a list of all the certificates in the store.
474
+ // The caller takes ownership of the zlistx_t object and is responsible
475
+ // for destroying it. The caller does not take ownership of the zcert_t
476
+ // objects.
477
+ zlistx_t *
478
+ zcertstore_certs (zcertstore_t *self);
479
+
480
+ // Self test of this class
481
+ void
482
+ zcertstore_test (bool verbose);
483
+
484
+ // CLASS: zchunk
485
+ // Create a new chunk of the specified size. If you specify the data, it
486
+ // is copied into the chunk. If you do not specify the data, the chunk is
487
+ // allocated and left empty, and you can then add data using zchunk_append.
488
+ zchunk_t *
489
+ zchunk_new (const void *data, size_t size);
490
+
491
+ // Destroy a chunk
492
+ void
493
+ zchunk_destroy (zchunk_t **self_p);
494
+
495
+ // Resizes chunk max_size as requested; chunk_cur size is set to zero
496
+ void
497
+ zchunk_resize (zchunk_t *self, size_t size);
498
+
499
+ // Return chunk cur size
500
+ size_t
501
+ zchunk_size (zchunk_t *self);
502
+
503
+ // Return chunk max size
504
+ size_t
505
+ zchunk_max_size (zchunk_t *self);
506
+
507
+ // Return chunk data
508
+ byte *
509
+ zchunk_data (zchunk_t *self);
510
+
511
+ // Set chunk data from user-supplied data; truncate if too large. Data may
512
+ // be null. Returns actual size of chunk
513
+ size_t
514
+ zchunk_set (zchunk_t *self, const void *data, size_t size);
515
+
516
+ // Fill chunk data from user-supplied octet
517
+ size_t
518
+ zchunk_fill (zchunk_t *self, byte filler, size_t size);
519
+
520
+ // Append user-supplied data to chunk, return resulting chunk size. If the
521
+ // data would exceeded the available space, it is truncated. If you want to
522
+ // grow the chunk to accommodate new data, use the zchunk_extend method.
523
+ size_t
524
+ zchunk_append (zchunk_t *self, const void *data, size_t size);
525
+
526
+ // Append user-supplied data to chunk, return resulting chunk size. If the
527
+ // data would exceeded the available space, the chunk grows in size.
528
+ size_t
529
+ zchunk_extend (zchunk_t *self, const void *data, size_t size);
530
+
531
+ // Copy as much data from 'source' into the chunk as possible; returns the
532
+ // new size of chunk. If all data from 'source' is used, returns exhausted
533
+ // on the source chunk. Source can be consumed as many times as needed until
534
+ // it is exhausted. If source was already exhausted, does not change chunk.
535
+ size_t
536
+ zchunk_consume (zchunk_t *self, zchunk_t *source);
537
+
538
+ // Returns true if the chunk was exhausted by consume methods, or if the
539
+ // chunk has a size of zero.
540
+ bool
541
+ zchunk_exhausted (zchunk_t *self);
542
+
543
+ // Read chunk from an open file descriptor
544
+ zchunk_t *
545
+ zchunk_read (FILE *handle, size_t bytes);
546
+
547
+ // Write chunk to an open file descriptor
548
+ int
549
+ zchunk_write (zchunk_t *self, FILE *handle);
550
+
551
+ // Try to slurp an entire file into a chunk. Will read up to maxsize of
552
+ // the file. If maxsize is 0, will attempt to read the entire file and
553
+ // fail with an assertion if that cannot fit into memory. Returns a new
554
+ // chunk containing the file data, or NULL if the file could not be read.
555
+ zchunk_t *
556
+ zchunk_slurp (const char *filename, size_t maxsize);
557
+
558
+ // Create copy of chunk, as new chunk object. Returns a fresh zchunk_t
559
+ // object, or null if there was not enough heap memory. If chunk is null,
560
+ // returns null.
561
+ zchunk_t *
562
+ zchunk_dup (zchunk_t *self);
563
+
564
+ // Return chunk data encoded as printable hex string. Caller must free
565
+ // string when finished with it.
566
+ char *
567
+ zchunk_strhex (zchunk_t *self);
568
+
569
+ // Return chunk data copied into freshly allocated string
570
+ // Caller must free string when finished with it.
571
+ char *
572
+ zchunk_strdup (zchunk_t *self);
573
+
574
+ // Return TRUE if chunk body is equal to string, excluding terminator
575
+ bool
576
+ zchunk_streq (zchunk_t *self, const char *string);
577
+
578
+ // Transform zchunk into a zframe that can be sent in a message.
579
+ zframe_t *
580
+ zchunk_pack (zchunk_t *self);
581
+
582
+ // Transform a zframe into a zchunk.
583
+ zchunk_t *
584
+ zchunk_unpack (zframe_t *frame);
585
+
586
+ // Calculate SHA1 digest for chunk, using zdigest class.
587
+ const char *
588
+ zchunk_digest (zchunk_t *self);
589
+
590
+ // Dump chunk to FILE stream, for debugging and tracing.
591
+ void
592
+ zchunk_fprint (zchunk_t *self, FILE *file);
593
+
594
+ // Dump message to stderr, for debugging and tracing.
595
+ // See zchunk_fprint for details
596
+ void
597
+ zchunk_print (zchunk_t *self);
598
+
599
+ // Probe the supplied object, and report if it looks like a zchunk_t.
600
+ bool
601
+ zchunk_is (void *self);
602
+
603
+ // Self test of this class.
604
+ void
605
+ zchunk_test (bool verbose);
606
+
607
+ // CLASS: zclock
608
+ // Sleep for a number of milliseconds
609
+ void
610
+ zclock_sleep (int msecs);
611
+
612
+ // Return current system clock as milliseconds. Note that this clock can
613
+ // jump backwards (if the system clock is changed) so is unsafe to use for
614
+ // timers and time offsets. Use zclock_mono for that instead.
615
+ int64_t
616
+ zclock_time (void);
617
+
618
+ // Return current monotonic clock in milliseconds. Use this when you compute
619
+ // time offsets. The monotonic clock is not affected by system changes and
620
+ // so will never be reset backwards, unlike a system clock.
621
+ int64_t
622
+ zclock_mono (void);
623
+
624
+ // Return current monotonic clock in microseconds. Use this when you compute
625
+ // time offsets. The monotonic clock is not affected by system changes and
626
+ // so will never be reset backwards, unlike a system clock.
627
+ int64_t
628
+ zclock_usecs (void);
629
+
630
+ // Return formatted date/time as fresh string. Free using zstr_free().
631
+ char *
632
+ zclock_timestr (void);
633
+
634
+ // Self test of this class.
635
+ void
636
+ zclock_test (bool verbose);
637
+
638
+ // CLASS: zconfig
639
+ // Create new config item
640
+ zconfig_t *
641
+ zconfig_new (const char *name, zconfig_t *parent);
642
+
643
+ // Destroy a config item and all its children
644
+ void
645
+ zconfig_destroy (zconfig_t **self_p);
646
+
647
+ // Load a config tree from a specified ZPL text file; returns a zconfig_t
648
+ // reference for the root, if the file exists and is readable. Returns NULL
649
+ // if the file does not exist.
650
+ zconfig_t *
651
+ zconfig_load (const char *filename);
652
+
653
+ // Equivalent to zconfig_load, taking a format string instead of a fixed
654
+ // filename.
655
+ zconfig_t *
656
+ zconfig_loadf (const char *format, ...);
657
+
658
+ // Return name of config item
659
+ char *
660
+ zconfig_name (zconfig_t *self);
661
+
662
+ // Return value of config item
663
+ char *
664
+ zconfig_value (zconfig_t *self);
665
+
666
+ // Insert or update configuration key with value
667
+ void
668
+ zconfig_put (zconfig_t *self, const char *path, const char *value);
669
+
670
+ // Equivalent to zconfig_put, accepting a format specifier and variable
671
+ // argument list, instead of a single string value.
672
+ void
673
+ zconfig_putf (zconfig_t *self, const char *path, const char *format, ...);
674
+
675
+ // Get value for config item into a string value; leading slash is optional
676
+ // and ignored.
677
+ char *
678
+ zconfig_get (zconfig_t *self, const char *path, const char *default_value);
679
+
680
+ // Set config item name, name may be NULL
681
+ void
682
+ zconfig_set_name (zconfig_t *self, const char *name);
683
+
684
+ // Set new value for config item. The new value may be a string, a printf
685
+ // format, or NULL. Note that if string may possibly contain '%', or if it
686
+ // comes from an insecure source, you must use '%s' as the format, followed
687
+ // by the string.
688
+ void
689
+ zconfig_set_value (zconfig_t *self, const char *format, ...);
690
+
691
+ // Find our first child, if any
692
+ zconfig_t *
693
+ zconfig_child (zconfig_t *self);
694
+
695
+ // Find our first sibling, if any
696
+ zconfig_t *
697
+ zconfig_next (zconfig_t *self);
698
+
699
+ // Find a config item along a path; leading slash is optional and ignored.
700
+ zconfig_t *
701
+ zconfig_locate (zconfig_t *self, const char *path);
702
+
703
+ // Locate the last config item at a specified depth
704
+ zconfig_t *
705
+ zconfig_at_depth (zconfig_t *self, int level);
706
+
707
+ // Execute a callback for each config item in the tree; returns zero if
708
+ // successful, else -1.
709
+ int
710
+ zconfig_execute (zconfig_t *self, zconfig_fct handler, void *arg);
711
+
712
+ // Add comment to config item before saving to disk. You can add as many
713
+ // comment lines as you like. If you use a null format, all comments are
714
+ // deleted.
715
+ void
716
+ zconfig_set_comment (zconfig_t *self, const char *format, ...);
717
+
718
+ // Return comments of config item, as zlist.
719
+ zlist_t *
720
+ zconfig_comments (zconfig_t *self);
721
+
722
+ // Save a config tree to a specified ZPL text file, where a filename
723
+ // "-" means dump to standard output.
724
+ int
725
+ zconfig_save (zconfig_t *self, const char *filename);
726
+
727
+ // Equivalent to zconfig_save, taking a format string instead of a fixed
728
+ // filename.
729
+ int
730
+ zconfig_savef (zconfig_t *self, const char *format, ...);
731
+
732
+ // Report filename used during zconfig_load, or NULL if none
733
+ const char *
734
+ zconfig_filename (zconfig_t *self);
735
+
736
+ // Reload config tree from same file that it was previously loaded from.
737
+ // Returns 0 if OK, -1 if there was an error (and then does not change
738
+ // existing data).
739
+ int
740
+ zconfig_reload (zconfig_t **self_p);
741
+
742
+ // Load a config tree from a memory chunk
743
+ zconfig_t *
744
+ zconfig_chunk_load (zchunk_t *chunk);
745
+
746
+ // Save a config tree to a new memory chunk
747
+ zchunk_t *
748
+ zconfig_chunk_save (zconfig_t *self);
749
+
750
+ // Load a config tree from a null-terminated string
751
+ zconfig_t *
752
+ zconfig_str_load (const char *string);
753
+
754
+ // Save a config tree to a new null terminated string
755
+ char *
756
+ zconfig_str_save (zconfig_t *self);
757
+
758
+ // Return true if a configuration tree was loaded from a file and that
759
+ // file has changed in since the tree was loaded.
760
+ bool
761
+ zconfig_has_changed (zconfig_t *self);
762
+
763
+ // Destroy subtree (all children)
764
+ void
765
+ zconfig_remove_subtree (zconfig_t *self);
766
+
767
+ // Destroy node and subtree (all children)
768
+ void
769
+ zconfig_remove (zconfig_t **self_p);
770
+
771
+ // Print the config file to open stream
772
+ void
773
+ zconfig_fprint (zconfig_t *self, FILE *file);
774
+
775
+ // Print properties of object
776
+ void
777
+ zconfig_print (zconfig_t *self);
778
+
779
+ // Self test of this class
780
+ void
781
+ zconfig_test (bool verbose);
782
+
783
+ // CLASS: zdigest
784
+ // Constructor - creates new digest object, which you use to build up a
785
+ // digest by repeatedly calling zdigest_update() on chunks of data.
786
+ zdigest_t *
787
+ zdigest_new (void);
788
+
789
+ // Destroy a digest object
790
+ void
791
+ zdigest_destroy (zdigest_t **self_p);
792
+
793
+ // Add buffer into digest calculation
794
+ void
795
+ zdigest_update (zdigest_t *self, const byte *buffer, size_t length);
796
+
797
+ // Return final digest hash data. If built without crypto support,
798
+ // returns NULL.
799
+ const byte *
800
+ zdigest_data (zdigest_t *self);
801
+
802
+ // Return final digest hash size
803
+ size_t
804
+ zdigest_size (zdigest_t *self);
805
+
806
+ // Return digest as printable hex string; caller should not modify nor
807
+ // free this string. After calling this, you may not use zdigest_update()
808
+ // on the same digest. If built without crypto support, returns NULL.
809
+ char *
810
+ zdigest_string (zdigest_t *self);
811
+
812
+ // Self test of this class.
813
+ void
814
+ zdigest_test (bool verbose);
815
+
816
+ // CLASS: zdir
817
+ // Create a new directory item that loads in the full tree of the specified
818
+ // path, optionally located under some parent path. If parent is "-", then
819
+ // loads only the top-level directory, and does not use parent as a path.
820
+ zdir_t *
821
+ zdir_new (const char *path, const char *parent);
822
+
823
+ // Destroy a directory tree and all children it contains.
824
+ void
825
+ zdir_destroy (zdir_t **self_p);
826
+
827
+ // Return directory path
828
+ const char *
829
+ zdir_path (zdir_t *self);
830
+
831
+ // Return last modification time for directory.
832
+ time_t
833
+ zdir_modified (zdir_t *self);
834
+
835
+ // Return total hierarchy size, in bytes of data contained in all files
836
+ // in the directory tree.
837
+ off_t
838
+ zdir_cursize (zdir_t *self);
839
+
840
+ // Return directory count
841
+ size_t
842
+ zdir_count (zdir_t *self);
843
+
844
+ // Returns a sorted list of zfile objects; Each entry in the list is a pointer
845
+ // to a zfile_t item already allocated in the zdir tree. Do not destroy the
846
+ // original zdir tree until you are done with this list.
847
+ zlist_t *
848
+ zdir_list (zdir_t *self);
849
+
850
+ // Remove directory, optionally including all files that it contains, at
851
+ // all levels. If force is false, will only remove the directory if empty.
852
+ // If force is true, will remove all files and all subdirectories.
853
+ void
854
+ zdir_remove (zdir_t *self, bool force);
855
+
856
+ // Calculate differences between two versions of a directory tree.
857
+ // Returns a list of zdir_patch_t patches. Either older or newer may
858
+ // be null, indicating the directory is empty/absent. If alias is set,
859
+ // generates virtual filename (minus path, plus alias).
860
+ zlist_t *
861
+ zdir_diff (zdir_t *older, zdir_t *newer, const char *alias);
862
+
863
+ // Return full contents of directory as a zdir_patch list.
864
+ zlist_t *
865
+ zdir_resync (zdir_t *self, const char *alias);
866
+
867
+ // Load directory cache; returns a hash table containing the SHA-1 digests
868
+ // of every file in the tree. The cache is saved between runs in .cache.
869
+ zhash_t *
870
+ zdir_cache (zdir_t *self);
871
+
872
+ // Print contents of directory to open stream
873
+ void
874
+ zdir_fprint (zdir_t *self, FILE *file, int indent);
875
+
876
+ // Print contents of directory to stdout
877
+ void
878
+ zdir_print (zdir_t *self, int indent);
879
+
880
+ // Create a new zdir_watch actor instance:
881
+ //
882
+ // zactor_t *watch = zactor_new (zdir_watch, NULL);
883
+ //
884
+ // Destroy zdir_watch instance:
885
+ //
886
+ // zactor_destroy (&watch);
887
+ //
888
+ // Enable verbose logging of commands and activity:
889
+ //
890
+ // zstr_send (watch, "VERBOSE");
891
+ //
892
+ // Subscribe to changes to a directory path:
893
+ //
894
+ // zsock_send (watch, "ss", "SUBSCRIBE", "directory_path");
895
+ //
896
+ // Unsubscribe from changes to a directory path:
897
+ //
898
+ // zsock_send (watch, "ss", "UNSUBSCRIBE", "directory_path");
899
+ //
900
+ // Receive directory changes:
901
+ // zsock_recv (watch, "sp", &path, &patches);
902
+ //
903
+ // // Delete the received data.
904
+ // free (path);
905
+ // zlist_destroy (&patches);
906
+ void
907
+ zdir_watch (zsock_t *pipe, void *unused);
908
+
909
+ // Self test of this class.
910
+ void
911
+ zdir_test (bool verbose);
912
+
913
+ // CLASS: zdir_patch
914
+ // Create new patch
915
+ zdir_patch_t *
916
+ zdir_patch_new (const char *path, zfile_t *file, int op, const char *alias);
917
+
918
+ // Destroy a patch
919
+ void
920
+ zdir_patch_destroy (zdir_patch_t **self_p);
921
+
922
+ // Create copy of a patch. If the patch is null, or memory was exhausted,
923
+ // returns null.
924
+ zdir_patch_t *
925
+ zdir_patch_dup (zdir_patch_t *self);
926
+
927
+ // Return patch file directory path
928
+ const char *
929
+ zdir_patch_path (zdir_patch_t *self);
930
+
931
+ // Return patch file item
932
+ zfile_t *
933
+ zdir_patch_file (zdir_patch_t *self);
934
+
935
+ // Return operation
936
+ int
937
+ zdir_patch_op (zdir_patch_t *self);
938
+
939
+ // Return patch virtual file path
940
+ const char *
941
+ zdir_patch_vpath (zdir_patch_t *self);
942
+
943
+ // Calculate hash digest for file (create only)
944
+ void
945
+ zdir_patch_digest_set (zdir_patch_t *self);
946
+
947
+ // Return hash digest for patch file
948
+ const char *
949
+ zdir_patch_digest (zdir_patch_t *self);
950
+
951
+ // Self test of this class.
952
+ void
953
+ zdir_patch_test (bool verbose);
954
+
955
+ // CLASS: zfile
956
+ // If file exists, populates properties. CZMQ supports portable symbolic
957
+ // links, which are files with the extension ".ln". A symbolic link is a
958
+ // text file containing one line, the filename of a target file. Reading
959
+ // data from the symbolic link actually reads from the target file. Path
960
+ // may be NULL, in which case it is not used.
961
+ zfile_t *
962
+ zfile_new (const char *path, const char *name);
963
+
964
+ // Create new temporary file for writing via tmpfile. File is automaticaly
965
+ // deleted on destroy
966
+ zfile_t *
967
+ zfile_tmp (void);
968
+
969
+ // Destroy a file item
970
+ void
971
+ zfile_destroy (zfile_t **self_p);
972
+
973
+ // Duplicate a file item, returns a newly constructed item. If the file
974
+ // is null, or memory was exhausted, returns null.
975
+ zfile_t *
976
+ zfile_dup (zfile_t *self);
977
+
978
+ // Return file name, remove path if provided
979
+ const char *
980
+ zfile_filename (zfile_t *self, const char *path);
981
+
982
+ // Refresh file properties from disk; this is not done automatically
983
+ // on access methods, otherwise it is not possible to compare directory
984
+ // snapshots.
985
+ void
986
+ zfile_restat (zfile_t *self);
987
+
988
+ // Return when the file was last modified. If you want this to reflect the
989
+ // current situation, call zfile_restat before checking this property.
990
+ time_t
991
+ zfile_modified (zfile_t *self);
992
+
993
+ // Return the last-known size of the file. If you want this to reflect the
994
+ // current situation, call zfile_restat before checking this property.
995
+ off_t
996
+ zfile_cursize (zfile_t *self);
997
+
998
+ // Return true if the file is a directory. If you want this to reflect
999
+ // any external changes, call zfile_restat before checking this property.
1000
+ bool
1001
+ zfile_is_directory (zfile_t *self);
1002
+
1003
+ // Return true if the file is a regular file. If you want this to reflect
1004
+ // any external changes, call zfile_restat before checking this property.
1005
+ bool
1006
+ zfile_is_regular (zfile_t *self);
1007
+
1008
+ // Return true if the file is readable by this process. If you want this to
1009
+ // reflect any external changes, call zfile_restat before checking this
1010
+ // property.
1011
+ bool
1012
+ zfile_is_readable (zfile_t *self);
1013
+
1014
+ // Return true if the file is writeable by this process. If you want this
1015
+ // to reflect any external changes, call zfile_restat before checking this
1016
+ // property.
1017
+ bool
1018
+ zfile_is_writeable (zfile_t *self);
1019
+
1020
+ // Check if file has stopped changing and can be safely processed.
1021
+ // Updates the file statistics from disk at every call.
1022
+ bool
1023
+ zfile_is_stable (zfile_t *self);
1024
+
1025
+ // Return true if the file was changed on disk since the zfile_t object
1026
+ // was created, or the last zfile_restat() call made on it.
1027
+ bool
1028
+ zfile_has_changed (zfile_t *self);
1029
+
1030
+ // Remove the file from disk
1031
+ void
1032
+ zfile_remove (zfile_t *self);
1033
+
1034
+ // Open file for reading
1035
+ // Returns 0 if OK, -1 if not found or not accessible
1036
+ int
1037
+ zfile_input (zfile_t *self);
1038
+
1039
+ // Open file for writing, creating directory if needed
1040
+ // File is created if necessary; chunks can be written to file at any
1041
+ // location. Returns 0 if OK, -1 if error.
1042
+ int
1043
+ zfile_output (zfile_t *self);
1044
+
1045
+ // Read chunk from file at specified position. If this was the last chunk,
1046
+ // sets the eof property. Returns a null chunk in case of error.
1047
+ zchunk_t *
1048
+ zfile_read (zfile_t *self, size_t bytes, off_t offset);
1049
+
1050
+ // Returns true if zfile_read() just read the last chunk in the file.
1051
+ bool
1052
+ zfile_eof (zfile_t *self);
1053
+
1054
+ // Write chunk to file at specified position
1055
+ // Return 0 if OK, else -1
1056
+ int
1057
+ zfile_write (zfile_t *self, zchunk_t *chunk, off_t offset);
1058
+
1059
+ // Read next line of text from file. Returns a pointer to the text line,
1060
+ // or NULL if there was nothing more to read from the file.
1061
+ const char *
1062
+ zfile_readln (zfile_t *self);
1063
+
1064
+ // Close file, if open
1065
+ void
1066
+ zfile_close (zfile_t *self);
1067
+
1068
+ // Return file handle, if opened
1069
+ FILE *
1070
+ zfile_handle (zfile_t *self);
1071
+
1072
+ // Calculate SHA1 digest for file, using zdigest class.
1073
+ const char *
1074
+ zfile_digest (zfile_t *self);
1075
+
1076
+ // Self test of this class.
1077
+ void
1078
+ zfile_test (bool verbose);
1079
+
1080
+ // CLASS: zframe
1081
+ // Create a new frame. If size is not null, allocates the frame data
1082
+ // to the specified size. If additionally, data is not null, copies
1083
+ // size octets from the specified data into the frame body.
1084
+ zframe_t *
1085
+ zframe_new (const void *data, size_t size);
1086
+
1087
+ // Destroy a frame
1088
+ void
1089
+ zframe_destroy (zframe_t **self_p);
1090
+
1091
+ // Create an empty (zero-sized) frame
1092
+ zframe_t *
1093
+ zframe_new_empty (void);
1094
+
1095
+ // Create a frame with a specified string content.
1096
+ zframe_t *
1097
+ zframe_from (const char *string);
1098
+
1099
+ // Receive frame from socket, returns zframe_t object or NULL if the recv
1100
+ // was interrupted. Does a blocking recv, if you want to not block then use
1101
+ // zpoller or zloop.
1102
+ zframe_t *
1103
+ zframe_recv (void *source);
1104
+
1105
+ // Send a frame to a socket, destroy frame after sending.
1106
+ // Return -1 on error, 0 on success.
1107
+ int
1108
+ zframe_send (zframe_t **self_p, void *dest, int flags);
1109
+
1110
+ // Return number of bytes in frame data
1111
+ size_t
1112
+ zframe_size (zframe_t *self);
1113
+
1114
+ // Return address of frame data
1115
+ byte *
1116
+ zframe_data (zframe_t *self);
1117
+
1118
+ // Return meta data property for frame
1119
+ // The caller shall not modify or free the returned value, which shall be
1120
+ // owned by the message.
1121
+ const char *
1122
+ zframe_meta (zframe_t *self, const char *property);
1123
+
1124
+ // Create a new frame that duplicates an existing frame. If frame is null,
1125
+ // or memory was exhausted, returns null.
1126
+ zframe_t *
1127
+ zframe_dup (zframe_t *self);
1128
+
1129
+ // Return frame data encoded as printable hex string, useful for 0MQ UUIDs.
1130
+ // Caller must free string when finished with it.
1131
+ char *
1132
+ zframe_strhex (zframe_t *self);
1133
+
1134
+ // Return frame data copied into freshly allocated string
1135
+ // Caller must free string when finished with it.
1136
+ char *
1137
+ zframe_strdup (zframe_t *self);
1138
+
1139
+ // Return TRUE if frame body is equal to string, excluding terminator
1140
+ bool
1141
+ zframe_streq (zframe_t *self, const char *string);
1142
+
1143
+ // Return frame MORE indicator (1 or 0), set when reading frame from socket
1144
+ // or by the zframe_set_more() method
1145
+ int
1146
+ zframe_more (zframe_t *self);
1147
+
1148
+ // Set frame MORE indicator (1 or 0). Note this is NOT used when sending
1149
+ // frame to socket, you have to specify flag explicitly.
1150
+ void
1151
+ zframe_set_more (zframe_t *self, int more);
1152
+
1153
+ // Return frame routing ID, if the frame came from a ZMQ_SERVER socket.
1154
+ // Else returns zero.
1155
+ uint32_t
1156
+ zframe_routing_id (zframe_t *self);
1157
+
1158
+ // Set routing ID on frame. This is used if/when the frame is sent to a
1159
+ // ZMQ_SERVER socket.
1160
+ void
1161
+ zframe_set_routing_id (zframe_t *self, uint32_t routing_id);
1162
+
1163
+ // Return frame group of radio-dish pattern.
1164
+ const char *
1165
+ zframe_group (zframe_t *self);
1166
+
1167
+ // Set group on frame. This is used if/when the frame is sent to a
1168
+ // ZMQ_RADIO socket.
1169
+ // Return -1 on error, 0 on success.
1170
+ int
1171
+ zframe_set_group (zframe_t *self, const char *group);
1172
+
1173
+ // Return TRUE if two frames have identical size and data
1174
+ // If either frame is NULL, equality is always false.
1175
+ bool
1176
+ zframe_eq (zframe_t *self, zframe_t *other);
1177
+
1178
+ // Set new contents for frame
1179
+ void
1180
+ zframe_reset (zframe_t *self, const void *data, size_t size);
1181
+
1182
+ // Send message to zsys log sink (may be stdout, or system facility as
1183
+ // configured by zsys_set_logstream). Prefix shows before frame, if not null.
1184
+ void
1185
+ zframe_print (zframe_t *self, const char *prefix);
1186
+
1187
+ // Probe the supplied object, and report if it looks like a zframe_t.
1188
+ bool
1189
+ zframe_is (void *self);
1190
+
1191
+ // Self test of this class.
1192
+ void
1193
+ zframe_test (bool verbose);
1194
+
1195
+ // CLASS: zhash
1196
+ // Create a new, empty hash container
1197
+ zhash_t *
1198
+ zhash_new (void);
1199
+
1200
+ // Destroy a hash container and all items in it
1201
+ void
1202
+ zhash_destroy (zhash_t **self_p);
1203
+
1204
+ // Unpack binary frame into a new hash table. Packed data must follow format
1205
+ // defined by zhash_pack. Hash table is set to autofree. An empty frame
1206
+ // unpacks to an empty hash table.
1207
+ zhash_t *
1208
+ zhash_unpack (zframe_t *frame);
1209
+
1210
+ // Insert item into hash table with specified key and item.
1211
+ // If key is already present returns -1 and leaves existing item unchanged
1212
+ // Returns 0 on success.
1213
+ int
1214
+ zhash_insert (zhash_t *self, const char *key, void *item);
1215
+
1216
+ // Update item into hash table with specified key and item.
1217
+ // If key is already present, destroys old item and inserts new one.
1218
+ // Use free_fn method to ensure deallocator is properly called on item.
1219
+ void
1220
+ zhash_update (zhash_t *self, const char *key, void *item);
1221
+
1222
+ // Remove an item specified by key from the hash table. If there was no such
1223
+ // item, this function does nothing.
1224
+ void
1225
+ zhash_delete (zhash_t *self, const char *key);
1226
+
1227
+ // Return the item at the specified key, or null
1228
+ void *
1229
+ zhash_lookup (zhash_t *self, const char *key);
1230
+
1231
+ // Reindexes an item from an old key to a new key. If there was no such
1232
+ // item, does nothing. Returns 0 if successful, else -1.
1233
+ int
1234
+ zhash_rename (zhash_t *self, const char *old_key, const char *new_key);
1235
+
1236
+ // Set a free function for the specified hash table item. When the item is
1237
+ // destroyed, the free function, if any, is called on that item.
1238
+ // Use this when hash items are dynamically allocated, to ensure that
1239
+ // you don't have memory leaks. You can pass 'free' or NULL as a free_fn.
1240
+ // Returns the item, or NULL if there is no such item.
1241
+ void *
1242
+ zhash_freefn (zhash_t *self, const char *key, zhash_free_fn free_fn);
1243
+
1244
+ // Return the number of keys/items in the hash table
1245
+ size_t
1246
+ zhash_size (zhash_t *self);
1247
+
1248
+ // Make copy of hash table; if supplied table is null, returns null.
1249
+ // Does not copy items themselves. Rebuilds new table so may be slow on
1250
+ // very large tables. NOTE: only works with item values that are strings
1251
+ // since there's no other way to know how to duplicate the item value.
1252
+ zhash_t *
1253
+ zhash_dup (zhash_t *self);
1254
+
1255
+ // Return keys for items in table
1256
+ zlist_t *
1257
+ zhash_keys (zhash_t *self);
1258
+
1259
+ // Simple iterator; returns first item in hash table, in no given order,
1260
+ // or NULL if the table is empty. This method is simpler to use than the
1261
+ // foreach() method, which is deprecated. To access the key for this item
1262
+ // use zhash_cursor(). NOTE: do NOT modify the table while iterating.
1263
+ void *
1264
+ zhash_first (zhash_t *self);
1265
+
1266
+ // Simple iterator; returns next item in hash table, in no given order,
1267
+ // or NULL if the last item was already returned. Use this together with
1268
+ // zhash_first() to process all items in a hash table. If you need the
1269
+ // items in sorted order, use zhash_keys() and then zlist_sort(). To
1270
+ // access the key for this item use zhash_cursor(). NOTE: do NOT modify
1271
+ // the table while iterating.
1272
+ void *
1273
+ zhash_next (zhash_t *self);
1274
+
1275
+ // After a successful first/next method, returns the key for the item that
1276
+ // was returned. This is a constant string that you may not modify or
1277
+ // deallocate, and which lasts as long as the item in the hash. After an
1278
+ // unsuccessful first/next, returns NULL.
1279
+ const char *
1280
+ zhash_cursor (zhash_t *self);
1281
+
1282
+ // Add a comment to hash table before saving to disk. You can add as many
1283
+ // comment lines as you like. These comment lines are discarded when loading
1284
+ // the file. If you use a null format, all comments are deleted.
1285
+ void
1286
+ zhash_comment (zhash_t *self, const char *format, ...);
1287
+
1288
+ // Serialize hash table to a binary frame that can be sent in a message.
1289
+ // The packed format is compatible with the 'dictionary' type defined in
1290
+ // http://rfc.zeromq.org/spec:35/FILEMQ, and implemented by zproto:
1291
+ //
1292
+ // ; A list of name/value pairs
1293
+ // dictionary = dict-count *( dict-name dict-value )
1294
+ // dict-count = number-4
1295
+ // dict-value = longstr
1296
+ // dict-name = string
1297
+ //
1298
+ // ; Strings are always length + text contents
1299
+ // longstr = number-4 *VCHAR
1300
+ // string = number-1 *VCHAR
1301
+ //
1302
+ // ; Numbers are unsigned integers in network byte order
1303
+ // number-1 = 1OCTET
1304
+ // number-4 = 4OCTET
1305
+ //
1306
+ // Comments are not included in the packed data. Item values MUST be
1307
+ // strings.
1308
+ zframe_t *
1309
+ zhash_pack (zhash_t *self);
1310
+
1311
+ // Save hash table to a text file in name=value format. Hash values must be
1312
+ // printable strings; keys may not contain '=' character. Returns 0 if OK,
1313
+ // else -1 if a file error occurred.
1314
+ int
1315
+ zhash_save (zhash_t *self, const char *filename);
1316
+
1317
+ // Load hash table from a text file in name=value format; hash table must
1318
+ // already exist. Hash values must printable strings; keys may not contain
1319
+ // '=' character. Returns 0 if OK, else -1 if a file was not readable.
1320
+ int
1321
+ zhash_load (zhash_t *self, const char *filename);
1322
+
1323
+ // When a hash table was loaded from a file by zhash_load, this method will
1324
+ // reload the file if it has been modified since, and is "stable", i.e. not
1325
+ // still changing. Returns 0 if OK, -1 if there was an error reloading the
1326
+ // file.
1327
+ int
1328
+ zhash_refresh (zhash_t *self);
1329
+
1330
+ // Set hash for automatic value destruction. Note that this assumes that
1331
+ // values are NULL-terminated strings. Do not use with different types.
1332
+ void
1333
+ zhash_autofree (zhash_t *self);
1334
+
1335
+ // Self test of this class.
1336
+ void
1337
+ zhash_test (bool verbose);
1338
+
1339
+ // CLASS: zhashx
1340
+ // Create a new, empty hash container
1341
+ zhashx_t *
1342
+ zhashx_new (void);
1343
+
1344
+ // Destroy a hash container and all items in it
1345
+ void
1346
+ zhashx_destroy (zhashx_t **self_p);
1347
+
1348
+ // Unpack binary frame into a new hash table. Packed data must follow format
1349
+ // defined by zhashx_pack. Hash table is set to autofree. An empty frame
1350
+ // unpacks to an empty hash table.
1351
+ zhashx_t *
1352
+ zhashx_unpack (zframe_t *frame);
1353
+
1354
+ // Same as unpack but uses a user-defined deserializer function to convert
1355
+ // a longstr back into item format.
1356
+ zhashx_t *
1357
+ zhashx_unpack_own (zframe_t *frame, zhashx_deserializer_fn deserializer);
1358
+
1359
+ // Insert item into hash table with specified key and item.
1360
+ // If key is already present returns -1 and leaves existing item unchanged
1361
+ // Returns 0 on success.
1362
+ int
1363
+ zhashx_insert (zhashx_t *self, const void *key, void *item);
1364
+
1365
+ // Update or insert item into hash table with specified key and item. If the
1366
+ // key is already present, destroys old item and inserts new one. If you set
1367
+ // a container item destructor, this is called on the old value. If the key
1368
+ // was not already present, inserts a new item. Sets the hash cursor to the
1369
+ // new item.
1370
+ void
1371
+ zhashx_update (zhashx_t *self, const void *key, void *item);
1372
+
1373
+ // Remove an item specified by key from the hash table. If there was no such
1374
+ // item, this function does nothing.
1375
+ void
1376
+ zhashx_delete (zhashx_t *self, const void *key);
1377
+
1378
+ // Delete all items from the hash table. If the key destructor is
1379
+ // set, calls it on every key. If the item destructor is set, calls
1380
+ // it on every item.
1381
+ void
1382
+ zhashx_purge (zhashx_t *self);
1383
+
1384
+ // Return the item at the specified key, or null
1385
+ void *
1386
+ zhashx_lookup (zhashx_t *self, const void *key);
1387
+
1388
+ // Reindexes an item from an old key to a new key. If there was no such
1389
+ // item, does nothing. Returns 0 if successful, else -1.
1390
+ int
1391
+ zhashx_rename (zhashx_t *self, const void *old_key, const void *new_key);
1392
+
1393
+ // Set a free function for the specified hash table item. When the item is
1394
+ // destroyed, the free function, if any, is called on that item.
1395
+ // Use this when hash items are dynamically allocated, to ensure that
1396
+ // you don't have memory leaks. You can pass 'free' or NULL as a free_fn.
1397
+ // Returns the item, or NULL if there is no such item.
1398
+ void *
1399
+ zhashx_freefn (zhashx_t *self, const void *key, zhashx_free_fn free_fn);
1400
+
1401
+ // Return the number of keys/items in the hash table
1402
+ size_t
1403
+ zhashx_size (zhashx_t *self);
1404
+
1405
+ // Return a zlistx_t containing the keys for the items in the
1406
+ // table. Uses the key_duplicator to duplicate all keys and sets the
1407
+ // key_destructor as destructor for the list.
1408
+ zlistx_t *
1409
+ zhashx_keys (zhashx_t *self);
1410
+
1411
+ // Return a zlistx_t containing the values for the items in the
1412
+ // table. Uses the duplicator to duplicate all items and sets the
1413
+ // destructor as destructor for the list.
1414
+ zlistx_t *
1415
+ zhashx_values (zhashx_t *self);
1416
+
1417
+ // Simple iterator; returns first item in hash table, in no given order,
1418
+ // or NULL if the table is empty. This method is simpler to use than the
1419
+ // foreach() method, which is deprecated. To access the key for this item
1420
+ // use zhashx_cursor(). NOTE: do NOT modify the table while iterating.
1421
+ void *
1422
+ zhashx_first (zhashx_t *self);
1423
+
1424
+ // Simple iterator; returns next item in hash table, in no given order,
1425
+ // or NULL if the last item was already returned. Use this together with
1426
+ // zhashx_first() to process all items in a hash table. If you need the
1427
+ // items in sorted order, use zhashx_keys() and then zlistx_sort(). To
1428
+ // access the key for this item use zhashx_cursor(). NOTE: do NOT modify
1429
+ // the table while iterating.
1430
+ void *
1431
+ zhashx_next (zhashx_t *self);
1432
+
1433
+ // After a successful first/next method, returns the key for the item that
1434
+ // was returned. This is a constant string that you may not modify or
1435
+ // deallocate, and which lasts as long as the item in the hash. After an
1436
+ // unsuccessful first/next, returns NULL.
1437
+ const void *
1438
+ zhashx_cursor (zhashx_t *self);
1439
+
1440
+ // Add a comment to hash table before saving to disk. You can add as many
1441
+ // comment lines as you like. These comment lines are discarded when loading
1442
+ // the file. If you use a null format, all comments are deleted.
1443
+ void
1444
+ zhashx_comment (zhashx_t *self, const char *format, ...);
1445
+
1446
+ // Save hash table to a text file in name=value format. Hash values must be
1447
+ // printable strings; keys may not contain '=' character. Returns 0 if OK,
1448
+ // else -1 if a file error occurred.
1449
+ int
1450
+ zhashx_save (zhashx_t *self, const char *filename);
1451
+
1452
+ // Load hash table from a text file in name=value format; hash table must
1453
+ // already exist. Hash values must printable strings; keys may not contain
1454
+ // '=' character. Returns 0 if OK, else -1 if a file was not readable.
1455
+ int
1456
+ zhashx_load (zhashx_t *self, const char *filename);
1457
+
1458
+ // When a hash table was loaded from a file by zhashx_load, this method will
1459
+ // reload the file if it has been modified since, and is "stable", i.e. not
1460
+ // still changing. Returns 0 if OK, -1 if there was an error reloading the
1461
+ // file.
1462
+ int
1463
+ zhashx_refresh (zhashx_t *self);
1464
+
1465
+ // Serialize hash table to a binary frame that can be sent in a message.
1466
+ // The packed format is compatible with the 'dictionary' type defined in
1467
+ // http://rfc.zeromq.org/spec:35/FILEMQ, and implemented by zproto:
1468
+ //
1469
+ // ; A list of name/value pairs
1470
+ // dictionary = dict-count *( dict-name dict-value )
1471
+ // dict-count = number-4
1472
+ // dict-value = longstr
1473
+ // dict-name = string
1474
+ //
1475
+ // ; Strings are always length + text contents
1476
+ // longstr = number-4 *VCHAR
1477
+ // string = number-1 *VCHAR
1478
+ //
1479
+ // ; Numbers are unsigned integers in network byte order
1480
+ // number-1 = 1OCTET
1481
+ // number-4 = 4OCTET
1482
+ //
1483
+ // Comments are not included in the packed data. Item values MUST be
1484
+ // strings.
1485
+ zframe_t *
1486
+ zhashx_pack (zhashx_t *self);
1487
+
1488
+ // Same as pack but uses a user-defined serializer function to convert items
1489
+ // into longstr.
1490
+ zframe_t *
1491
+ zhashx_pack_own (zhashx_t *self, zhashx_serializer_fn serializer);
1492
+
1493
+ // Make a copy of the list; items are duplicated if you set a duplicator
1494
+ // for the list, otherwise not. Copying a null reference returns a null
1495
+ // reference. Note that this method's behavior changed slightly for CZMQ
1496
+ // v3.x, as it does not set nor respect autofree. It does however let you
1497
+ // duplicate any hash table safely. The old behavior is in zhashx_dup_v2.
1498
+ zhashx_t *
1499
+ zhashx_dup (zhashx_t *self);
1500
+
1501
+ // Set a user-defined deallocator for hash items; by default items are not
1502
+ // freed when the hash is destroyed.
1503
+ void
1504
+ zhashx_set_destructor (zhashx_t *self, zhashx_destructor_fn destructor);
1505
+
1506
+ // Set a user-defined duplicator for hash items; by default items are not
1507
+ // copied when the hash is duplicated.
1508
+ void
1509
+ zhashx_set_duplicator (zhashx_t *self, zhashx_duplicator_fn duplicator);
1510
+
1511
+ // Set a user-defined deallocator for keys; by default keys are freed
1512
+ // when the hash is destroyed using free().
1513
+ void
1514
+ zhashx_set_key_destructor (zhashx_t *self, zhashx_destructor_fn destructor);
1515
+
1516
+ // Set a user-defined duplicator for keys; by default keys are duplicated
1517
+ // using strdup.
1518
+ void
1519
+ zhashx_set_key_duplicator (zhashx_t *self, zhashx_duplicator_fn duplicator);
1520
+
1521
+ // Set a user-defined comparator for keys; by default keys are
1522
+ // compared using strcmp.
1523
+ // The callback function should return zero (0) on matching
1524
+ // items.
1525
+ void
1526
+ zhashx_set_key_comparator (zhashx_t *self, zhashx_comparator_fn comparator);
1527
+
1528
+ // Set a user-defined hash function for keys; by default keys are
1529
+ // hashed by a modified Bernstein hashing function.
1530
+ void
1531
+ zhashx_set_key_hasher (zhashx_t *self, zhashx_hash_fn hasher);
1532
+
1533
+ // Make copy of hash table; if supplied table is null, returns null.
1534
+ // Does not copy items themselves. Rebuilds new table so may be slow on
1535
+ // very large tables. NOTE: only works with item values that are strings
1536
+ // since there's no other way to know how to duplicate the item value.
1537
+ zhashx_t *
1538
+ zhashx_dup_v2 (zhashx_t *self);
1539
+
1540
+ // Self test of this class.
1541
+ void
1542
+ zhashx_test (bool verbose);
1543
+
1544
+ // CLASS: ziflist
1545
+ // Get a list of network interfaces currently defined on the system
1546
+ ziflist_t *
1547
+ ziflist_new (void);
1548
+
1549
+ // Destroy a ziflist instance
1550
+ void
1551
+ ziflist_destroy (ziflist_t **self_p);
1552
+
1553
+ // Reload network interfaces from system
1554
+ void
1555
+ ziflist_reload (ziflist_t *self);
1556
+
1557
+ // Return the number of network interfaces on system
1558
+ size_t
1559
+ ziflist_size (ziflist_t *self);
1560
+
1561
+ // Get first network interface, return NULL if there are none
1562
+ const char *
1563
+ ziflist_first (ziflist_t *self);
1564
+
1565
+ // Get next network interface, return NULL if we hit the last one
1566
+ const char *
1567
+ ziflist_next (ziflist_t *self);
1568
+
1569
+ // Return the current interface IP address as a printable string
1570
+ const char *
1571
+ ziflist_address (ziflist_t *self);
1572
+
1573
+ // Return the current interface broadcast address as a printable string
1574
+ const char *
1575
+ ziflist_broadcast (ziflist_t *self);
1576
+
1577
+ // Return the current interface network mask as a printable string
1578
+ const char *
1579
+ ziflist_netmask (ziflist_t *self);
1580
+
1581
+ // Return the list of interfaces.
1582
+ void
1583
+ ziflist_print (ziflist_t *self);
1584
+
1585
+ // Get a list of network interfaces currently defined on the system
1586
+ // Includes IPv6 interfaces
1587
+ ziflist_t *
1588
+ ziflist_new_ipv6 (void);
1589
+
1590
+ // Reload network interfaces from system, including IPv6
1591
+ void
1592
+ ziflist_reload_ipv6 (ziflist_t *self);
1593
+
1594
+ // Return true if the current interface uses IPv6
1595
+ bool
1596
+ ziflist_is_ipv6 (ziflist_t *self);
1597
+
1598
+ // Self test of this class.
1599
+ void
1600
+ ziflist_test (bool verbose);
1601
+
1602
+ // CLASS: zlist
1603
+ // Create a new list container
1604
+ zlist_t *
1605
+ zlist_new (void);
1606
+
1607
+ // Destroy a list container
1608
+ void
1609
+ zlist_destroy (zlist_t **self_p);
1610
+
1611
+ // Return the item at the head of list. If the list is empty, returns NULL.
1612
+ // Leaves cursor pointing at the head item, or NULL if the list is empty.
1613
+ void *
1614
+ zlist_first (zlist_t *self);
1615
+
1616
+ // Return the next item. If the list is empty, returns NULL. To move to
1617
+ // the start of the list call zlist_first (). Advances the cursor.
1618
+ void *
1619
+ zlist_next (zlist_t *self);
1620
+
1621
+ // Return the item at the tail of list. If the list is empty, returns NULL.
1622
+ // Leaves cursor pointing at the tail item, or NULL if the list is empty.
1623
+ void *
1624
+ zlist_last (zlist_t *self);
1625
+
1626
+ // Return first item in the list, or null, leaves the cursor
1627
+ void *
1628
+ zlist_head (zlist_t *self);
1629
+
1630
+ // Return last item in the list, or null, leaves the cursor
1631
+ void *
1632
+ zlist_tail (zlist_t *self);
1633
+
1634
+ // Return the current item of list. If the list is empty, returns NULL.
1635
+ // Leaves cursor pointing at the current item, or NULL if the list is empty.
1636
+ void *
1637
+ zlist_item (zlist_t *self);
1638
+
1639
+ // Append an item to the end of the list, return 0 if OK or -1 if this
1640
+ // failed for some reason (out of memory). Note that if a duplicator has
1641
+ // been set, this method will also duplicate the item.
1642
+ int
1643
+ zlist_append (zlist_t *self, void *item);
1644
+
1645
+ // Push an item to the start of the list, return 0 if OK or -1 if this
1646
+ // failed for some reason (out of memory). Note that if a duplicator has
1647
+ // been set, this method will also duplicate the item.
1648
+ int
1649
+ zlist_push (zlist_t *self, void *item);
1650
+
1651
+ // Pop the item off the start of the list, if any
1652
+ void *
1653
+ zlist_pop (zlist_t *self);
1654
+
1655
+ // Checks if an item already is present. Uses compare method to determine if
1656
+ // items are equal. If the compare method is NULL the check will only compare
1657
+ // pointers. Returns true if item is present else false.
1658
+ bool
1659
+ zlist_exists (zlist_t *self, void *item);
1660
+
1661
+ // Remove the specified item from the list if present
1662
+ void
1663
+ zlist_remove (zlist_t *self, void *item);
1664
+
1665
+ // Make a copy of list. If the list has autofree set, the copied list will
1666
+ // duplicate all items, which must be strings. Otherwise, the list will hold
1667
+ // pointers back to the items in the original list. If list is null, returns
1668
+ // NULL.
1669
+ zlist_t *
1670
+ zlist_dup (zlist_t *self);
1671
+
1672
+ // Purge all items from list
1673
+ void
1674
+ zlist_purge (zlist_t *self);
1675
+
1676
+ // Return number of items in the list
1677
+ size_t
1678
+ zlist_size (zlist_t *self);
1679
+
1680
+ // Sort the list. If the compare function is null, sorts the list by
1681
+ // ascending key value using a straight ASCII comparison. If you specify
1682
+ // a compare function, this decides how items are sorted. The sort is not
1683
+ // stable, so may reorder items with the same keys. The algorithm used is
1684
+ // combsort, a compromise between performance and simplicity.
1685
+ void
1686
+ zlist_sort (zlist_t *self, zlist_compare_fn compare);
1687
+
1688
+ // Set list for automatic item destruction; item values MUST be strings.
1689
+ // By default a list item refers to a value held elsewhere. When you set
1690
+ // this, each time you append or push a list item, zlist will take a copy
1691
+ // of the string value. Then, when you destroy the list, it will free all
1692
+ // item values automatically. If you use any other technique to allocate
1693
+ // list values, you must free them explicitly before destroying the list.
1694
+ // The usual technique is to pop list items and destroy them, until the
1695
+ // list is empty.
1696
+ void
1697
+ zlist_autofree (zlist_t *self);
1698
+
1699
+ // Sets a compare function for this list. The function compares two items.
1700
+ // It returns an integer less than, equal to, or greater than zero if the
1701
+ // first item is found, respectively, to be less than, to match, or be
1702
+ // greater than the second item.
1703
+ // This function is used for sorting, removal and exists checking.
1704
+ void
1705
+ zlist_comparefn (zlist_t *self, zlist_compare_fn fn);
1706
+
1707
+ // Set a free function for the specified list item. When the item is
1708
+ // destroyed, the free function, if any, is called on that item.
1709
+ // Use this when list items are dynamically allocated, to ensure that
1710
+ // you don't have memory leaks. You can pass 'free' or NULL as a free_fn.
1711
+ // Returns the item, or NULL if there is no such item.
1712
+ void *
1713
+ zlist_freefn (zlist_t *self, void *item, zlist_free_fn fn, bool at_tail);
1714
+
1715
+ // Self test of this class.
1716
+ void
1717
+ zlist_test (bool verbose);
1718
+
1719
+ // CLASS: zlistx
1720
+ // Create a new, empty list.
1721
+ zlistx_t *
1722
+ zlistx_new (void);
1723
+
1724
+ // Destroy a list. If an item destructor was specified, all items in the
1725
+ // list are automatically destroyed as well.
1726
+ void
1727
+ zlistx_destroy (zlistx_t **self_p);
1728
+
1729
+ // Add an item to the head of the list. Calls the item duplicator, if any,
1730
+ // on the item. Resets cursor to list head. Returns an item handle on
1731
+ // success, NULL if memory was exhausted.
1732
+ void *
1733
+ zlistx_add_start (zlistx_t *self, void *item);
1734
+
1735
+ // Add an item to the tail of the list. Calls the item duplicator, if any,
1736
+ // on the item. Resets cursor to list head. Returns an item handle on
1737
+ // success, NULL if memory was exhausted.
1738
+ void *
1739
+ zlistx_add_end (zlistx_t *self, void *item);
1740
+
1741
+ // Return the number of items in the list
1742
+ size_t
1743
+ zlistx_size (zlistx_t *self);
1744
+
1745
+ // Return first item in the list, or null, leaves the cursor
1746
+ void *
1747
+ zlistx_head (zlistx_t *self);
1748
+
1749
+ // Return last item in the list, or null, leaves the cursor
1750
+ void *
1751
+ zlistx_tail (zlistx_t *self);
1752
+
1753
+ // Return the item at the head of list. If the list is empty, returns NULL.
1754
+ // Leaves cursor pointing at the head item, or NULL if the list is empty.
1755
+ void *
1756
+ zlistx_first (zlistx_t *self);
1757
+
1758
+ // Return the next item. At the end of the list (or in an empty list),
1759
+ // returns NULL. Use repeated zlistx_next () calls to work through the list
1760
+ // from zlistx_first (). First time, acts as zlistx_first().
1761
+ void *
1762
+ zlistx_next (zlistx_t *self);
1763
+
1764
+ // Return the previous item. At the start of the list (or in an empty list),
1765
+ // returns NULL. Use repeated zlistx_prev () calls to work through the list
1766
+ // backwards from zlistx_last (). First time, acts as zlistx_last().
1767
+ void *
1768
+ zlistx_prev (zlistx_t *self);
1769
+
1770
+ // Return the item at the tail of list. If the list is empty, returns NULL.
1771
+ // Leaves cursor pointing at the tail item, or NULL if the list is empty.
1772
+ void *
1773
+ zlistx_last (zlistx_t *self);
1774
+
1775
+ // Returns the value of the item at the cursor, or NULL if the cursor is
1776
+ // not pointing to an item.
1777
+ void *
1778
+ zlistx_item (zlistx_t *self);
1779
+
1780
+ // Returns the handle of the item at the cursor, or NULL if the cursor is
1781
+ // not pointing to an item.
1782
+ void *
1783
+ zlistx_cursor (zlistx_t *self);
1784
+
1785
+ // Returns the item associated with the given list handle, or NULL if passed
1786
+ // in handle is NULL. Asserts that the passed in handle points to a list element.
1787
+ void *
1788
+ zlistx_handle_item (void *handle);
1789
+
1790
+ // Find an item in the list, searching from the start. Uses the item
1791
+ // comparator, if any, else compares item values directly. Returns the
1792
+ // item handle found, or NULL. Sets the cursor to the found item, if any.
1793
+ void *
1794
+ zlistx_find (zlistx_t *self, void *item);
1795
+
1796
+ // Detach an item from the list, using its handle. The item is not modified,
1797
+ // and the caller is responsible for destroying it if necessary. If handle is
1798
+ // null, detaches the first item on the list. Returns item that was detached,
1799
+ // or null if none was. If cursor was at item, moves cursor to previous item,
1800
+ // so you can detach items while iterating forwards through a list.
1801
+ void *
1802
+ zlistx_detach (zlistx_t *self, void *handle);
1803
+
1804
+ // Detach item at the cursor, if any, from the list. The item is not modified,
1805
+ // and the caller is responsible for destroying it as necessary. Returns item
1806
+ // that was detached, or null if none was. Moves cursor to previous item, so
1807
+ // you can detach items while iterating forwards through a list.
1808
+ void *
1809
+ zlistx_detach_cur (zlistx_t *self);
1810
+
1811
+ // Delete an item, using its handle. Calls the item destructor is any is
1812
+ // set. If handle is null, deletes the first item on the list. Returns 0
1813
+ // if an item was deleted, -1 if not. If cursor was at item, moves cursor
1814
+ // to previous item, so you can delete items while iterating forwards
1815
+ // through a list.
1816
+ int
1817
+ zlistx_delete (zlistx_t *self, void *handle);
1818
+
1819
+ // Move an item to the start of the list, via its handle.
1820
+ void
1821
+ zlistx_move_start (zlistx_t *self, void *handle);
1822
+
1823
+ // Move an item to the end of the list, via its handle.
1824
+ void
1825
+ zlistx_move_end (zlistx_t *self, void *handle);
1826
+
1827
+ // Remove all items from the list, and destroy them if the item destructor
1828
+ // is set.
1829
+ void
1830
+ zlistx_purge (zlistx_t *self);
1831
+
1832
+ // Sort the list. If an item comparator was set, calls that to compare
1833
+ // items, otherwise compares on item value. The sort is not stable, so may
1834
+ // reorder equal items.
1835
+ void
1836
+ zlistx_sort (zlistx_t *self);
1837
+
1838
+ // Create a new node and insert it into a sorted list. Calls the item
1839
+ // duplicator, if any, on the item. If low_value is true, starts searching
1840
+ // from the start of the list, otherwise searches from the end. Use the item
1841
+ // comparator, if any, to find where to place the new node. Returns a handle
1842
+ // to the new node, or NULL if memory was exhausted. Resets the cursor to the
1843
+ // list head.
1844
+ void *
1845
+ zlistx_insert (zlistx_t *self, void *item, bool low_value);
1846
+
1847
+ // Move an item, specified by handle, into position in a sorted list. Uses
1848
+ // the item comparator, if any, to determine the new location. If low_value
1849
+ // is true, starts searching from the start of the list, otherwise searches
1850
+ // from the end.
1851
+ void
1852
+ zlistx_reorder (zlistx_t *self, void *handle, bool low_value);
1853
+
1854
+ // Make a copy of the list; items are duplicated if you set a duplicator
1855
+ // for the list, otherwise not. Copying a null reference returns a null
1856
+ // reference.
1857
+ zlistx_t *
1858
+ zlistx_dup (zlistx_t *self);
1859
+
1860
+ // Set a user-defined deallocator for list items; by default items are not
1861
+ // freed when the list is destroyed.
1862
+ void
1863
+ zlistx_set_destructor (zlistx_t *self, zlistx_destructor_fn destructor);
1864
+
1865
+ // Set a user-defined duplicator for list items; by default items are not
1866
+ // copied when the list is duplicated.
1867
+ void
1868
+ zlistx_set_duplicator (zlistx_t *self, zlistx_duplicator_fn duplicator);
1869
+
1870
+ // Set a user-defined comparator for zlistx_find and zlistx_sort; the method
1871
+ // must return -1, 0, or 1 depending on whether item1 is less than, equal to,
1872
+ // or greater than, item2.
1873
+ void
1874
+ zlistx_set_comparator (zlistx_t *self, zlistx_comparator_fn comparator);
1875
+
1876
+ // Self test of this class.
1877
+ void
1878
+ zlistx_test (bool verbose);
1879
+
1880
+ // CLASS: zloop
1881
+ // Create a new zloop reactor
1882
+ zloop_t *
1883
+ zloop_new (void);
1884
+
1885
+ // Destroy a reactor
1886
+ void
1887
+ zloop_destroy (zloop_t **self_p);
1888
+
1889
+ // Register socket reader with the reactor. When the reader has messages,
1890
+ // the reactor will call the handler, passing the arg. Returns 0 if OK, -1
1891
+ // if there was an error. If you register the same socket more than once,
1892
+ // each instance will invoke its corresponding handler.
1893
+ int
1894
+ zloop_reader (zloop_t *self, zsock_t *sock, zloop_reader_fn handler, void *arg);
1895
+
1896
+ // Cancel a socket reader from the reactor. If multiple readers exist for
1897
+ // same socket, cancels ALL of them.
1898
+ void
1899
+ zloop_reader_end (zloop_t *self, zsock_t *sock);
1900
+
1901
+ // Configure a registered reader to ignore errors. If you do not set this,
1902
+ // then readers that have errors are removed from the reactor silently.
1903
+ void
1904
+ zloop_reader_set_tolerant (zloop_t *self, zsock_t *sock);
1905
+
1906
+ // Register low-level libzmq pollitem with the reactor. When the pollitem
1907
+ // is ready, will call the handler, passing the arg. Returns 0 if OK, -1
1908
+ // if there was an error. If you register the pollitem more than once, each
1909
+ // instance will invoke its corresponding handler. A pollitem with
1910
+ // socket=NULL and fd=0 means 'poll on FD zero'.
1911
+ int
1912
+ zloop_poller (zloop_t *self, zmq_pollitem_t *item, zloop_fn handler, void *arg);
1913
+
1914
+ // Cancel a pollitem from the reactor, specified by socket or FD. If both
1915
+ // are specified, uses only socket. If multiple poll items exist for same
1916
+ // socket/FD, cancels ALL of them.
1917
+ void
1918
+ zloop_poller_end (zloop_t *self, zmq_pollitem_t *item);
1919
+
1920
+ // Configure a registered poller to ignore errors. If you do not set this,
1921
+ // then poller that have errors are removed from the reactor silently.
1922
+ void
1923
+ zloop_poller_set_tolerant (zloop_t *self, zmq_pollitem_t *item);
1924
+
1925
+ // Register a timer that expires after some delay and repeats some number of
1926
+ // times. At each expiry, will call the handler, passing the arg. To run a
1927
+ // timer forever, use 0 times. Returns a timer_id that is used to cancel the
1928
+ // timer in the future. Returns -1 if there was an error.
1929
+ int
1930
+ zloop_timer (zloop_t *self, size_t delay, size_t times, zloop_timer_fn handler, void *arg);
1931
+
1932
+ // Cancel a specific timer identified by a specific timer_id (as returned by
1933
+ // zloop_timer).
1934
+ int
1935
+ zloop_timer_end (zloop_t *self, int timer_id);
1936
+
1937
+ // Register a ticket timer. Ticket timers are very fast in the case where
1938
+ // you use a lot of timers (thousands), and frequently remove and add them.
1939
+ // The main use case is expiry timers for servers that handle many clients,
1940
+ // and which reset the expiry timer for each message received from a client.
1941
+ // Whereas normal timers perform poorly as the number of clients grows, the
1942
+ // cost of ticket timers is constant, no matter the number of clients. You
1943
+ // must set the ticket delay using zloop_set_ticket_delay before creating a
1944
+ // ticket. Returns a handle to the timer that you should use in
1945
+ // zloop_ticket_reset and zloop_ticket_delete.
1946
+ void *
1947
+ zloop_ticket (zloop_t *self, zloop_timer_fn handler, void *arg);
1948
+
1949
+ // Reset a ticket timer, which moves it to the end of the ticket list and
1950
+ // resets its execution time. This is a very fast operation.
1951
+ void
1952
+ zloop_ticket_reset (zloop_t *self, void *handle);
1953
+
1954
+ // Delete a ticket timer. We do not actually delete the ticket here, as
1955
+ // other code may still refer to the ticket. We mark as deleted, and remove
1956
+ // later and safely.
1957
+ void
1958
+ zloop_ticket_delete (zloop_t *self, void *handle);
1959
+
1960
+ // Set the ticket delay, which applies to all tickets. If you lower the
1961
+ // delay and there are already tickets created, the results are undefined.
1962
+ void
1963
+ zloop_set_ticket_delay (zloop_t *self, size_t ticket_delay);
1964
+
1965
+ // Set hard limit on number of timers allowed. Setting more than a small
1966
+ // number of timers (10-100) can have a dramatic impact on the performance
1967
+ // of the reactor. For high-volume cases, use ticket timers. If the hard
1968
+ // limit is reached, the reactor stops creating new timers and logs an
1969
+ // error.
1970
+ void
1971
+ zloop_set_max_timers (zloop_t *self, size_t max_timers);
1972
+
1973
+ // Set verbose tracing of reactor on/off. The default verbose setting is
1974
+ // off (false).
1975
+ void
1976
+ zloop_set_verbose (zloop_t *self, bool verbose);
1977
+
1978
+ // By default the reactor stops if the process receives a SIGINT or SIGTERM
1979
+ // signal. This makes it impossible to shut-down message based architectures
1980
+ // like zactors. This method lets you switch off break handling. The default
1981
+ // nonstop setting is off (false).
1982
+ void
1983
+ zloop_set_nonstop (zloop_t *self, bool nonstop);
1984
+
1985
+ // Start the reactor. Takes control of the thread and returns when the 0MQ
1986
+ // context is terminated or the process is interrupted, or any event handler
1987
+ // returns -1. Event handlers may register new sockets and timers, and
1988
+ // cancel sockets. Returns 0 if interrupted, -1 if canceled by a handler.
1989
+ int
1990
+ zloop_start (zloop_t *self);
1991
+
1992
+ // Self test of this class.
1993
+ void
1994
+ zloop_test (bool verbose);
1995
+
1996
+ // CLASS: zmsg
1997
+ // Create a new empty message object
1998
+ zmsg_t *
1999
+ zmsg_new (void);
2000
+
2001
+ // Destroy a message object and all frames it contains
2002
+ void
2003
+ zmsg_destroy (zmsg_t **self_p);
2004
+
2005
+ // Receive message from socket, returns zmsg_t object or NULL if the recv
2006
+ // was interrupted. Does a blocking recv. If you want to not block then use
2007
+ // the zloop class or zmsg_recv_nowait or zmq_poll to check for socket input
2008
+ // before receiving.
2009
+ zmsg_t *
2010
+ zmsg_recv (void *source);
2011
+
2012
+ // Load/append an open file into new message, return the message.
2013
+ // Returns NULL if the message could not be loaded.
2014
+ zmsg_t *
2015
+ zmsg_load (FILE *file);
2016
+
2017
+ // Decodes a serialized message frame created by zmsg_encode () and returns
2018
+ // a new zmsg_t object. Returns NULL if the frame was badly formatted or
2019
+ // there was insufficient memory to work.
2020
+ zmsg_t *
2021
+ zmsg_decode (zframe_t *frame);
2022
+
2023
+ // Generate a signal message encoding the given status. A signal is a short
2024
+ // message carrying a 1-byte success/failure code (by convention, 0 means
2025
+ // OK). Signals are encoded to be distinguishable from "normal" messages.
2026
+ zmsg_t *
2027
+ zmsg_new_signal (byte status);
2028
+
2029
+ // Send message to destination socket, and destroy the message after sending
2030
+ // it successfully. If the message has no frames, sends nothing but destroys
2031
+ // the message anyhow. Nullifies the caller's reference to the message (as
2032
+ // it is a destructor).
2033
+ int
2034
+ zmsg_send (zmsg_t **self_p, void *dest);
2035
+
2036
+ // Send message to destination socket as part of a multipart sequence, and
2037
+ // destroy the message after sending it successfully. Note that after a
2038
+ // zmsg_sendm, you must call zmsg_send or another method that sends a final
2039
+ // message part. If the message has no frames, sends nothing but destroys
2040
+ // the message anyhow. Nullifies the caller's reference to the message (as
2041
+ // it is a destructor).
2042
+ int
2043
+ zmsg_sendm (zmsg_t **self_p, void *dest);
2044
+
2045
+ // Return size of message, i.e. number of frames (0 or more).
2046
+ size_t
2047
+ zmsg_size (zmsg_t *self);
2048
+
2049
+ // Return total size of all frames in message.
2050
+ size_t
2051
+ zmsg_content_size (zmsg_t *self);
2052
+
2053
+ // Return message routing ID, if the message came from a ZMQ_SERVER socket.
2054
+ // Else returns zero.
2055
+ uint32_t
2056
+ zmsg_routing_id (zmsg_t *self);
2057
+
2058
+ // Set routing ID on message. This is used if/when the message is sent to a
2059
+ // ZMQ_SERVER socket.
2060
+ void
2061
+ zmsg_set_routing_id (zmsg_t *self, uint32_t routing_id);
2062
+
2063
+ // Push frame to the front of the message, i.e. before all other frames.
2064
+ // Message takes ownership of frame, will destroy it when message is sent.
2065
+ // Returns 0 on success, -1 on error. Deprecates zmsg_push, which did not
2066
+ // nullify the caller's frame reference.
2067
+ int
2068
+ zmsg_prepend (zmsg_t *self, zframe_t **frame_p);
2069
+
2070
+ // Add frame to the end of the message, i.e. after all other frames.
2071
+ // Message takes ownership of frame, will destroy it when message is sent.
2072
+ // Returns 0 on success. Deprecates zmsg_add, which did not nullify the
2073
+ // caller's frame reference.
2074
+ int
2075
+ zmsg_append (zmsg_t *self, zframe_t **frame_p);
2076
+
2077
+ // Remove first frame from message, if any. Returns frame, or NULL.
2078
+ zframe_t *
2079
+ zmsg_pop (zmsg_t *self);
2080
+
2081
+ // Push block of memory to front of message, as a new frame.
2082
+ // Returns 0 on success, -1 on error.
2083
+ int
2084
+ zmsg_pushmem (zmsg_t *self, const void *data, size_t size);
2085
+
2086
+ // Add block of memory to the end of the message, as a new frame.
2087
+ // Returns 0 on success, -1 on error.
2088
+ int
2089
+ zmsg_addmem (zmsg_t *self, const void *data, size_t size);
2090
+
2091
+ // Push string as new frame to front of message.
2092
+ // Returns 0 on success, -1 on error.
2093
+ int
2094
+ zmsg_pushstr (zmsg_t *self, const char *string);
2095
+
2096
+ // Push string as new frame to end of message.
2097
+ // Returns 0 on success, -1 on error.
2098
+ int
2099
+ zmsg_addstr (zmsg_t *self, const char *string);
2100
+
2101
+ // Push formatted string as new frame to front of message.
2102
+ // Returns 0 on success, -1 on error.
2103
+ int
2104
+ zmsg_pushstrf (zmsg_t *self, const char *format, ...);
2105
+
2106
+ // Push formatted string as new frame to end of message.
2107
+ // Returns 0 on success, -1 on error.
2108
+ int
2109
+ zmsg_addstrf (zmsg_t *self, const char *format, ...);
2110
+
2111
+ // Pop frame off front of message, return as fresh string. If there were
2112
+ // no more frames in the message, returns NULL.
2113
+ char *
2114
+ zmsg_popstr (zmsg_t *self);
2115
+
2116
+ // Push encoded message as a new frame. Message takes ownership of
2117
+ // submessage, so the original is destroyed in this call. Returns 0 on
2118
+ // success, -1 on error.
2119
+ int
2120
+ zmsg_addmsg (zmsg_t *self, zmsg_t **msg_p);
2121
+
2122
+ // Remove first submessage from message, if any. Returns zmsg_t, or NULL if
2123
+ // decoding was not successful.
2124
+ zmsg_t *
2125
+ zmsg_popmsg (zmsg_t *self);
2126
+
2127
+ // Remove specified frame from list, if present. Does not destroy frame.
2128
+ void
2129
+ zmsg_remove (zmsg_t *self, zframe_t *frame);
2130
+
2131
+ // Set cursor to first frame in message. Returns frame, or NULL, if the
2132
+ // message is empty. Use this to navigate the frames as a list.
2133
+ zframe_t *
2134
+ zmsg_first (zmsg_t *self);
2135
+
2136
+ // Return the next frame. If there are no more frames, returns NULL. To move
2137
+ // to the first frame call zmsg_first(). Advances the cursor.
2138
+ zframe_t *
2139
+ zmsg_next (zmsg_t *self);
2140
+
2141
+ // Return the last frame. If there are no frames, returns NULL.
2142
+ zframe_t *
2143
+ zmsg_last (zmsg_t *self);
2144
+
2145
+ // Save message to an open file, return 0 if OK, else -1. The message is
2146
+ // saved as a series of frames, each with length and data. Note that the
2147
+ // file is NOT guaranteed to be portable between operating systems, not
2148
+ // versions of CZMQ. The file format is at present undocumented and liable
2149
+ // to arbitrary change.
2150
+ int
2151
+ zmsg_save (zmsg_t *self, FILE *file);
2152
+
2153
+ // Serialize multipart message to a single message frame. Use this method
2154
+ // to send structured messages across transports that do not support
2155
+ // multipart data. Allocates and returns a new frame containing the
2156
+ // serialized message. To decode a serialized message frame, use
2157
+ // zmsg_decode ().
2158
+ zframe_t *
2159
+ zmsg_encode (zmsg_t *self);
2160
+
2161
+ // Create copy of message, as new message object. Returns a fresh zmsg_t
2162
+ // object. If message is null, or memory was exhausted, returns null.
2163
+ zmsg_t *
2164
+ zmsg_dup (zmsg_t *self);
2165
+
2166
+ // Send message to zsys log sink (may be stdout, or system facility as
2167
+ // configured by zsys_set_logstream).
2168
+ void
2169
+ zmsg_print (zmsg_t *self);
2170
+
2171
+ // Return true if the two messages have the same number of frames and each
2172
+ // frame in the first message is identical to the corresponding frame in the
2173
+ // other message. As with zframe_eq, return false if either message is NULL.
2174
+ bool
2175
+ zmsg_eq (zmsg_t *self, zmsg_t *other);
2176
+
2177
+ // Return signal value, 0 or greater, if message is a signal, -1 if not.
2178
+ int
2179
+ zmsg_signal (zmsg_t *self);
2180
+
2181
+ // Probe the supplied object, and report if it looks like a zmsg_t.
2182
+ bool
2183
+ zmsg_is (void *self);
2184
+
2185
+ // Self test of this class.
2186
+ void
2187
+ zmsg_test (bool verbose);
2188
+
2189
+ // CLASS: zpoller
2190
+ // Create new poller, specifying zero or more readers. The list of
2191
+ // readers ends in a NULL. Each reader can be a zsock_t instance, a
2192
+ // zactor_t instance, a libzmq socket (void *), or a file handle.
2193
+ zpoller_t *
2194
+ zpoller_new (void *reader, ...);
2195
+
2196
+ // Destroy a poller
2197
+ void
2198
+ zpoller_destroy (zpoller_t **self_p);
2199
+
2200
+ // Add a reader to be polled. Returns 0 if OK, -1 on failure. The reader may
2201
+ // be a libzmq void * socket, a zsock_t instance, or a zactor_t instance.
2202
+ int
2203
+ zpoller_add (zpoller_t *self, void *reader);
2204
+
2205
+ // Remove a reader from the poller; returns 0 if OK, -1 on failure. The reader
2206
+ // must have been passed during construction, or in an zpoller_add () call.
2207
+ int
2208
+ zpoller_remove (zpoller_t *self, void *reader);
2209
+
2210
+ // By default the poller stops if the process receives a SIGINT or SIGTERM
2211
+ // signal. This makes it impossible to shut-down message based architectures
2212
+ // like zactors. This method lets you switch off break handling. The default
2213
+ // nonstop setting is off (false).
2214
+ void
2215
+ zpoller_set_nonstop (zpoller_t *self, bool nonstop);
2216
+
2217
+ // Poll the registered readers for I/O, return first reader that has input.
2218
+ // The reader will be a libzmq void * socket, or a zsock_t or zactor_t
2219
+ // instance as specified in zpoller_new/zpoller_add. The timeout should be
2220
+ // zero or greater, or -1 to wait indefinitely. Socket priority is defined
2221
+ // by their order in the poll list. If you need a balanced poll, use the low
2222
+ // level zmq_poll method directly. If the poll call was interrupted (SIGINT),
2223
+ // or the ZMQ context was destroyed, or the timeout expired, returns NULL.
2224
+ // You can test the actual exit condition by calling zpoller_expired () and
2225
+ // zpoller_terminated (). The timeout is in msec.
2226
+ void *
2227
+ zpoller_wait (zpoller_t *self, int timeout);
2228
+
2229
+ // Return true if the last zpoller_wait () call ended because the timeout
2230
+ // expired, without any error.
2231
+ bool
2232
+ zpoller_expired (zpoller_t *self);
2233
+
2234
+ // Return true if the last zpoller_wait () call ended because the process
2235
+ // was interrupted, or the parent context was destroyed.
2236
+ bool
2237
+ zpoller_terminated (zpoller_t *self);
2238
+
2239
+ // Self test of this class.
2240
+ void
2241
+ zpoller_test (bool verbose);
2242
+
2243
+ // CLASS: zproc
2244
+ // Create a new zproc.
2245
+ // NOTE: On Windows and with libzmq3 and libzmq2 this function
2246
+ // returns NULL. Code needs to be ported there.
2247
+ zproc_t *
2248
+ zproc_new (void);
2249
+
2250
+ // Destroy zproc, wait until process ends.
2251
+ void
2252
+ zproc_destroy (zproc_t **self_p);
2253
+
2254
+ // Setup the command line arguments, the first item must be an (absolute) filename
2255
+ // to run.
2256
+ void
2257
+ zproc_set_args (zproc_t *self, zlistx_t *args);
2258
+
2259
+ // Setup the environment variables for the process.
2260
+ void
2261
+ zproc_set_env (zproc_t *self, zhashx_t *args);
2262
+
2263
+ // Connects process stdin with a readable ('>', connect) zeromq socket. If
2264
+ // socket argument is NULL, zproc creates own managed pair of inproc
2265
+ // sockets. The writable one is then accessbile via zproc_stdin method.
2266
+ void
2267
+ zproc_set_stdin (zproc_t *self, void *socket);
2268
+
2269
+ // Connects process stdout with a writable ('@', bind) zeromq socket. If
2270
+ // socket argument is NULL, zproc creates own managed pair of inproc
2271
+ // sockets. The readable one is then accessbile via zproc_stdout method.
2272
+ void
2273
+ zproc_set_stdout (zproc_t *self, void *socket);
2274
+
2275
+ // Connects process stderr with a writable ('@', bind) zeromq socket. If
2276
+ // socket argument is NULL, zproc creates own managed pair of inproc
2277
+ // sockets. The readable one is then accessbile via zproc_stderr method.
2278
+ void
2279
+ zproc_set_stderr (zproc_t *self, void *socket);
2280
+
2281
+ // Return subprocess stdin writable socket. NULL for
2282
+ // not initialized or external sockets.
2283
+ void *
2284
+ zproc_stdin (zproc_t *self);
2285
+
2286
+ // Return subprocess stdout readable socket. NULL for
2287
+ // not initialized or external sockets.
2288
+ void *
2289
+ zproc_stdout (zproc_t *self);
2290
+
2291
+ // Return subprocess stderr readable socket. NULL for
2292
+ // not initialized or external sockets.
2293
+ void *
2294
+ zproc_stderr (zproc_t *self);
2295
+
2296
+ // Starts the process.
2297
+ int
2298
+ zproc_run (zproc_t *self);
2299
+
2300
+ // process exit code
2301
+ int
2302
+ zproc_returncode (zproc_t *self);
2303
+
2304
+ // PID of the process
2305
+ int
2306
+ zproc_pid (zproc_t *self);
2307
+
2308
+ // return true if process is running, false if not yet started or finished
2309
+ bool
2310
+ zproc_running (zproc_t *self);
2311
+
2312
+ // wait or poll process status, return return code
2313
+ int
2314
+ zproc_wait (zproc_t *self, bool hang);
2315
+
2316
+ // return internal actor, usefull for the polling if process died
2317
+ void *
2318
+ zproc_actor (zproc_t *self);
2319
+
2320
+ // send a signal to the subprocess
2321
+ void
2322
+ zproc_kill (zproc_t *self, int signal);
2323
+
2324
+ // set verbose mode
2325
+ void
2326
+ zproc_set_verbose (zproc_t *self, bool verbose);
2327
+
2328
+ // Returns CZMQ version as a single 6-digit integer encoding the major
2329
+ // version (x 10000), the minor version (x 100) and the patch.
2330
+ int
2331
+ zproc_czmq_version (void);
2332
+
2333
+ // Returns true if the process received a SIGINT or SIGTERM signal.
2334
+ // It is good practice to use this method to exit any infinite loop
2335
+ // processing messages.
2336
+ bool
2337
+ zproc_interrupted (void);
2338
+
2339
+ // Returns true if the underlying libzmq supports CURVE security.
2340
+ bool
2341
+ zproc_has_curve (void);
2342
+
2343
+ // Return current host name, for use in public tcp:// endpoints.
2344
+ // If the host name is not resolvable, returns NULL.
2345
+ char *
2346
+ zproc_hostname (void);
2347
+
2348
+ // Move the current process into the background. The precise effect
2349
+ // depends on the operating system. On POSIX boxes, moves to a specified
2350
+ // working directory (if specified), closes all file handles, reopens
2351
+ // stdin, stdout, and stderr to the null device, and sets the process to
2352
+ // ignore SIGHUP. On Windows, does nothing. Returns 0 if OK, -1 if there
2353
+ // was an error.
2354
+ void
2355
+ zproc_daemonize (const char *workdir);
2356
+
2357
+ // Drop the process ID into the lockfile, with exclusive lock, and
2358
+ // switch the process to the specified group and/or user. Any of the
2359
+ // arguments may be null, indicating a no-op. Returns 0 on success,
2360
+ // -1 on failure. Note if you combine this with zsys_daemonize, run
2361
+ // after, not before that method, or the lockfile will hold the wrong
2362
+ // process ID.
2363
+ void
2364
+ zproc_run_as (const char *lockfile, const char *group, const char *user);
2365
+
2366
+ // Configure the number of I/O threads that ZeroMQ will use. A good
2367
+ // rule of thumb is one thread per gigabit of traffic in or out. The
2368
+ // default is 1, sufficient for most applications. If the environment
2369
+ // variable ZSYS_IO_THREADS is defined, that provides the default.
2370
+ // Note that this method is valid only before any socket is created.
2371
+ void
2372
+ zproc_set_io_threads (size_t io_threads);
2373
+
2374
+ // Configure the number of sockets that ZeroMQ will allow. The default
2375
+ // is 1024. The actual limit depends on the system, and you can query it
2376
+ // by using zsys_socket_limit (). A value of zero means "maximum".
2377
+ // Note that this method is valid only before any socket is created.
2378
+ void
2379
+ zproc_set_max_sockets (size_t max_sockets);
2380
+
2381
+ // Set network interface name to use for broadcasts, particularly zbeacon.
2382
+ // This lets the interface be configured for test environments where required.
2383
+ // For example, on Mac OS X, zbeacon cannot bind to 255.255.255.255 which is
2384
+ // the default when there is no specified interface. If the environment
2385
+ // variable ZSYS_INTERFACE is set, use that as the default interface name.
2386
+ // Setting the interface to "*" means "use all available interfaces".
2387
+ void
2388
+ zproc_set_biface (const char *value);
2389
+
2390
+ // Return network interface to use for broadcasts, or "" if none was set.
2391
+ const char *
2392
+ zproc_biface (void);
2393
+
2394
+ // Set log identity, which is a string that prefixes all log messages sent
2395
+ // by this process. The log identity defaults to the environment variable
2396
+ // ZSYS_LOGIDENT, if that is set.
2397
+ void
2398
+ zproc_set_log_ident (const char *value);
2399
+
2400
+ // Sends log output to a PUB socket bound to the specified endpoint. To
2401
+ // collect such log output, create a SUB socket, subscribe to the traffic
2402
+ // you care about, and connect to the endpoint. Log traffic is sent as a
2403
+ // single string frame, in the same format as when sent to stdout. The
2404
+ // log system supports a single sender; multiple calls to this method will
2405
+ // bind the same sender to multiple endpoints. To disable the sender, call
2406
+ // this method with a null argument.
2407
+ void
2408
+ zproc_set_log_sender (const char *endpoint);
2409
+
2410
+ // Enable or disable logging to the system facility (syslog on POSIX boxes,
2411
+ // event log on Windows). By default this is disabled.
2412
+ void
2413
+ zproc_set_log_system (bool logsystem);
2414
+
2415
+ // Log error condition - highest priority
2416
+ void
2417
+ zproc_log_error (const char *format, ...);
2418
+
2419
+ // Log warning condition - high priority
2420
+ void
2421
+ zproc_log_warning (const char *format, ...);
2422
+
2423
+ // Log normal, but significant, condition - normal priority
2424
+ void
2425
+ zproc_log_notice (const char *format, ...);
2426
+
2427
+ // Log informational message - low priority
2428
+ void
2429
+ zproc_log_info (const char *format, ...);
2430
+
2431
+ // Log debug-level message - lowest priority
2432
+ void
2433
+ zproc_log_debug (const char *format, ...);
2434
+
2435
+ // Self test of this class.
2436
+ void
2437
+ zproc_test (bool verbose);
2438
+
2439
+ // CLASS: zsock
2440
+ // Create a new socket. Returns the new socket, or NULL if the new socket
2441
+ // could not be created. Note that the symbol zsock_new (and other
2442
+ // constructors/destructors for zsock) are redirected to the *_checked
2443
+ // variant, enabling intelligent socket leak detection. This can have
2444
+ // performance implications if you use a LOT of sockets. To turn off this
2445
+ // redirection behaviour, define ZSOCK_NOCHECK.
2446
+ zsock_t *
2447
+ zsock_new (int type);
2448
+
2449
+ // Destroy the socket. You must use this for any socket created via the
2450
+ // zsock_new method.
2451
+ void
2452
+ zsock_destroy (zsock_t **self_p);
2453
+
2454
+ // Create a PUB socket. Default action is bind.
2455
+ zsock_t *
2456
+ zsock_new_pub (const char *endpoint);
2457
+
2458
+ // Create a SUB socket, and optionally subscribe to some prefix string. Default
2459
+ // action is connect.
2460
+ zsock_t *
2461
+ zsock_new_sub (const char *endpoint, const char *subscribe);
2462
+
2463
+ // Create a REQ socket. Default action is connect.
2464
+ zsock_t *
2465
+ zsock_new_req (const char *endpoint);
2466
+
2467
+ // Create a REP socket. Default action is bind.
2468
+ zsock_t *
2469
+ zsock_new_rep (const char *endpoint);
2470
+
2471
+ // Create a DEALER socket. Default action is connect.
2472
+ zsock_t *
2473
+ zsock_new_dealer (const char *endpoint);
2474
+
2475
+ // Create a ROUTER socket. Default action is bind.
2476
+ zsock_t *
2477
+ zsock_new_router (const char *endpoint);
2478
+
2479
+ // Create a PUSH socket. Default action is connect.
2480
+ zsock_t *
2481
+ zsock_new_push (const char *endpoint);
2482
+
2483
+ // Create a PULL socket. Default action is bind.
2484
+ zsock_t *
2485
+ zsock_new_pull (const char *endpoint);
2486
+
2487
+ // Create an XPUB socket. Default action is bind.
2488
+ zsock_t *
2489
+ zsock_new_xpub (const char *endpoint);
2490
+
2491
+ // Create an XSUB socket. Default action is connect.
2492
+ zsock_t *
2493
+ zsock_new_xsub (const char *endpoint);
2494
+
2495
+ // Create a PAIR socket. Default action is connect.
2496
+ zsock_t *
2497
+ zsock_new_pair (const char *endpoint);
2498
+
2499
+ // Create a STREAM socket. Default action is connect.
2500
+ zsock_t *
2501
+ zsock_new_stream (const char *endpoint);
2502
+
2503
+ // Create a SERVER socket. Default action is bind.
2504
+ zsock_t *
2505
+ zsock_new_server (const char *endpoint);
2506
+
2507
+ // Create a CLIENT socket. Default action is connect.
2508
+ zsock_t *
2509
+ zsock_new_client (const char *endpoint);
2510
+
2511
+ // Create a RADIO socket. Default action is bind.
2512
+ zsock_t *
2513
+ zsock_new_radio (const char *endpoint);
2514
+
2515
+ // Create a DISH socket. Default action is connect.
2516
+ zsock_t *
2517
+ zsock_new_dish (const char *endpoint);
2518
+
2519
+ // Create a GATHER socket. Default action is bind.
2520
+ zsock_t *
2521
+ zsock_new_gather (const char *endpoint);
2522
+
2523
+ // Create a SCATTER socket. Default action is connect.
2524
+ zsock_t *
2525
+ zsock_new_scatter (const char *endpoint);
2526
+
2527
+ // Bind a socket to a formatted endpoint. For tcp:// endpoints, supports
2528
+ // ephemeral ports, if you specify the port number as "*". By default
2529
+ // zsock uses the IANA designated range from C000 (49152) to FFFF (65535).
2530
+ // To override this range, follow the "*" with "[first-last]". Either or
2531
+ // both first and last may be empty. To bind to a random port within the
2532
+ // range, use "!" in place of "*".
2533
+ //
2534
+ // Examples:
2535
+ // tcp://127.0.0.1:* bind to first free port from C000 up
2536
+ // tcp://127.0.0.1:! bind to random port from C000 to FFFF
2537
+ // tcp://127.0.0.1:*[60000-] bind to first free port from 60000 up
2538
+ // tcp://127.0.0.1:![-60000] bind to random port from C000 to 60000
2539
+ // tcp://127.0.0.1:![55000-55999]
2540
+ // bind to random port from 55000 to 55999
2541
+ //
2542
+ // On success, returns the actual port number used, for tcp:// endpoints,
2543
+ // and 0 for other transports. On failure, returns -1. Note that when using
2544
+ // ephemeral ports, a port may be reused by different services without
2545
+ // clients being aware. Protocols that run on ephemeral ports should take
2546
+ // this into account.
2547
+ int
2548
+ zsock_bind (zsock_t *self, const char *format, ...);
2549
+
2550
+ // Returns last bound endpoint, if any.
2551
+ const char *
2552
+ zsock_endpoint (zsock_t *self);
2553
+
2554
+ // Unbind a socket from a formatted endpoint.
2555
+ // Returns 0 if OK, -1 if the endpoint was invalid or the function
2556
+ // isn't supported.
2557
+ int
2558
+ zsock_unbind (zsock_t *self, const char *format, ...);
2559
+
2560
+ // Connect a socket to a formatted endpoint
2561
+ // Returns 0 if OK, -1 if the endpoint was invalid.
2562
+ int
2563
+ zsock_connect (zsock_t *self, const char *format, ...);
2564
+
2565
+ // Disconnect a socket from a formatted endpoint
2566
+ // Returns 0 if OK, -1 if the endpoint was invalid or the function
2567
+ // isn't supported.
2568
+ int
2569
+ zsock_disconnect (zsock_t *self, const char *format, ...);
2570
+
2571
+ // Attach a socket to zero or more endpoints. If endpoints is not null,
2572
+ // parses as list of ZeroMQ endpoints, separated by commas, and prefixed by
2573
+ // '@' (to bind the socket) or '>' (to connect the socket). Returns 0 if all
2574
+ // endpoints were valid, or -1 if there was a syntax error. If the endpoint
2575
+ // does not start with '@' or '>', the serverish argument defines whether
2576
+ // it is used to bind (serverish = true) or connect (serverish = false).
2577
+ int
2578
+ zsock_attach (zsock_t *self, const char *endpoints, bool serverish);
2579
+
2580
+ // Returns socket type as printable constant string.
2581
+ const char *
2582
+ zsock_type_str (zsock_t *self);
2583
+
2584
+ // Send a 'picture' message to the socket (or actor). The picture is a
2585
+ // string that defines the type of each frame. This makes it easy to send
2586
+ // a complex multiframe message in one call. The picture can contain any
2587
+ // of these characters, each corresponding to one or two arguments:
2588
+ //
2589
+ // i = int (signed)
2590
+ // 1 = uint8_t
2591
+ // 2 = uint16_t
2592
+ // 4 = uint32_t
2593
+ // 8 = uint64_t
2594
+ // s = char *
2595
+ // b = byte *, size_t (2 arguments)
2596
+ // c = zchunk_t *
2597
+ // f = zframe_t *
2598
+ // h = zhashx_t *
2599
+ // U = zuuid_t *
2600
+ // p = void * (sends the pointer value, only meaningful over inproc)
2601
+ // m = zmsg_t * (sends all frames in the zmsg)
2602
+ // z = sends zero-sized frame (0 arguments)
2603
+ // u = uint (deprecated)
2604
+ //
2605
+ // Note that s, b, c, and f are encoded the same way and the choice is
2606
+ // offered as a convenience to the sender, which may or may not already
2607
+ // have data in a zchunk or zframe. Does not change or take ownership of
2608
+ // any arguments. Returns 0 if successful, -1 if sending failed for any
2609
+ // reason.
2610
+ int
2611
+ zsock_send (void *self, const char *picture, ...);
2612
+
2613
+ // Send a 'picture' message to the socket (or actor). This is a va_list
2614
+ // version of zsock_send (), so please consult its documentation for the
2615
+ // details.
2616
+ int
2617
+ zsock_vsend (void *self, const char *picture, va_list argptr);
2618
+
2619
+ // Receive a 'picture' message to the socket (or actor). See zsock_send for
2620
+ // the format and meaning of the picture. Returns the picture elements into
2621
+ // a series of pointers as provided by the caller:
2622
+ //
2623
+ // i = int * (stores signed integer)
2624
+ // 4 = uint32_t * (stores 32-bit unsigned integer)
2625
+ // 8 = uint64_t * (stores 64-bit unsigned integer)
2626
+ // s = char ** (allocates new string)
2627
+ // b = byte **, size_t * (2 arguments) (allocates memory)
2628
+ // c = zchunk_t ** (creates zchunk)
2629
+ // f = zframe_t ** (creates zframe)
2630
+ // U = zuuid_t * (creates a zuuid with the data)
2631
+ // h = zhashx_t ** (creates zhashx)
2632
+ // p = void ** (stores pointer)
2633
+ // m = zmsg_t ** (creates a zmsg with the remaing frames)
2634
+ // z = null, asserts empty frame (0 arguments)
2635
+ // u = uint * (stores unsigned integer, deprecated)
2636
+ //
2637
+ // Note that zsock_recv creates the returned objects, and the caller must
2638
+ // destroy them when finished with them. The supplied pointers do not need
2639
+ // to be initialized. Returns 0 if successful, or -1 if it failed to recv
2640
+ // a message, in which case the pointers are not modified. When message
2641
+ // frames are truncated (a short message), sets return values to zero/null.
2642
+ // If an argument pointer is NULL, does not store any value (skips it).
2643
+ // An 'n' picture matches an empty frame; if the message does not match,
2644
+ // the method will return -1.
2645
+ int
2646
+ zsock_recv (void *self, const char *picture, ...);
2647
+
2648
+ // Receive a 'picture' message from the socket (or actor). This is a
2649
+ // va_list version of zsock_recv (), so please consult its documentation
2650
+ // for the details.
2651
+ int
2652
+ zsock_vrecv (void *self, const char *picture, va_list argptr);
2653
+
2654
+ // Send a binary encoded 'picture' message to the socket (or actor). This
2655
+ // method is similar to zsock_send, except the arguments are encoded in a
2656
+ // binary format that is compatible with zproto, and is designed to reduce
2657
+ // memory allocations. The pattern argument is a string that defines the
2658
+ // type of each argument. Supports these argument types:
2659
+ //
2660
+ // pattern C type zproto type:
2661
+ // 1 uint8_t type = "number" size = "1"
2662
+ // 2 uint16_t type = "number" size = "2"
2663
+ // 4 uint32_t type = "number" size = "3"
2664
+ // 8 uint64_t type = "number" size = "4"
2665
+ // s char *, 0-255 chars type = "string"
2666
+ // S char *, 0-2^32-1 chars type = "longstr"
2667
+ // c zchunk_t * type = "chunk"
2668
+ // f zframe_t * type = "frame"
2669
+ // u zuuid_t * type = "uuid"
2670
+ // m zmsg_t * type = "msg"
2671
+ // p void *, sends pointer value, only over inproc
2672
+ //
2673
+ // Does not change or take ownership of any arguments. Returns 0 if
2674
+ // successful, -1 if sending failed for any reason.
2675
+ int
2676
+ zsock_bsend (void *self, const char *picture, ...);
2677
+
2678
+ // Receive a binary encoded 'picture' message from the socket (or actor).
2679
+ // This method is similar to zsock_recv, except the arguments are encoded
2680
+ // in a binary format that is compatible with zproto, and is designed to
2681
+ // reduce memory allocations. The pattern argument is a string that defines
2682
+ // the type of each argument. See zsock_bsend for the supported argument
2683
+ // types. All arguments must be pointers; this call sets them to point to
2684
+ // values held on a per-socket basis.
2685
+ // For types 1, 2, 4 and 8 the caller must allocate the memory itself before
2686
+ // calling zsock_brecv.
2687
+ // For types S, the caller must free the value once finished with it, as
2688
+ // zsock_brecv will allocate the buffer.
2689
+ // For type s, the caller must not free the value as it is stored in a
2690
+ // local cache for performance purposes.
2691
+ // For types c, f, u and m the caller must call the appropriate destructor
2692
+ // depending on the object as zsock_brecv will create new objects.
2693
+ // For type p the caller must coordinate with the sender, as it is just a
2694
+ // pointer value being passed.
2695
+ int
2696
+ zsock_brecv (void *self, const char *picture, ...);
2697
+
2698
+ // Return socket routing ID if any. This returns 0 if the socket is not
2699
+ // of type ZMQ_SERVER or if no request was already received on it.
2700
+ uint32_t
2701
+ zsock_routing_id (zsock_t *self);
2702
+
2703
+ // Set routing ID on socket. The socket MUST be of type ZMQ_SERVER.
2704
+ // This will be used when sending messages on the socket via the zsock API.
2705
+ void
2706
+ zsock_set_routing_id (zsock_t *self, uint32_t routing_id);
2707
+
2708
+ // Set socket to use unbounded pipes (HWM=0); use this in cases when you are
2709
+ // totally certain the message volume can fit in memory. This method works
2710
+ // across all versions of ZeroMQ. Takes a polymorphic socket reference.
2711
+ void
2712
+ zsock_set_unbounded (void *self);
2713
+
2714
+ // Send a signal over a socket. A signal is a short message carrying a
2715
+ // success/failure code (by convention, 0 means OK). Signals are encoded
2716
+ // to be distinguishable from "normal" messages. Accepts a zsock_t or a
2717
+ // zactor_t argument, and returns 0 if successful, -1 if the signal could
2718
+ // not be sent. Takes a polymorphic socket reference.
2719
+ int
2720
+ zsock_signal (void *self, byte status);
2721
+
2722
+ // Wait on a signal. Use this to coordinate between threads, over pipe
2723
+ // pairs. Blocks until the signal is received. Returns -1 on error, 0 or
2724
+ // greater on success. Accepts a zsock_t or a zactor_t as argument.
2725
+ // Takes a polymorphic socket reference.
2726
+ int
2727
+ zsock_wait (void *self);
2728
+
2729
+ // If there is a partial message still waiting on the socket, remove and
2730
+ // discard it. This is useful when reading partial messages, to get specific
2731
+ // message types.
2732
+ void
2733
+ zsock_flush (void *self);
2734
+
2735
+ // Join a group for the RADIO-DISH pattern. Call only on ZMQ_DISH.
2736
+ // Returns 0 if OK, -1 if failed.
2737
+ int
2738
+ zsock_join (void *self, const char *group);
2739
+
2740
+ // Leave a group for the RADIO-DISH pattern. Call only on ZMQ_DISH.
2741
+ // Returns 0 if OK, -1 if failed.
2742
+ int
2743
+ zsock_leave (void *self, const char *group);
2744
+
2745
+ // Probe the supplied object, and report if it looks like a zsock_t.
2746
+ // Takes a polymorphic socket reference.
2747
+ bool
2748
+ zsock_is (void *self);
2749
+
2750
+ // Probe the supplied reference. If it looks like a zsock_t instance, return
2751
+ // the underlying libzmq socket handle; else if it looks like a file
2752
+ // descriptor, return NULL; else if it looks like a libzmq socket handle,
2753
+ // return the supplied value. Takes a polymorphic socket reference.
2754
+ void *
2755
+ zsock_resolve (void *self);
2756
+
2757
+ // Get socket option `heartbeat_ivl`.
2758
+ // Available from libzmq 4.2.0.
2759
+ int
2760
+ zsock_heartbeat_ivl (void *self);
2761
+
2762
+ // Set socket option `heartbeat_ivl`.
2763
+ // Available from libzmq 4.2.0.
2764
+ void
2765
+ zsock_set_heartbeat_ivl (void *self, int heartbeat_ivl);
2766
+
2767
+ // Get socket option `heartbeat_ttl`.
2768
+ // Available from libzmq 4.2.0.
2769
+ int
2770
+ zsock_heartbeat_ttl (void *self);
2771
+
2772
+ // Set socket option `heartbeat_ttl`.
2773
+ // Available from libzmq 4.2.0.
2774
+ void
2775
+ zsock_set_heartbeat_ttl (void *self, int heartbeat_ttl);
2776
+
2777
+ // Get socket option `heartbeat_timeout`.
2778
+ // Available from libzmq 4.2.0.
2779
+ int
2780
+ zsock_heartbeat_timeout (void *self);
2781
+
2782
+ // Set socket option `heartbeat_timeout`.
2783
+ // Available from libzmq 4.2.0.
2784
+ void
2785
+ zsock_set_heartbeat_timeout (void *self, int heartbeat_timeout);
2786
+
2787
+ // Get socket option `use_fd`.
2788
+ // Available from libzmq 4.2.0.
2789
+ int
2790
+ zsock_use_fd (void *self);
2791
+
2792
+ // Set socket option `use_fd`.
2793
+ // Available from libzmq 4.2.0.
2794
+ void
2795
+ zsock_set_use_fd (void *self, int use_fd);
2796
+
2797
+ // Set socket option `xpub_manual`.
2798
+ // Available from libzmq 4.2.0.
2799
+ void
2800
+ zsock_set_xpub_manual (void *self, int xpub_manual);
2801
+
2802
+ // Set socket option `xpub_welcome_msg`.
2803
+ // Available from libzmq 4.2.0.
2804
+ void
2805
+ zsock_set_xpub_welcome_msg (void *self, const char *xpub_welcome_msg);
2806
+
2807
+ // Set socket option `stream_notify`.
2808
+ // Available from libzmq 4.2.0.
2809
+ void
2810
+ zsock_set_stream_notify (void *self, int stream_notify);
2811
+
2812
+ // Get socket option `invert_matching`.
2813
+ // Available from libzmq 4.2.0.
2814
+ int
2815
+ zsock_invert_matching (void *self);
2816
+
2817
+ // Set socket option `invert_matching`.
2818
+ // Available from libzmq 4.2.0.
2819
+ void
2820
+ zsock_set_invert_matching (void *self, int invert_matching);
2821
+
2822
+ // Set socket option `xpub_verboser`.
2823
+ // Available from libzmq 4.2.0.
2824
+ void
2825
+ zsock_set_xpub_verboser (void *self, int xpub_verboser);
2826
+
2827
+ // Get socket option `connect_timeout`.
2828
+ // Available from libzmq 4.2.0.
2829
+ int
2830
+ zsock_connect_timeout (void *self);
2831
+
2832
+ // Set socket option `connect_timeout`.
2833
+ // Available from libzmq 4.2.0.
2834
+ void
2835
+ zsock_set_connect_timeout (void *self, int connect_timeout);
2836
+
2837
+ // Get socket option `tcp_maxrt`.
2838
+ // Available from libzmq 4.2.0.
2839
+ int
2840
+ zsock_tcp_maxrt (void *self);
2841
+
2842
+ // Set socket option `tcp_maxrt`.
2843
+ // Available from libzmq 4.2.0.
2844
+ void
2845
+ zsock_set_tcp_maxrt (void *self, int tcp_maxrt);
2846
+
2847
+ // Get socket option `thread_safe`.
2848
+ // Available from libzmq 4.2.0.
2849
+ int
2850
+ zsock_thread_safe (void *self);
2851
+
2852
+ // Get socket option `multicast_maxtpdu`.
2853
+ // Available from libzmq 4.2.0.
2854
+ int
2855
+ zsock_multicast_maxtpdu (void *self);
2856
+
2857
+ // Set socket option `multicast_maxtpdu`.
2858
+ // Available from libzmq 4.2.0.
2859
+ void
2860
+ zsock_set_multicast_maxtpdu (void *self, int multicast_maxtpdu);
2861
+
2862
+ // Get socket option `vmci_buffer_size`.
2863
+ // Available from libzmq 4.2.0.
2864
+ int
2865
+ zsock_vmci_buffer_size (void *self);
2866
+
2867
+ // Set socket option `vmci_buffer_size`.
2868
+ // Available from libzmq 4.2.0.
2869
+ void
2870
+ zsock_set_vmci_buffer_size (void *self, int vmci_buffer_size);
2871
+
2872
+ // Get socket option `vmci_buffer_min_size`.
2873
+ // Available from libzmq 4.2.0.
2874
+ int
2875
+ zsock_vmci_buffer_min_size (void *self);
2876
+
2877
+ // Set socket option `vmci_buffer_min_size`.
2878
+ // Available from libzmq 4.2.0.
2879
+ void
2880
+ zsock_set_vmci_buffer_min_size (void *self, int vmci_buffer_min_size);
2881
+
2882
+ // Get socket option `vmci_buffer_max_size`.
2883
+ // Available from libzmq 4.2.0.
2884
+ int
2885
+ zsock_vmci_buffer_max_size (void *self);
2886
+
2887
+ // Set socket option `vmci_buffer_max_size`.
2888
+ // Available from libzmq 4.2.0.
2889
+ void
2890
+ zsock_set_vmci_buffer_max_size (void *self, int vmci_buffer_max_size);
2891
+
2892
+ // Get socket option `vmci_connect_timeout`.
2893
+ // Available from libzmq 4.2.0.
2894
+ int
2895
+ zsock_vmci_connect_timeout (void *self);
2896
+
2897
+ // Set socket option `vmci_connect_timeout`.
2898
+ // Available from libzmq 4.2.0.
2899
+ void
2900
+ zsock_set_vmci_connect_timeout (void *self, int vmci_connect_timeout);
2901
+
2902
+ // Get socket option `tos`.
2903
+ // Available from libzmq 4.1.0.
2904
+ int
2905
+ zsock_tos (void *self);
2906
+
2907
+ // Set socket option `tos`.
2908
+ // Available from libzmq 4.1.0.
2909
+ void
2910
+ zsock_set_tos (void *self, int tos);
2911
+
2912
+ // Set socket option `router_handover`.
2913
+ // Available from libzmq 4.1.0.
2914
+ void
2915
+ zsock_set_router_handover (void *self, int router_handover);
2916
+
2917
+ // Set socket option `connect_rid`.
2918
+ // Available from libzmq 4.1.0.
2919
+ void
2920
+ zsock_set_connect_rid (void *self, const char *connect_rid);
2921
+
2922
+ // Set socket option `connect_rid` from 32-octet binary
2923
+ // Available from libzmq 4.1.0.
2924
+ void
2925
+ zsock_set_connect_rid_bin (void *self, const byte *connect_rid);
2926
+
2927
+ // Get socket option `handshake_ivl`.
2928
+ // Available from libzmq 4.1.0.
2929
+ int
2930
+ zsock_handshake_ivl (void *self);
2931
+
2932
+ // Set socket option `handshake_ivl`.
2933
+ // Available from libzmq 4.1.0.
2934
+ void
2935
+ zsock_set_handshake_ivl (void *self, int handshake_ivl);
2936
+
2937
+ // Get socket option `socks_proxy`.
2938
+ // Available from libzmq 4.1.0.
2939
+ char *
2940
+ zsock_socks_proxy (void *self);
2941
+
2942
+ // Set socket option `socks_proxy`.
2943
+ // Available from libzmq 4.1.0.
2944
+ void
2945
+ zsock_set_socks_proxy (void *self, const char *socks_proxy);
2946
+
2947
+ // Set socket option `xpub_nodrop`.
2948
+ // Available from libzmq 4.1.0.
2949
+ void
2950
+ zsock_set_xpub_nodrop (void *self, int xpub_nodrop);
2951
+
2952
+ // Set socket option `router_mandatory`.
2953
+ // Available from libzmq 4.0.0.
2954
+ void
2955
+ zsock_set_router_mandatory (void *self, int router_mandatory);
2956
+
2957
+ // Set socket option `probe_router`.
2958
+ // Available from libzmq 4.0.0.
2959
+ void
2960
+ zsock_set_probe_router (void *self, int probe_router);
2961
+
2962
+ // Set socket option `req_relaxed`.
2963
+ // Available from libzmq 4.0.0.
2964
+ void
2965
+ zsock_set_req_relaxed (void *self, int req_relaxed);
2966
+
2967
+ // Set socket option `req_correlate`.
2968
+ // Available from libzmq 4.0.0.
2969
+ void
2970
+ zsock_set_req_correlate (void *self, int req_correlate);
2971
+
2972
+ // Set socket option `conflate`.
2973
+ // Available from libzmq 4.0.0.
2974
+ void
2975
+ zsock_set_conflate (void *self, int conflate);
2976
+
2977
+ // Get socket option `zap_domain`.
2978
+ // Available from libzmq 4.0.0.
2979
+ char *
2980
+ zsock_zap_domain (void *self);
2981
+
2982
+ // Set socket option `zap_domain`.
2983
+ // Available from libzmq 4.0.0.
2984
+ void
2985
+ zsock_set_zap_domain (void *self, const char *zap_domain);
2986
+
2987
+ // Get socket option `mechanism`.
2988
+ // Available from libzmq 4.0.0.
2989
+ int
2990
+ zsock_mechanism (void *self);
2991
+
2992
+ // Get socket option `plain_server`.
2993
+ // Available from libzmq 4.0.0.
2994
+ int
2995
+ zsock_plain_server (void *self);
2996
+
2997
+ // Set socket option `plain_server`.
2998
+ // Available from libzmq 4.0.0.
2999
+ void
3000
+ zsock_set_plain_server (void *self, int plain_server);
3001
+
3002
+ // Get socket option `plain_username`.
3003
+ // Available from libzmq 4.0.0.
3004
+ char *
3005
+ zsock_plain_username (void *self);
3006
+
3007
+ // Set socket option `plain_username`.
3008
+ // Available from libzmq 4.0.0.
3009
+ void
3010
+ zsock_set_plain_username (void *self, const char *plain_username);
3011
+
3012
+ // Get socket option `plain_password`.
3013
+ // Available from libzmq 4.0.0.
3014
+ char *
3015
+ zsock_plain_password (void *self);
3016
+
3017
+ // Set socket option `plain_password`.
3018
+ // Available from libzmq 4.0.0.
3019
+ void
3020
+ zsock_set_plain_password (void *self, const char *plain_password);
3021
+
3022
+ // Get socket option `curve_server`.
3023
+ // Available from libzmq 4.0.0.
3024
+ int
3025
+ zsock_curve_server (void *self);
3026
+
3027
+ // Set socket option `curve_server`.
3028
+ // Available from libzmq 4.0.0.
3029
+ void
3030
+ zsock_set_curve_server (void *self, int curve_server);
3031
+
3032
+ // Get socket option `curve_publickey`.
3033
+ // Available from libzmq 4.0.0.
3034
+ char *
3035
+ zsock_curve_publickey (void *self);
3036
+
3037
+ // Set socket option `curve_publickey`.
3038
+ // Available from libzmq 4.0.0.
3039
+ void
3040
+ zsock_set_curve_publickey (void *self, const char *curve_publickey);
3041
+
3042
+ // Set socket option `curve_publickey` from 32-octet binary
3043
+ // Available from libzmq 4.0.0.
3044
+ void
3045
+ zsock_set_curve_publickey_bin (void *self, const byte *curve_publickey);
3046
+
3047
+ // Get socket option `curve_secretkey`.
3048
+ // Available from libzmq 4.0.0.
3049
+ char *
3050
+ zsock_curve_secretkey (void *self);
3051
+
3052
+ // Set socket option `curve_secretkey`.
3053
+ // Available from libzmq 4.0.0.
3054
+ void
3055
+ zsock_set_curve_secretkey (void *self, const char *curve_secretkey);
3056
+
3057
+ // Set socket option `curve_secretkey` from 32-octet binary
3058
+ // Available from libzmq 4.0.0.
3059
+ void
3060
+ zsock_set_curve_secretkey_bin (void *self, const byte *curve_secretkey);
3061
+
3062
+ // Get socket option `curve_serverkey`.
3063
+ // Available from libzmq 4.0.0.
3064
+ char *
3065
+ zsock_curve_serverkey (void *self);
3066
+
3067
+ // Set socket option `curve_serverkey`.
3068
+ // Available from libzmq 4.0.0.
3069
+ void
3070
+ zsock_set_curve_serverkey (void *self, const char *curve_serverkey);
3071
+
3072
+ // Set socket option `curve_serverkey` from 32-octet binary
3073
+ // Available from libzmq 4.0.0.
3074
+ void
3075
+ zsock_set_curve_serverkey_bin (void *self, const byte *curve_serverkey);
3076
+
3077
+ // Get socket option `gssapi_server`.
3078
+ // Available from libzmq 4.0.0.
3079
+ int
3080
+ zsock_gssapi_server (void *self);
3081
+
3082
+ // Set socket option `gssapi_server`.
3083
+ // Available from libzmq 4.0.0.
3084
+ void
3085
+ zsock_set_gssapi_server (void *self, int gssapi_server);
3086
+
3087
+ // Get socket option `gssapi_plaintext`.
3088
+ // Available from libzmq 4.0.0.
3089
+ int
3090
+ zsock_gssapi_plaintext (void *self);
3091
+
3092
+ // Set socket option `gssapi_plaintext`.
3093
+ // Available from libzmq 4.0.0.
3094
+ void
3095
+ zsock_set_gssapi_plaintext (void *self, int gssapi_plaintext);
3096
+
3097
+ // Get socket option `gssapi_principal`.
3098
+ // Available from libzmq 4.0.0.
3099
+ char *
3100
+ zsock_gssapi_principal (void *self);
3101
+
3102
+ // Set socket option `gssapi_principal`.
3103
+ // Available from libzmq 4.0.0.
3104
+ void
3105
+ zsock_set_gssapi_principal (void *self, const char *gssapi_principal);
3106
+
3107
+ // Get socket option `gssapi_service_principal`.
3108
+ // Available from libzmq 4.0.0.
3109
+ char *
3110
+ zsock_gssapi_service_principal (void *self);
3111
+
3112
+ // Set socket option `gssapi_service_principal`.
3113
+ // Available from libzmq 4.0.0.
3114
+ void
3115
+ zsock_set_gssapi_service_principal (void *self, const char *gssapi_service_principal);
3116
+
3117
+ // Get socket option `ipv6`.
3118
+ // Available from libzmq 4.0.0.
3119
+ int
3120
+ zsock_ipv6 (void *self);
3121
+
3122
+ // Set socket option `ipv6`.
3123
+ // Available from libzmq 4.0.0.
3124
+ void
3125
+ zsock_set_ipv6 (void *self, int ipv6);
3126
+
3127
+ // Get socket option `immediate`.
3128
+ // Available from libzmq 4.0.0.
3129
+ int
3130
+ zsock_immediate (void *self);
3131
+
3132
+ // Set socket option `immediate`.
3133
+ // Available from libzmq 4.0.0.
3134
+ void
3135
+ zsock_set_immediate (void *self, int immediate);
3136
+
3137
+ // Get socket option `sndhwm`.
3138
+ // Available from libzmq 3.0.0.
3139
+ int
3140
+ zsock_sndhwm (void *self);
3141
+
3142
+ // Set socket option `sndhwm`.
3143
+ // Available from libzmq 3.0.0.
3144
+ void
3145
+ zsock_set_sndhwm (void *self, int sndhwm);
3146
+
3147
+ // Get socket option `rcvhwm`.
3148
+ // Available from libzmq 3.0.0.
3149
+ int
3150
+ zsock_rcvhwm (void *self);
3151
+
3152
+ // Set socket option `rcvhwm`.
3153
+ // Available from libzmq 3.0.0.
3154
+ void
3155
+ zsock_set_rcvhwm (void *self, int rcvhwm);
3156
+
3157
+ // Get socket option `maxmsgsize`.
3158
+ // Available from libzmq 3.0.0.
3159
+ int
3160
+ zsock_maxmsgsize (void *self);
3161
+
3162
+ // Set socket option `maxmsgsize`.
3163
+ // Available from libzmq 3.0.0.
3164
+ void
3165
+ zsock_set_maxmsgsize (void *self, int maxmsgsize);
3166
+
3167
+ // Get socket option `multicast_hops`.
3168
+ // Available from libzmq 3.0.0.
3169
+ int
3170
+ zsock_multicast_hops (void *self);
3171
+
3172
+ // Set socket option `multicast_hops`.
3173
+ // Available from libzmq 3.0.0.
3174
+ void
3175
+ zsock_set_multicast_hops (void *self, int multicast_hops);
3176
+
3177
+ // Set socket option `xpub_verbose`.
3178
+ // Available from libzmq 3.0.0.
3179
+ void
3180
+ zsock_set_xpub_verbose (void *self, int xpub_verbose);
3181
+
3182
+ // Get socket option `tcp_keepalive`.
3183
+ // Available from libzmq 3.0.0.
3184
+ int
3185
+ zsock_tcp_keepalive (void *self);
3186
+
3187
+ // Set socket option `tcp_keepalive`.
3188
+ // Available from libzmq 3.0.0.
3189
+ void
3190
+ zsock_set_tcp_keepalive (void *self, int tcp_keepalive);
3191
+
3192
+ // Get socket option `tcp_keepalive_idle`.
3193
+ // Available from libzmq 3.0.0.
3194
+ int
3195
+ zsock_tcp_keepalive_idle (void *self);
3196
+
3197
+ // Set socket option `tcp_keepalive_idle`.
3198
+ // Available from libzmq 3.0.0.
3199
+ void
3200
+ zsock_set_tcp_keepalive_idle (void *self, int tcp_keepalive_idle);
3201
+
3202
+ // Get socket option `tcp_keepalive_cnt`.
3203
+ // Available from libzmq 3.0.0.
3204
+ int
3205
+ zsock_tcp_keepalive_cnt (void *self);
3206
+
3207
+ // Set socket option `tcp_keepalive_cnt`.
3208
+ // Available from libzmq 3.0.0.
3209
+ void
3210
+ zsock_set_tcp_keepalive_cnt (void *self, int tcp_keepalive_cnt);
3211
+
3212
+ // Get socket option `tcp_keepalive_intvl`.
3213
+ // Available from libzmq 3.0.0.
3214
+ int
3215
+ zsock_tcp_keepalive_intvl (void *self);
3216
+
3217
+ // Set socket option `tcp_keepalive_intvl`.
3218
+ // Available from libzmq 3.0.0.
3219
+ void
3220
+ zsock_set_tcp_keepalive_intvl (void *self, int tcp_keepalive_intvl);
3221
+
3222
+ // Get socket option `tcp_accept_filter`.
3223
+ // Available from libzmq 3.0.0.
3224
+ char *
3225
+ zsock_tcp_accept_filter (void *self);
3226
+
3227
+ // Set socket option `tcp_accept_filter`.
3228
+ // Available from libzmq 3.0.0.
3229
+ void
3230
+ zsock_set_tcp_accept_filter (void *self, const char *tcp_accept_filter);
3231
+
3232
+ // Get socket option `last_endpoint`.
3233
+ // Available from libzmq 3.0.0.
3234
+ char *
3235
+ zsock_last_endpoint (void *self);
3236
+
3237
+ // Set socket option `router_raw`.
3238
+ // Available from libzmq 3.0.0.
3239
+ void
3240
+ zsock_set_router_raw (void *self, int router_raw);
3241
+
3242
+ // Get socket option `ipv4only`.
3243
+ // Available from libzmq 3.0.0.
3244
+ int
3245
+ zsock_ipv4only (void *self);
3246
+
3247
+ // Set socket option `ipv4only`.
3248
+ // Available from libzmq 3.0.0.
3249
+ void
3250
+ zsock_set_ipv4only (void *self, int ipv4only);
3251
+
3252
+ // Set socket option `delay_attach_on_connect`.
3253
+ // Available from libzmq 3.0.0.
3254
+ void
3255
+ zsock_set_delay_attach_on_connect (void *self, int delay_attach_on_connect);
3256
+
3257
+ // Get socket option `hwm`.
3258
+ // Available from libzmq 2.0.0 to 3.0.0.
3259
+ int
3260
+ zsock_hwm (void *self);
3261
+
3262
+ // Set socket option `hwm`.
3263
+ // Available from libzmq 2.0.0 to 3.0.0.
3264
+ void
3265
+ zsock_set_hwm (void *self, int hwm);
3266
+
3267
+ // Get socket option `swap`.
3268
+ // Available from libzmq 2.0.0 to 3.0.0.
3269
+ int
3270
+ zsock_swap (void *self);
3271
+
3272
+ // Set socket option `swap`.
3273
+ // Available from libzmq 2.0.0 to 3.0.0.
3274
+ void
3275
+ zsock_set_swap (void *self, int swap);
3276
+
3277
+ // Get socket option `affinity`.
3278
+ // Available from libzmq 2.0.0.
3279
+ int
3280
+ zsock_affinity (void *self);
3281
+
3282
+ // Set socket option `affinity`.
3283
+ // Available from libzmq 2.0.0.
3284
+ void
3285
+ zsock_set_affinity (void *self, int affinity);
3286
+
3287
+ // Get socket option `identity`.
3288
+ // Available from libzmq 2.0.0.
3289
+ char *
3290
+ zsock_identity (void *self);
3291
+
3292
+ // Set socket option `identity`.
3293
+ // Available from libzmq 2.0.0.
3294
+ void
3295
+ zsock_set_identity (void *self, const char *identity);
3296
+
3297
+ // Get socket option `rate`.
3298
+ // Available from libzmq 2.0.0.
3299
+ int
3300
+ zsock_rate (void *self);
3301
+
3302
+ // Set socket option `rate`.
3303
+ // Available from libzmq 2.0.0.
3304
+ void
3305
+ zsock_set_rate (void *self, int rate);
3306
+
3307
+ // Get socket option `recovery_ivl`.
3308
+ // Available from libzmq 2.0.0.
3309
+ int
3310
+ zsock_recovery_ivl (void *self);
3311
+
3312
+ // Set socket option `recovery_ivl`.
3313
+ // Available from libzmq 2.0.0.
3314
+ void
3315
+ zsock_set_recovery_ivl (void *self, int recovery_ivl);
3316
+
3317
+ // Get socket option `recovery_ivl_msec`.
3318
+ // Available from libzmq 2.0.0 to 3.0.0.
3319
+ int
3320
+ zsock_recovery_ivl_msec (void *self);
3321
+
3322
+ // Set socket option `recovery_ivl_msec`.
3323
+ // Available from libzmq 2.0.0 to 3.0.0.
3324
+ void
3325
+ zsock_set_recovery_ivl_msec (void *self, int recovery_ivl_msec);
3326
+
3327
+ // Get socket option `mcast_loop`.
3328
+ // Available from libzmq 2.0.0 to 3.0.0.
3329
+ int
3330
+ zsock_mcast_loop (void *self);
3331
+
3332
+ // Set socket option `mcast_loop`.
3333
+ // Available from libzmq 2.0.0 to 3.0.0.
3334
+ void
3335
+ zsock_set_mcast_loop (void *self, int mcast_loop);
3336
+
3337
+ // Get socket option `rcvtimeo`.
3338
+ // Available from libzmq 2.2.0.
3339
+ int
3340
+ zsock_rcvtimeo (void *self);
3341
+
3342
+ // Set socket option `rcvtimeo`.
3343
+ // Available from libzmq 2.2.0.
3344
+ void
3345
+ zsock_set_rcvtimeo (void *self, int rcvtimeo);
3346
+
3347
+ // Get socket option `sndtimeo`.
3348
+ // Available from libzmq 2.2.0.
3349
+ int
3350
+ zsock_sndtimeo (void *self);
3351
+
3352
+ // Set socket option `sndtimeo`.
3353
+ // Available from libzmq 2.2.0.
3354
+ void
3355
+ zsock_set_sndtimeo (void *self, int sndtimeo);
3356
+
3357
+ // Get socket option `sndbuf`.
3358
+ // Available from libzmq 2.0.0.
3359
+ int
3360
+ zsock_sndbuf (void *self);
3361
+
3362
+ // Set socket option `sndbuf`.
3363
+ // Available from libzmq 2.0.0.
3364
+ void
3365
+ zsock_set_sndbuf (void *self, int sndbuf);
3366
+
3367
+ // Get socket option `rcvbuf`.
3368
+ // Available from libzmq 2.0.0.
3369
+ int
3370
+ zsock_rcvbuf (void *self);
3371
+
3372
+ // Set socket option `rcvbuf`.
3373
+ // Available from libzmq 2.0.0.
3374
+ void
3375
+ zsock_set_rcvbuf (void *self, int rcvbuf);
3376
+
3377
+ // Get socket option `linger`.
3378
+ // Available from libzmq 2.0.0.
3379
+ int
3380
+ zsock_linger (void *self);
3381
+
3382
+ // Set socket option `linger`.
3383
+ // Available from libzmq 2.0.0.
3384
+ void
3385
+ zsock_set_linger (void *self, int linger);
3386
+
3387
+ // Get socket option `reconnect_ivl`.
3388
+ // Available from libzmq 2.0.0.
3389
+ int
3390
+ zsock_reconnect_ivl (void *self);
3391
+
3392
+ // Set socket option `reconnect_ivl`.
3393
+ // Available from libzmq 2.0.0.
3394
+ void
3395
+ zsock_set_reconnect_ivl (void *self, int reconnect_ivl);
3396
+
3397
+ // Get socket option `reconnect_ivl_max`.
3398
+ // Available from libzmq 2.0.0.
3399
+ int
3400
+ zsock_reconnect_ivl_max (void *self);
3401
+
3402
+ // Set socket option `reconnect_ivl_max`.
3403
+ // Available from libzmq 2.0.0.
3404
+ void
3405
+ zsock_set_reconnect_ivl_max (void *self, int reconnect_ivl_max);
3406
+
3407
+ // Get socket option `backlog`.
3408
+ // Available from libzmq 2.0.0.
3409
+ int
3410
+ zsock_backlog (void *self);
3411
+
3412
+ // Set socket option `backlog`.
3413
+ // Available from libzmq 2.0.0.
3414
+ void
3415
+ zsock_set_backlog (void *self, int backlog);
3416
+
3417
+ // Set socket option `subscribe`.
3418
+ // Available from libzmq 2.0.0.
3419
+ void
3420
+ zsock_set_subscribe (void *self, const char *subscribe);
3421
+
3422
+ // Set socket option `unsubscribe`.
3423
+ // Available from libzmq 2.0.0.
3424
+ void
3425
+ zsock_set_unsubscribe (void *self, const char *unsubscribe);
3426
+
3427
+ // Get socket option `type`.
3428
+ // Available from libzmq 2.0.0.
3429
+ int
3430
+ zsock_type (void *self);
3431
+
3432
+ // Get socket option `rcvmore`.
3433
+ // Available from libzmq 2.0.0.
3434
+ int
3435
+ zsock_rcvmore (void *self);
3436
+
3437
+ // Get socket option `fd`.
3438
+ // Available from libzmq 2.0.0.
3439
+ SOCKET
3440
+ zsock_fd (void *self);
3441
+
3442
+ // Get socket option `events`.
3443
+ // Available from libzmq 2.0.0.
3444
+ int
3445
+ zsock_events (void *self);
3446
+
3447
+ // Self test of this class.
3448
+ void
3449
+ zsock_test (bool verbose);
3450
+
3451
+ // CLASS: zstr
3452
+ // Receive C string from socket. Caller must free returned string using
3453
+ // zstr_free(). Returns NULL if the context is being terminated or the
3454
+ // process was interrupted.
3455
+ char *
3456
+ zstr_recv (void *source);
3457
+
3458
+ // Receive a series of strings (until NULL) from multipart data.
3459
+ // Each string is allocated and filled with string data; if there
3460
+ // are not enough frames, unallocated strings are set to NULL.
3461
+ // Returns -1 if the message could not be read, else returns the
3462
+ // number of strings filled, zero or more. Free each returned string
3463
+ // using zstr_free(). If not enough strings are provided, remaining
3464
+ // multipart frames in the message are dropped.
3465
+ int
3466
+ zstr_recvx (void *source, char **string_p, ...);
3467
+
3468
+ // De-compress and receive C string from socket, received as a message
3469
+ // with two frames: size of the uncompressed string, and the string itself.
3470
+ // Caller must free returned string using zstr_free(). Returns NULL if the
3471
+ // context is being terminated or the process was interrupted.
3472
+ char *
3473
+ zstr_recv_compress (void *source);
3474
+
3475
+ // Send a C string to a socket, as a frame. The string is sent without
3476
+ // trailing null byte; to read this you can use zstr_recv, or a similar
3477
+ // method that adds a null terminator on the received string. String
3478
+ // may be NULL, which is sent as "".
3479
+ int
3480
+ zstr_send (void *dest, const char *string);
3481
+
3482
+ // Send a C string to a socket, as zstr_send(), with a MORE flag, so that
3483
+ // you can send further strings in the same multi-part message.
3484
+ int
3485
+ zstr_sendm (void *dest, const char *string);
3486
+
3487
+ // Send a formatted string to a socket. Note that you should NOT use
3488
+ // user-supplied strings in the format (they may contain '%' which
3489
+ // will create security holes).
3490
+ int
3491
+ zstr_sendf (void *dest, const char *format, ...);
3492
+
3493
+ // Send a formatted string to a socket, as for zstr_sendf(), with a
3494
+ // MORE flag, so that you can send further strings in the same multi-part
3495
+ // message.
3496
+ int
3497
+ zstr_sendfm (void *dest, const char *format, ...);
3498
+
3499
+ // Send a series of strings (until NULL) as multipart data
3500
+ // Returns 0 if the strings could be sent OK, or -1 on error.
3501
+ int
3502
+ zstr_sendx (void *dest, const char *string, ...);
3503
+
3504
+ // Compress and send a C string to a socket, as a message with two frames:
3505
+ // size of the uncompressed string, and the string itself. The string is
3506
+ // sent without trailing null byte; to read this you can use
3507
+ // zstr_recv_compress, or a similar method that de-compresses and adds a
3508
+ // null terminator on the received string.
3509
+ int
3510
+ zstr_send_compress (void *dest, const char *string);
3511
+
3512
+ // Compress and send a C string to a socket, as zstr_send_compress(),
3513
+ // with a MORE flag, so that you can send further strings in the same
3514
+ // multi-part message.
3515
+ int
3516
+ zstr_sendm_compress (void *dest, const char *string);
3517
+
3518
+ // Accepts a void pointer and returns a fresh character string. If source
3519
+ // is null, returns an empty string.
3520
+ char *
3521
+ zstr_str (void *source);
3522
+
3523
+ // Free a provided string, and nullify the parent pointer. Safe to call on
3524
+ // a null pointer.
3525
+ void
3526
+ zstr_free (char **string_p);
3527
+
3528
+ // Self test of this class.
3529
+ void
3530
+ zstr_test (bool verbose);
3531
+
3532
+ // CLASS: zsys
3533
+ // Initialize CZMQ zsys layer; this happens automatically when you create
3534
+ // a socket or an actor; however this call lets you force initialization
3535
+ // earlier, so e.g. logging is properly set-up before you start working.
3536
+ // Not threadsafe, so call only from main thread. Safe to call multiple
3537
+ // times. Returns global CZMQ context.
3538
+ void *
3539
+ zsys_init (void);
3540
+
3541
+ // Optionally shut down the CZMQ zsys layer; this normally happens automatically
3542
+ // when the process exits; however this call lets you force a shutdown
3543
+ // earlier, avoiding any potential problems with atexit() ordering, especially
3544
+ // with Windows dlls.
3545
+ void
3546
+ zsys_shutdown (void);
3547
+
3548
+ // Get a new ZMQ socket, automagically creating a ZMQ context if this is
3549
+ // the first time. Caller is responsible for destroying the ZMQ socket
3550
+ // before process exits, to avoid a ZMQ deadlock. Note: you should not use
3551
+ // this method in CZMQ apps, use zsock_new() instead.
3552
+ // *** This is for CZMQ internal use only and may change arbitrarily ***
3553
+ void *
3554
+ zsys_socket (int type, const char *filename, size_t line_nbr);
3555
+
3556
+ // Destroy/close a ZMQ socket. You should call this for every socket you
3557
+ // create using zsys_socket().
3558
+ // *** This is for CZMQ internal use only and may change arbitrarily ***
3559
+ int
3560
+ zsys_close (void *handle, const char *filename, size_t line_nbr);
3561
+
3562
+ // Return ZMQ socket name for socket type
3563
+ // *** This is for CZMQ internal use only and may change arbitrarily ***
3564
+ char *
3565
+ zsys_sockname (int socktype);
3566
+
3567
+ // Create a pipe, which consists of two PAIR sockets connected over inproc.
3568
+ // The pipe is configured to use the zsys_pipehwm setting. Returns the
3569
+ // frontend socket successful, NULL if failed.
3570
+ zsock_t *
3571
+ zsys_create_pipe (zsock_t **backend_p);
3572
+
3573
+ // Set interrupt handler; this saves the default handlers so that a
3574
+ // zsys_handler_reset () can restore them. If you call this multiple times
3575
+ // then the last handler will take affect. If handler_fn is NULL, disables
3576
+ // default SIGINT/SIGTERM handling in CZMQ.
3577
+ void
3578
+ zsys_handler_set (zsys_handler_fn *handler_fn);
3579
+
3580
+ // Reset interrupt handler, call this at exit if needed
3581
+ void
3582
+ zsys_handler_reset (void);
3583
+
3584
+ // Set default interrupt handler, so Ctrl-C or SIGTERM will set
3585
+ // zsys_interrupted. Idempotent; safe to call multiple times.
3586
+ // Can be supressed by ZSYS_SIGHANDLER=false
3587
+ // *** This is for CZMQ internal use only and may change arbitrarily ***
3588
+ void
3589
+ zsys_catch_interrupts (void);
3590
+
3591
+ // Return 1 if file exists, else zero
3592
+ bool
3593
+ zsys_file_exists (const char *filename);
3594
+
3595
+ // Return file modification time. Returns 0 if the file does not exist.
3596
+ time_t
3597
+ zsys_file_modified (const char *filename);
3598
+
3599
+ // Return file mode; provides at least support for the POSIX S_ISREG(m)
3600
+ // and S_ISDIR(m) macros and the S_IRUSR and S_IWUSR bits, on all boxes.
3601
+ // Returns a mode_t cast to int, or -1 in case of error.
3602
+ int
3603
+ zsys_file_mode (const char *filename);
3604
+
3605
+ // Delete file. Does not complain if the file is absent
3606
+ int
3607
+ zsys_file_delete (const char *filename);
3608
+
3609
+ // Check if file is 'stable'
3610
+ bool
3611
+ zsys_file_stable (const char *filename);
3612
+
3613
+ // Create a file path if it doesn't exist. The file path is treated as
3614
+ // printf format.
3615
+ int
3616
+ zsys_dir_create (const char *pathname, ...);
3617
+
3618
+ // Remove a file path if empty; the pathname is treated as printf format.
3619
+ int
3620
+ zsys_dir_delete (const char *pathname, ...);
3621
+
3622
+ // Move to a specified working directory. Returns 0 if OK, -1 if this failed.
3623
+ int
3624
+ zsys_dir_change (const char *pathname);
3625
+
3626
+ // Set private file creation mode; all files created from here will be
3627
+ // readable/writable by the owner only.
3628
+ void
3629
+ zsys_file_mode_private (void);
3630
+
3631
+ // Reset default file creation mode; all files created from here will use
3632
+ // process file mode defaults.
3633
+ void
3634
+ zsys_file_mode_default (void);
3635
+
3636
+ // Return the CZMQ version for run-time API detection; returns version
3637
+ // number into provided fields, providing reference isn't null in each case.
3638
+ void
3639
+ zsys_version (int *major, int *minor, int *patch);
3640
+
3641
+ // Format a string using printf formatting, returning a freshly allocated
3642
+ // buffer. If there was insufficient memory, returns NULL. Free the returned
3643
+ // string using zstr_free().
3644
+ char *
3645
+ zsys_sprintf (const char *format, ...);
3646
+
3647
+ // Format a string with a va_list argument, returning a freshly allocated
3648
+ // buffer. If there was insufficient memory, returns NULL. Free the returned
3649
+ // string using zstr_free().
3650
+ char *
3651
+ zsys_vprintf (const char *format, va_list argptr);
3652
+
3653
+ // Create UDP beacon socket; if the routable option is true, uses
3654
+ // multicast (not yet implemented), else uses broadcast. This method
3655
+ // and related ones might _eventually_ be moved to a zudp class.
3656
+ // *** This is for CZMQ internal use only and may change arbitrarily ***
3657
+ SOCKET
3658
+ zsys_udp_new (bool routable);
3659
+
3660
+ // Close a UDP socket
3661
+ // *** This is for CZMQ internal use only and may change arbitrarily ***
3662
+ int
3663
+ zsys_udp_close (SOCKET handle);
3664
+
3665
+ // Send zframe to UDP socket, return -1 if sending failed due to
3666
+ // interface having disappeared (happens easily with WiFi)
3667
+ // *** This is for CZMQ internal use only and may change arbitrarily ***
3668
+ int
3669
+ zsys_udp_send (SOCKET udpsock, zframe_t *frame, inaddr_t *address, int addrlen);
3670
+
3671
+ // Receive zframe from UDP socket, and set address of peer that sent it
3672
+ // The peername must be a char [INET_ADDRSTRLEN] array if IPv6 is disabled or
3673
+ // NI_MAXHOST if it's enabled. Returns NULL when failing to get peer address.
3674
+ // *** This is for CZMQ internal use only and may change arbitrarily ***
3675
+ zframe_t *
3676
+ zsys_udp_recv (SOCKET udpsock, char *peername, int peerlen);
3677
+
3678
+ // Handle an I/O error on some socket operation; will report and die on
3679
+ // fatal errors, and continue silently on "try again" errors.
3680
+ // *** This is for CZMQ internal use only and may change arbitrarily ***
3681
+ void
3682
+ zsys_socket_error (const char *reason);
3683
+
3684
+ // Return current host name, for use in public tcp:// endpoints. Caller gets
3685
+ // a freshly allocated string, should free it using zstr_free(). If the host
3686
+ // name is not resolvable, returns NULL.
3687
+ char *
3688
+ zsys_hostname (void);
3689
+
3690
+ // Move the current process into the background. The precise effect depends
3691
+ // on the operating system. On POSIX boxes, moves to a specified working
3692
+ // directory (if specified), closes all file handles, reopens stdin, stdout,
3693
+ // and stderr to the null device, and sets the process to ignore SIGHUP. On
3694
+ // Windows, does nothing. Returns 0 if OK, -1 if there was an error.
3695
+ int
3696
+ zsys_daemonize (const char *workdir);
3697
+
3698
+ // Drop the process ID into the lockfile, with exclusive lock, and switch
3699
+ // the process to the specified group and/or user. Any of the arguments
3700
+ // may be null, indicating a no-op. Returns 0 on success, -1 on failure.
3701
+ // Note if you combine this with zsys_daemonize, run after, not before
3702
+ // that method, or the lockfile will hold the wrong process ID.
3703
+ int
3704
+ zsys_run_as (const char *lockfile, const char *group, const char *user);
3705
+
3706
+ // Returns true if the underlying libzmq supports CURVE security.
3707
+ // Uses a heuristic probe according to the version of libzmq being used.
3708
+ bool
3709
+ zsys_has_curve (void);
3710
+
3711
+ // Configure the number of I/O threads that ZeroMQ will use. A good
3712
+ // rule of thumb is one thread per gigabit of traffic in or out. The
3713
+ // default is 1, sufficient for most applications. If the environment
3714
+ // variable ZSYS_IO_THREADS is defined, that provides the default.
3715
+ // Note that this method is valid only before any socket is created.
3716
+ void
3717
+ zsys_set_io_threads (size_t io_threads);
3718
+
3719
+ // Configure the scheduling policy of the ZMQ context thread pool.
3720
+ // Not available on Windows. See the sched_setscheduler man page or sched.h
3721
+ // for more information. If the environment variable ZSYS_THREAD_SCHED_POLICY
3722
+ // is defined, that provides the default.
3723
+ // Note that this method is valid only before any socket is created.
3724
+ void
3725
+ zsys_set_thread_sched_policy (int policy);
3726
+
3727
+ // Configure the scheduling priority of the ZMQ context thread pool.
3728
+ // Not available on Windows. See the sched_setscheduler man page or sched.h
3729
+ // for more information. If the environment variable ZSYS_THREAD_PRIORITY is
3730
+ // defined, that provides the default.
3731
+ // Note that this method is valid only before any socket is created.
3732
+ void
3733
+ zsys_set_thread_priority (int priority);
3734
+
3735
+ // Configure the number of sockets that ZeroMQ will allow. The default
3736
+ // is 1024. The actual limit depends on the system, and you can query it
3737
+ // by using zsys_socket_limit (). A value of zero means "maximum".
3738
+ // Note that this method is valid only before any socket is created.
3739
+ void
3740
+ zsys_set_max_sockets (size_t max_sockets);
3741
+
3742
+ // Return maximum number of ZeroMQ sockets that the system will support.
3743
+ size_t
3744
+ zsys_socket_limit (void);
3745
+
3746
+ // Configure the maximum allowed size of a message sent.
3747
+ // The default is INT_MAX.
3748
+ void
3749
+ zsys_set_max_msgsz (int max_msgsz);
3750
+
3751
+ // Return maximum message size.
3752
+ int
3753
+ zsys_max_msgsz (void);
3754
+
3755
+ // Configure the threshold value of filesystem object age per st_mtime
3756
+ // that should elapse until we consider that object "stable" at the
3757
+ // current zclock_time() moment.
3758
+ // The default is S_DEFAULT_ZSYS_FILE_STABLE_AGE_MSEC defined in zsys.c
3759
+ // which generally depends on host OS, with fallback value of 5000.
3760
+ void
3761
+ zsys_set_file_stable_age_msec (int64_t file_stable_age_msec);
3762
+
3763
+ // Return current threshold value of file stable age in msec.
3764
+ // This can be used in code that chooses to wait for this timeout
3765
+ // before testing if a filesystem object is "stable" or not.
3766
+ int64_t
3767
+ zsys_file_stable_age_msec (void);
3768
+
3769
+ // Configure the default linger timeout in msecs for new zsock instances.
3770
+ // You can also set this separately on each zsock_t instance. The default
3771
+ // linger time is zero, i.e. any pending messages will be dropped. If the
3772
+ // environment variable ZSYS_LINGER is defined, that provides the default.
3773
+ // Note that process exit will typically be delayed by the linger time.
3774
+ void
3775
+ zsys_set_linger (size_t linger);
3776
+
3777
+ // Configure the default outgoing pipe limit (HWM) for new zsock instances.
3778
+ // You can also set this separately on each zsock_t instance. The default
3779
+ // HWM is 1,000, on all versions of ZeroMQ. If the environment variable
3780
+ // ZSYS_SNDHWM is defined, that provides the default. Note that a value of
3781
+ // zero means no limit, i.e. infinite memory consumption.
3782
+ void
3783
+ zsys_set_sndhwm (size_t sndhwm);
3784
+
3785
+ // Configure the default incoming pipe limit (HWM) for new zsock instances.
3786
+ // You can also set this separately on each zsock_t instance. The default
3787
+ // HWM is 1,000, on all versions of ZeroMQ. If the environment variable
3788
+ // ZSYS_RCVHWM is defined, that provides the default. Note that a value of
3789
+ // zero means no limit, i.e. infinite memory consumption.
3790
+ void
3791
+ zsys_set_rcvhwm (size_t rcvhwm);
3792
+
3793
+ // Configure the default HWM for zactor internal pipes; this is set on both
3794
+ // ends of the pipe, for outgoing messages only (sndhwm). The default HWM is
3795
+ // 1,000, on all versions of ZeroMQ. If the environment var ZSYS_ACTORHWM is
3796
+ // defined, that provides the default. Note that a value of zero means no
3797
+ // limit, i.e. infinite memory consumption.
3798
+ void
3799
+ zsys_set_pipehwm (size_t pipehwm);
3800
+
3801
+ // Return the HWM for zactor internal pipes.
3802
+ size_t
3803
+ zsys_pipehwm (void);
3804
+
3805
+ // Configure use of IPv6 for new zsock instances. By default sockets accept
3806
+ // and make only IPv4 connections. When you enable IPv6, sockets will accept
3807
+ // and connect to both IPv4 and IPv6 peers. You can override the setting on
3808
+ // each zsock_t instance. The default is IPv4 only (ipv6 set to 0). If the
3809
+ // environment variable ZSYS_IPV6 is defined (as 1 or 0), this provides the
3810
+ // default. Note: has no effect on ZMQ v2.
3811
+ void
3812
+ zsys_set_ipv6 (int ipv6);
3813
+
3814
+ // Return use of IPv6 for zsock instances.
3815
+ int
3816
+ zsys_ipv6 (void);
3817
+
3818
+ // Set network interface name to use for broadcasts, particularly zbeacon.
3819
+ // This lets the interface be configured for test environments where required.
3820
+ // For example, on Mac OS X, zbeacon cannot bind to 255.255.255.255 which is
3821
+ // the default when there is no specified interface. If the environment
3822
+ // variable ZSYS_INTERFACE is set, use that as the default interface name.
3823
+ // Setting the interface to "*" means "use all available interfaces".
3824
+ void
3825
+ zsys_set_interface (const char *value);
3826
+
3827
+ // Return network interface to use for broadcasts, or "" if none was set.
3828
+ const char *
3829
+ zsys_interface (void);
3830
+
3831
+ // Set IPv6 address to use zbeacon socket, particularly for receiving zbeacon.
3832
+ // This needs to be set IPv6 is enabled as IPv6 can have multiple addresses
3833
+ // on a given interface. If the environment variable ZSYS_IPV6_ADDRESS is set,
3834
+ // use that as the default IPv6 address.
3835
+ void
3836
+ zsys_set_ipv6_address (const char *value);
3837
+
3838
+ // Return IPv6 address to use for zbeacon reception, or "" if none was set.
3839
+ const char *
3840
+ zsys_ipv6_address (void);
3841
+
3842
+ // Set IPv6 milticast address to use for sending zbeacon messages. This needs
3843
+ // to be set if IPv6 is enabled. If the environment variable
3844
+ // ZSYS_IPV6_MCAST_ADDRESS is set, use that as the default IPv6 multicast
3845
+ // address.
3846
+ void
3847
+ zsys_set_ipv6_mcast_address (const char *value);
3848
+
3849
+ // Return IPv6 multicast address to use for sending zbeacon, or "" if none was
3850
+ // set.
3851
+ const char *
3852
+ zsys_ipv6_mcast_address (void);
3853
+
3854
+ // Configure the automatic use of pre-allocated FDs when creating new sockets.
3855
+ // If 0 (default), nothing will happen. Else, when a new socket is bound, the
3856
+ // system API will be used to check if an existing pre-allocated FD with a
3857
+ // matching port (if TCP) or path (if IPC) exists, and if it does it will be
3858
+ // set via the ZMQ_USE_FD socket option so that the library will use it
3859
+ // instead of creating a new socket.
3860
+ void
3861
+ zsys_set_auto_use_fd (int auto_use_fd);
3862
+
3863
+ // Return use of automatic pre-allocated FDs for zsock instances.
3864
+ int
3865
+ zsys_auto_use_fd (void);
3866
+
3867
+ // Set log identity, which is a string that prefixes all log messages sent
3868
+ // by this process. The log identity defaults to the environment variable
3869
+ // ZSYS_LOGIDENT, if that is set.
3870
+ void
3871
+ zsys_set_logident (const char *value);
3872
+
3873
+ // Set stream to receive log traffic. By default, log traffic is sent to
3874
+ // stdout. If you set the stream to NULL, no stream will receive the log
3875
+ // traffic (it may still be sent to the system facility).
3876
+ void
3877
+ zsys_set_logstream (FILE *stream);
3878
+
3879
+ // Sends log output to a PUB socket bound to the specified endpoint. To
3880
+ // collect such log output, create a SUB socket, subscribe to the traffic
3881
+ // you care about, and connect to the endpoint. Log traffic is sent as a
3882
+ // single string frame, in the same format as when sent to stdout. The
3883
+ // log system supports a single sender; multiple calls to this method will
3884
+ // bind the same sender to multiple endpoints. To disable the sender, call
3885
+ // this method with a null argument.
3886
+ void
3887
+ zsys_set_logsender (const char *endpoint);
3888
+
3889
+ // Enable or disable logging to the system facility (syslog on POSIX boxes,
3890
+ // event log on Windows). By default this is disabled.
3891
+ void
3892
+ zsys_set_logsystem (bool logsystem);
3893
+
3894
+ // Log error condition - highest priority
3895
+ void
3896
+ zsys_error (const char *format, ...);
3897
+
3898
+ // Log warning condition - high priority
3899
+ void
3900
+ zsys_warning (const char *format, ...);
3901
+
3902
+ // Log normal, but significant, condition - normal priority
3903
+ void
3904
+ zsys_notice (const char *format, ...);
3905
+
3906
+ // Log informational message - low priority
3907
+ void
3908
+ zsys_info (const char *format, ...);
3909
+
3910
+ // Log debug-level message - lowest priority
3911
+ void
3912
+ zsys_debug (const char *format, ...);
3913
+
3914
+ // Self test of this class.
3915
+ void
3916
+ zsys_test (bool verbose);
3917
+
3918
+ // CLASS: ztimerset
3919
+ // Create new timer set.
3920
+ ztimerset_t *
3921
+ ztimerset_new (void);
3922
+
3923
+ // Destroy a timer set
3924
+ void
3925
+ ztimerset_destroy (ztimerset_t **self_p);
3926
+
3927
+ // Add a timer to the set. Returns timer id if OK, -1 on failure.
3928
+ int
3929
+ ztimerset_add (ztimerset_t *self, size_t interval, ztimerset_fn handler, void *arg);
3930
+
3931
+ // Cancel a timer. Returns 0 if OK, -1 on failure.
3932
+ int
3933
+ ztimerset_cancel (ztimerset_t *self, int timer_id);
3934
+
3935
+ // Set timer interval. Returns 0 if OK, -1 on failure.
3936
+ // This method is slow, canceling the timer and adding a new one yield better performance.
3937
+ int
3938
+ ztimerset_set_interval (ztimerset_t *self, int timer_id, size_t interval);
3939
+
3940
+ // Reset timer to start interval counting from current time. Returns 0 if OK, -1 on failure.
3941
+ // This method is slow, canceling the timer and adding a new one yield better performance.
3942
+ int
3943
+ ztimerset_reset (ztimerset_t *self, int timer_id);
3944
+
3945
+ // Return the time until the next interval.
3946
+ // Should be used as timeout parameter for the zpoller wait method.
3947
+ // The timeout is in msec.
3948
+ int
3949
+ ztimerset_timeout (ztimerset_t *self);
3950
+
3951
+ // Invoke callback function of all timers which their interval has elapsed.
3952
+ // Should be call after zpoller wait method.
3953
+ // Returns 0 if OK, -1 on failure.
3954
+ int
3955
+ ztimerset_execute (ztimerset_t *self);
3956
+
3957
+ // Self test of this class.
3958
+ void
3959
+ ztimerset_test (bool verbose);
3960
+
3961
+ // CLASS: ztrie
3962
+ // Creates a new ztrie.
3963
+ ztrie_t *
3964
+ ztrie_new (char delimiter);
3965
+
3966
+ // Destroy the ztrie.
3967
+ void
3968
+ ztrie_destroy (ztrie_t **self_p);
3969
+
3970
+ // Inserts a new route into the tree and attaches the data. Returns -1
3971
+ // if the route already exists, otherwise 0. This method takes ownership of
3972
+ // the provided data if a destroy_data_fn is provided.
3973
+ int
3974
+ ztrie_insert_route (ztrie_t *self, const char *path, void *data, ztrie_destroy_data_fn destroy_data_fn);
3975
+
3976
+ // Removes a route from the trie and destroys its data. Returns -1 if the
3977
+ // route does not exists, otherwise 0.
3978
+ // the start of the list call zlist_first (). Advances the cursor.
3979
+ int
3980
+ ztrie_remove_route (ztrie_t *self, const char *path);
3981
+
3982
+ // Returns true if the path matches a route in the tree, otherwise false.
3983
+ bool
3984
+ ztrie_matches (ztrie_t *self, const char *path);
3985
+
3986
+ // Returns the data of a matched route from last ztrie_matches. If the path
3987
+ // did not match, returns NULL. Do not delete the data as it's owned by
3988
+ // ztrie.
3989
+ void *
3990
+ ztrie_hit_data (ztrie_t *self);
3991
+
3992
+ // Returns the count of parameters that a matched route has.
3993
+ size_t
3994
+ ztrie_hit_parameter_count (ztrie_t *self);
3995
+
3996
+ // Returns the parameters of a matched route with named regexes from last
3997
+ // ztrie_matches. If the path did not match or the route did not contain any
3998
+ // named regexes, returns NULL.
3999
+ zhashx_t *
4000
+ ztrie_hit_parameters (ztrie_t *self);
4001
+
4002
+ // Returns the asterisk matched part of a route, if there has been no match
4003
+ // or no asterisk match, returns NULL.
4004
+ const char *
4005
+ ztrie_hit_asterisk_match (ztrie_t *self);
4006
+
4007
+ // Print the trie
4008
+ void
4009
+ ztrie_print (ztrie_t *self);
4010
+
4011
+ // Self test of this class.
4012
+ void
4013
+ ztrie_test (bool verbose);
4014
+
4015
+ // CLASS: zuuid
4016
+ // Create a new UUID object.
4017
+ zuuid_t *
4018
+ zuuid_new (void);
4019
+
4020
+ // Destroy a specified UUID object.
4021
+ void
4022
+ zuuid_destroy (zuuid_t **self_p);
4023
+
4024
+ // Create UUID object from supplied ZUUID_LEN-octet value.
4025
+ zuuid_t *
4026
+ zuuid_new_from (const byte *source);
4027
+
4028
+ // Set UUID to new supplied ZUUID_LEN-octet value.
4029
+ void
4030
+ zuuid_set (zuuid_t *self, const byte *source);
4031
+
4032
+ // Set UUID to new supplied string value skipping '-' and '{' '}'
4033
+ // optional delimiters. Return 0 if OK, else returns -1.
4034
+ int
4035
+ zuuid_set_str (zuuid_t *self, const char *source);
4036
+
4037
+ // Return UUID binary data.
4038
+ const byte *
4039
+ zuuid_data (zuuid_t *self);
4040
+
4041
+ // Return UUID binary size
4042
+ size_t
4043
+ zuuid_size (zuuid_t *self);
4044
+
4045
+ // Returns UUID as string
4046
+ const char *
4047
+ zuuid_str (zuuid_t *self);
4048
+
4049
+ // Return UUID in the canonical string format: 8-4-4-4-12, in lower
4050
+ // case. Caller does not modify or free returned value. See
4051
+ // http://en.wikipedia.org/wiki/Universally_unique_identifier
4052
+ const char *
4053
+ zuuid_str_canonical (zuuid_t *self);
4054
+
4055
+ // Store UUID blob in target array
4056
+ void
4057
+ zuuid_export (zuuid_t *self, byte *target);
4058
+
4059
+ // Check if UUID is same as supplied value
4060
+ bool
4061
+ zuuid_eq (zuuid_t *self, const byte *compare);
4062
+
4063
+ // Check if UUID is different from supplied value
4064
+ bool
4065
+ zuuid_neq (zuuid_t *self, const byte *compare);
4066
+
4067
+ // Make copy of UUID object; if uuid is null, or memory was exhausted,
4068
+ // returns null.
4069
+ zuuid_t *
4070
+ zuuid_dup (zuuid_t *self);
4071
+
4072
+ // Self test of this class.
4073
+ void
4074
+ zuuid_test (bool verbose);
4075
+
4076
+ ]]
4077
+
4078
+ czmq_ffi.czmq = czmq_ffi.ffi.load ("libczmq")
4079
+ return czmq_ffi