czmq-ffi-gen 0.9.2-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS +1 -0
  3. data/CHANGES.md +92 -0
  4. data/Gemfile +2 -0
  5. data/LICENSE +14 -0
  6. data/README.md +112 -0
  7. data/lib/czmq-ffi-gen.rb +7 -0
  8. data/lib/czmq-ffi-gen/czmq/ffi.rb +1210 -0
  9. data/lib/czmq-ffi-gen/czmq/ffi/version.rb +15 -0
  10. data/lib/czmq-ffi-gen/czmq/ffi/zactor.rb +186 -0
  11. data/lib/czmq-ffi-gen/czmq/ffi/zarmour.rb +286 -0
  12. data/lib/czmq-ffi-gen/czmq/ffi/zcert.rb +307 -0
  13. data/lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb +222 -0
  14. data/lib/czmq-ffi-gen/czmq/ffi/zchunk.rb +388 -0
  15. data/lib/czmq-ffi-gen/czmq/ffi/zclock.rb +140 -0
  16. data/lib/czmq-ffi-gen/czmq/ffi/zconfig.rb +442 -0
  17. data/lib/czmq-ffi-gen/czmq/ffi/zdigest.rb +156 -0
  18. data/lib/czmq-ffi-gen/czmq/ffi/zdir.rb +283 -0
  19. data/lib/czmq-ffi-gen/czmq/ffi/zdir_patch.rb +194 -0
  20. data/lib/czmq-ffi-gen/czmq/ffi/zfile.rb +353 -0
  21. data/lib/czmq-ffi-gen/czmq/ffi/zframe.rb +359 -0
  22. data/lib/czmq-ffi-gen/czmq/ffi/zhash.rb +416 -0
  23. data/lib/czmq-ffi-gen/czmq/ffi/zhashx.rb +659 -0
  24. data/lib/czmq-ffi-gen/czmq/ffi/ziflist.rb +189 -0
  25. data/lib/czmq-ffi-gen/czmq/ffi/zlist.rb +365 -0
  26. data/lib/czmq-ffi-gen/czmq/ffi/zlistx.rb +478 -0
  27. data/lib/czmq-ffi-gen/czmq/ffi/zloop.rb +396 -0
  28. data/lib/czmq-ffi-gen/czmq/ffi/zmsg.rb +515 -0
  29. data/lib/czmq-ffi-gen/czmq/ffi/zpoller.rb +194 -0
  30. data/lib/czmq-ffi-gen/czmq/ffi/zproc.rb +294 -0
  31. data/lib/czmq-ffi-gen/czmq/ffi/zsock.rb +3479 -0
  32. data/lib/czmq-ffi-gen/czmq/ffi/zstr.rb +203 -0
  33. data/lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb +203 -0
  34. data/lib/czmq-ffi-gen/czmq/ffi/ztrie.rb +221 -0
  35. data/lib/czmq-ffi-gen/czmq/ffi/zuuid.rb +227 -0
  36. data/lib/czmq-ffi-gen/errors.rb +12 -0
  37. data/lib/czmq-ffi-gen/gem_version.rb +5 -0
  38. data/lib/czmq-ffi-gen/legacy.rb +16 -0
  39. data/lib/czmq-ffi-gen/libzmq.rb +18 -0
  40. data/lib/czmq-ffi-gen/signals.rb +27 -0
  41. data/lib/czmq-ffi-gen/vendor.rb +5 -0
  42. data/lib/czmq-ffi-gen/versions.rb +19 -0
  43. data/vendor/local/bin/inproc_lat.exe +0 -0
  44. data/vendor/local/bin/inproc_thr.exe +0 -0
  45. data/vendor/local/bin/libczmq.dll +0 -0
  46. data/vendor/local/bin/libgcc_s_seh-1.dll +0 -0
  47. data/vendor/local/bin/libstdc++-6.dll +0 -0
  48. data/vendor/local/bin/libzmq.dll +0 -0
  49. data/vendor/local/bin/local_lat.exe +0 -0
  50. data/vendor/local/bin/local_thr.exe +0 -0
  51. data/vendor/local/bin/remote_lat.exe +0 -0
  52. data/vendor/local/bin/remote_thr.exe +0 -0
  53. data/vendor/local/include/czmq.h +31 -0
  54. data/vendor/local/include/czmq_library.h +199 -0
  55. data/vendor/local/include/czmq_prelude.h +641 -0
  56. data/vendor/local/include/readme.txt +83 -0
  57. data/vendor/local/include/sha1.h +76 -0
  58. data/vendor/local/include/sha1.inc_c +335 -0
  59. data/vendor/local/include/slre.h +92 -0
  60. data/vendor/local/include/slre.inc_c +660 -0
  61. data/vendor/local/include/zactor.h +76 -0
  62. data/vendor/local/include/zarmour.h +114 -0
  63. data/vendor/local/include/zauth.h +100 -0
  64. data/vendor/local/include/zauth_v2.h +88 -0
  65. data/vendor/local/include/zbeacon.h +86 -0
  66. data/vendor/local/include/zbeacon_v2.h +75 -0
  67. data/vendor/local/include/zcert.h +136 -0
  68. data/vendor/local/include/zcertstore.h +100 -0
  69. data/vendor/local/include/zchunk.h +163 -0
  70. data/vendor/local/include/zclock.h +73 -0
  71. data/vendor/local/include/zconfig.h +185 -0
  72. data/vendor/local/include/zctx.h +107 -0
  73. data/vendor/local/include/zdigest.h +65 -0
  74. data/vendor/local/include/zdir.h +149 -0
  75. data/vendor/local/include/zdir_patch.h +82 -0
  76. data/vendor/local/include/zfile.h +177 -0
  77. data/vendor/local/include/zframe.h +176 -0
  78. data/vendor/local/include/zgossip.h +95 -0
  79. data/vendor/local/include/zgossip_engine.inc +927 -0
  80. data/vendor/local/include/zgossip_msg.h +129 -0
  81. data/vendor/local/include/zhash.h +195 -0
  82. data/vendor/local/include/zhash_primes.inc +329 -0
  83. data/vendor/local/include/zhashx.h +298 -0
  84. data/vendor/local/include/ziflist.h +77 -0
  85. data/vendor/local/include/zlist.h +158 -0
  86. data/vendor/local/include/zlistx.h +205 -0
  87. data/vendor/local/include/zloop.h +168 -0
  88. data/vendor/local/include/zmonitor.h +73 -0
  89. data/vendor/local/include/zmonitor_v2.h +56 -0
  90. data/vendor/local/include/zmq.h +617 -0
  91. data/vendor/local/include/zmq_utils.h +48 -0
  92. data/vendor/local/include/zmsg.h +280 -0
  93. data/vendor/local/include/zmutex.h +55 -0
  94. data/vendor/local/include/zpoller.h +92 -0
  95. data/vendor/local/include/zproc.h +168 -0
  96. data/vendor/local/include/zproxy.h +111 -0
  97. data/vendor/local/include/zproxy_v2.h +62 -0
  98. data/vendor/local/include/zrex.h +82 -0
  99. data/vendor/local/include/zsock.h +912 -0
  100. data/vendor/local/include/zsock_option.inc +4126 -0
  101. data/vendor/local/include/zsocket.h +110 -0
  102. data/vendor/local/include/zsockopt.h +256 -0
  103. data/vendor/local/include/zstr.h +110 -0
  104. data/vendor/local/include/zsys.h +386 -0
  105. data/vendor/local/include/zthread.h +50 -0
  106. data/vendor/local/include/ztimerset.h +90 -0
  107. data/vendor/local/include/ztrie.h +106 -0
  108. data/vendor/local/include/zuuid.h +96 -0
  109. data/vendor/local/lib/libczmq.dll.a +0 -0
  110. data/vendor/local/lib/liblibzmq.dll.a +0 -0
  111. data/vendor/local/lib/libzmq-static.a +0 -0
  112. data/vendor/local/lib/pkgconfig/libczmq.pc +23 -0
  113. data/vendor/local/lib/pkgconfig/libzmq.pc +11 -0
  114. data/vendor/local/share/zmq/AUTHORS.txt +147 -0
  115. data/vendor/local/share/zmq/COPYING.LESSER.txt +181 -0
  116. data/vendor/local/share/zmq/COPYING.txt +674 -0
  117. data/vendor/local/share/zmq/NEWS.txt +978 -0
  118. metadata +230 -0
@@ -0,0 +1,82 @@
1
+ /* =========================================================================
2
+ zdir_patch - work with directory patches
3
+
4
+ Copyright (c) the Contributors as noted in the AUTHORS file.
5
+ This file is part of CZMQ, the high-level C binding for 0MQ:
6
+ http://czmq.zeromq.org.
7
+
8
+ This Source Code Form is subject to the terms of the Mozilla Public
9
+ License, v. 2.0. If a copy of the MPL was not distributed with this
10
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
11
+ =========================================================================
12
+ */
13
+
14
+ #ifndef __ZDIR_PATCH_H_INCLUDED__
15
+ #define __ZDIR_PATCH_H_INCLUDED__
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ // un-namespaced enumeration values
22
+ #define patch_create ZDIR_PATCH_CREATE
23
+ #define patch_delete ZDIR_PATCH_DELETE
24
+
25
+ // @warning THE FOLLOWING @INTERFACE BLOCK IS AUTO-GENERATED BY ZPROJECT
26
+ // @warning Please edit the model at "api/zdir_patch.api" to make changes.
27
+ // @interface
28
+ // This is a stable class, and may not change except for emergencies. It
29
+ // is provided in stable builds.
30
+ #define ZDIR_PATCH_CREATE 1 // Creates a new file
31
+ #define ZDIR_PATCH_DELETE 2 // Delete a file
32
+
33
+ // Create new patch
34
+ CZMQ_EXPORT zdir_patch_t *
35
+ zdir_patch_new (const char *path, zfile_t *file, int op, const char *alias);
36
+
37
+ // Destroy a patch
38
+ CZMQ_EXPORT void
39
+ zdir_patch_destroy (zdir_patch_t **self_p);
40
+
41
+ // Create copy of a patch. If the patch is null, or memory was exhausted,
42
+ // returns null.
43
+ // Caller owns return value and must destroy it when done.
44
+ CZMQ_EXPORT zdir_patch_t *
45
+ zdir_patch_dup (zdir_patch_t *self);
46
+
47
+ // Return patch file directory path
48
+ CZMQ_EXPORT const char *
49
+ zdir_patch_path (zdir_patch_t *self);
50
+
51
+ // Return patch file item
52
+ CZMQ_EXPORT zfile_t *
53
+ zdir_patch_file (zdir_patch_t *self);
54
+
55
+ // Return operation
56
+ CZMQ_EXPORT int
57
+ zdir_patch_op (zdir_patch_t *self);
58
+
59
+ // Return patch virtual file path
60
+ CZMQ_EXPORT const char *
61
+ zdir_patch_vpath (zdir_patch_t *self);
62
+
63
+ // Calculate hash digest for file (create only)
64
+ CZMQ_EXPORT void
65
+ zdir_patch_digest_set (zdir_patch_t *self);
66
+
67
+ // Return hash digest for patch file
68
+ CZMQ_EXPORT const char *
69
+ zdir_patch_digest (zdir_patch_t *self);
70
+
71
+ // Self test of this class.
72
+ CZMQ_EXPORT void
73
+ zdir_patch_test (bool verbose);
74
+
75
+ // @end
76
+
77
+
78
+ #ifdef __cplusplus
79
+ }
80
+ #endif
81
+
82
+ #endif
@@ -0,0 +1,177 @@
1
+ /* =========================================================================
2
+ zfile - helper functions for working with files.
3
+
4
+ Copyright (c) the Contributors as noted in the AUTHORS file.
5
+ This file is part of CZMQ, the high-level C binding for 0MQ:
6
+ http://czmq.zeromq.org.
7
+
8
+ This Source Code Form is subject to the terms of the Mozilla Public
9
+ License, v. 2.0. If a copy of the MPL was not distributed with this
10
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
11
+ =========================================================================
12
+ */
13
+
14
+ #ifndef __ZFILE_H_INCLUDED__
15
+ #define __ZFILE_H_INCLUDED__
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ // @warning THE FOLLOWING @INTERFACE BLOCK IS AUTO-GENERATED BY ZPROJECT
22
+ // @warning Please edit the model at "api/zfile.api" to make changes.
23
+ // @interface
24
+ // This is a stable class, and may not change except for emergencies. It
25
+ // is provided in stable builds.
26
+ // If file exists, populates properties. CZMQ supports portable symbolic
27
+ // links, which are files with the extension ".ln". A symbolic link is a
28
+ // text file containing one line, the filename of a target file. Reading
29
+ // data from the symbolic link actually reads from the target file. Path
30
+ // may be NULL, in which case it is not used.
31
+ CZMQ_EXPORT zfile_t *
32
+ zfile_new (const char *path, const char *name);
33
+
34
+ // Destroy a file item
35
+ CZMQ_EXPORT void
36
+ zfile_destroy (zfile_t **self_p);
37
+
38
+ // Duplicate a file item, returns a newly constructed item. If the file
39
+ // is null, or memory was exhausted, returns null.
40
+ // Caller owns return value and must destroy it when done.
41
+ CZMQ_EXPORT zfile_t *
42
+ zfile_dup (zfile_t *self);
43
+
44
+ // Return file name, remove path if provided
45
+ CZMQ_EXPORT const char *
46
+ zfile_filename (zfile_t *self, const char *path);
47
+
48
+ // Refresh file properties from disk; this is not done automatically
49
+ // on access methods, otherwise it is not possible to compare directory
50
+ // snapshots.
51
+ CZMQ_EXPORT void
52
+ zfile_restat (zfile_t *self);
53
+
54
+ // Return when the file was last modified. If you want this to reflect the
55
+ // current situation, call zfile_restat before checking this property.
56
+ CZMQ_EXPORT time_t
57
+ zfile_modified (zfile_t *self);
58
+
59
+ // Return the last-known size of the file. If you want this to reflect the
60
+ // current situation, call zfile_restat before checking this property.
61
+ CZMQ_EXPORT off_t
62
+ zfile_cursize (zfile_t *self);
63
+
64
+ // Return true if the file is a directory. If you want this to reflect
65
+ // any external changes, call zfile_restat before checking this property.
66
+ CZMQ_EXPORT bool
67
+ zfile_is_directory (zfile_t *self);
68
+
69
+ // Return true if the file is a regular file. If you want this to reflect
70
+ // any external changes, call zfile_restat before checking this property.
71
+ CZMQ_EXPORT bool
72
+ zfile_is_regular (zfile_t *self);
73
+
74
+ // Return true if the file is readable by this process. If you want this to
75
+ // reflect any external changes, call zfile_restat before checking this
76
+ // property.
77
+ CZMQ_EXPORT bool
78
+ zfile_is_readable (zfile_t *self);
79
+
80
+ // Return true if the file is writeable by this process. If you want this
81
+ // to reflect any external changes, call zfile_restat before checking this
82
+ // property.
83
+ CZMQ_EXPORT bool
84
+ zfile_is_writeable (zfile_t *self);
85
+
86
+ // Check if file has stopped changing and can be safely processed.
87
+ // Updates the file statistics from disk at every call.
88
+ CZMQ_EXPORT bool
89
+ zfile_is_stable (zfile_t *self);
90
+
91
+ // Return true if the file was changed on disk since the zfile_t object
92
+ // was created, or the last zfile_restat() call made on it.
93
+ CZMQ_EXPORT bool
94
+ zfile_has_changed (zfile_t *self);
95
+
96
+ // Remove the file from disk
97
+ CZMQ_EXPORT void
98
+ zfile_remove (zfile_t *self);
99
+
100
+ // Open file for reading
101
+ // Returns 0 if OK, -1 if not found or not accessible
102
+ CZMQ_EXPORT int
103
+ zfile_input (zfile_t *self);
104
+
105
+ // Open file for writing, creating directory if needed
106
+ // File is created if necessary; chunks can be written to file at any
107
+ // location. Returns 0 if OK, -1 if error.
108
+ CZMQ_EXPORT int
109
+ zfile_output (zfile_t *self);
110
+
111
+ // Read chunk from file at specified position. If this was the last chunk,
112
+ // sets the eof property. Returns a null chunk in case of error.
113
+ // Caller owns return value and must destroy it when done.
114
+ CZMQ_EXPORT zchunk_t *
115
+ zfile_read (zfile_t *self, size_t bytes, off_t offset);
116
+
117
+ // Returns true if zfile_read() just read the last chunk in the file.
118
+ CZMQ_EXPORT bool
119
+ zfile_eof (zfile_t *self);
120
+
121
+ // Write chunk to file at specified position
122
+ // Return 0 if OK, else -1
123
+ CZMQ_EXPORT int
124
+ zfile_write (zfile_t *self, zchunk_t *chunk, off_t offset);
125
+
126
+ // Read next line of text from file. Returns a pointer to the text line,
127
+ // or NULL if there was nothing more to read from the file.
128
+ CZMQ_EXPORT const char *
129
+ zfile_readln (zfile_t *self);
130
+
131
+ // Close file, if open
132
+ CZMQ_EXPORT void
133
+ zfile_close (zfile_t *self);
134
+
135
+ // Return file handle, if opened
136
+ CZMQ_EXPORT FILE *
137
+ zfile_handle (zfile_t *self);
138
+
139
+ // Calculate SHA1 digest for file, using zdigest class.
140
+ CZMQ_EXPORT const char *
141
+ zfile_digest (zfile_t *self);
142
+
143
+ // Self test of this class.
144
+ CZMQ_EXPORT void
145
+ zfile_test (bool verbose);
146
+
147
+ // @end
148
+
149
+
150
+ // @interface
151
+ // These methods are deprecated, and now moved to zsys class.
152
+ CZMQ_EXPORT bool
153
+ zfile_exists (const char *filename);
154
+ CZMQ_EXPORT ssize_t
155
+ zfile_size (const char *filename);
156
+ CZMQ_EXPORT mode_t
157
+ zfile_mode (const char *filename);
158
+ CZMQ_EXPORT int
159
+ zfile_delete (const char *filename);
160
+ CZMQ_EXPORT bool
161
+ zfile_stable (const char *filename);
162
+ CZMQ_EXPORT int
163
+ zfile_mkdir (const char *pathname);
164
+ CZMQ_EXPORT int
165
+ zfile_rmdir (const char *pathname);
166
+ CZMQ_EXPORT void
167
+ zfile_mode_private (void);
168
+ CZMQ_EXPORT void
169
+ zfile_mode_default (void);
170
+ // @end
171
+
172
+ #ifdef __cplusplus
173
+ }
174
+ #endif
175
+
176
+
177
+ #endif // __ZFILE_H_INCLUDED__
@@ -0,0 +1,176 @@
1
+ /* =========================================================================
2
+ zframe - working with single message frames
3
+
4
+ Copyright (c) the Contributors as noted in the AUTHORS file.
5
+ This file is part of CZMQ, the high-level C binding for 0MQ:
6
+ http://czmq.zeromq.org.
7
+
8
+ This Source Code Form is subject to the terms of the Mozilla Public
9
+ License, v. 2.0. If a copy of the MPL was not distributed with this
10
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
11
+ =========================================================================
12
+ */
13
+
14
+ #ifndef __ZFRAME_H_INCLUDED__
15
+ #define __ZFRAME_H_INCLUDED__
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ // @warning THE FOLLOWING @INTERFACE BLOCK IS AUTO-GENERATED BY ZPROJECT
22
+ // @warning Please edit the model at "api/zframe.api" to make changes.
23
+ // @interface
24
+ // This is a stable class, and may not change except for emergencies. It
25
+ // is provided in stable builds.
26
+ // This class has draft methods, which may change over time. They are not
27
+ // in stable releases, by default. Use --enable-drafts to enable.
28
+ #define ZFRAME_MORE 1 //
29
+ #define ZFRAME_REUSE 2 //
30
+ #define ZFRAME_DONTWAIT 4 //
31
+
32
+ // Create a new frame. If size is not null, allocates the frame data
33
+ // to the specified size. If additionally, data is not null, copies
34
+ // size octets from the specified data into the frame body.
35
+ CZMQ_EXPORT zframe_t *
36
+ zframe_new (const void *data, size_t size);
37
+
38
+ // Create an empty (zero-sized) frame
39
+ CZMQ_EXPORT zframe_t *
40
+ zframe_new_empty (void);
41
+
42
+ // Create a frame with a specified string content.
43
+ CZMQ_EXPORT zframe_t *
44
+ zframe_from (const char *string);
45
+
46
+ // Receive frame from socket, returns zframe_t object or NULL if the recv
47
+ // was interrupted. Does a blocking recv, if you want to not block then use
48
+ // zpoller or zloop.
49
+ CZMQ_EXPORT zframe_t *
50
+ zframe_recv (void *source);
51
+
52
+ // Destroy a frame
53
+ CZMQ_EXPORT void
54
+ zframe_destroy (zframe_t **self_p);
55
+
56
+ // Send a frame to a socket, destroy frame after sending.
57
+ // Return -1 on error, 0 on success.
58
+ CZMQ_EXPORT int
59
+ zframe_send (zframe_t **self_p, void *dest, int flags);
60
+
61
+ // Return number of bytes in frame data
62
+ CZMQ_EXPORT size_t
63
+ zframe_size (zframe_t *self);
64
+
65
+ // Return address of frame data
66
+ CZMQ_EXPORT byte *
67
+ zframe_data (zframe_t *self);
68
+
69
+ // Return meta data property for frame
70
+ // Caller must free string when finished with it.
71
+ CZMQ_EXPORT const char *
72
+ zframe_meta (zframe_t *self, const char *property);
73
+
74
+ // Create a new frame that duplicates an existing frame. If frame is null,
75
+ // or memory was exhausted, returns null.
76
+ // Caller owns return value and must destroy it when done.
77
+ CZMQ_EXPORT zframe_t *
78
+ zframe_dup (zframe_t *self);
79
+
80
+ // Return frame data encoded as printable hex string, useful for 0MQ UUIDs.
81
+ // Caller must free string when finished with it.
82
+ // Caller owns return value and must destroy it when done.
83
+ CZMQ_EXPORT char *
84
+ zframe_strhex (zframe_t *self);
85
+
86
+ // Return frame data copied into freshly allocated string
87
+ // Caller must free string when finished with it.
88
+ // Caller owns return value and must destroy it when done.
89
+ CZMQ_EXPORT char *
90
+ zframe_strdup (zframe_t *self);
91
+
92
+ // Return TRUE if frame body is equal to string, excluding terminator
93
+ CZMQ_EXPORT bool
94
+ zframe_streq (zframe_t *self, const char *string);
95
+
96
+ // Return frame MORE indicator (1 or 0), set when reading frame from socket
97
+ // or by the zframe_set_more() method
98
+ CZMQ_EXPORT int
99
+ zframe_more (zframe_t *self);
100
+
101
+ // Set frame MORE indicator (1 or 0). Note this is NOT used when sending
102
+ // frame to socket, you have to specify flag explicitly.
103
+ CZMQ_EXPORT void
104
+ zframe_set_more (zframe_t *self, int more);
105
+
106
+ // Return TRUE if two frames have identical size and data
107
+ // If either frame is NULL, equality is always false.
108
+ CZMQ_EXPORT bool
109
+ zframe_eq (zframe_t *self, zframe_t *other);
110
+
111
+ // Set new contents for frame
112
+ CZMQ_EXPORT void
113
+ zframe_reset (zframe_t *self, const void *data, size_t size);
114
+
115
+ // Send message to zsys log sink (may be stdout, or system facility as
116
+ // configured by zsys_set_logstream). Prefix shows before frame, if not null.
117
+ CZMQ_EXPORT void
118
+ zframe_print (zframe_t *self, const char *prefix);
119
+
120
+ // Probe the supplied object, and report if it looks like a zframe_t.
121
+ CZMQ_EXPORT bool
122
+ zframe_is (void *self);
123
+
124
+ // Self test of this class.
125
+ CZMQ_EXPORT void
126
+ zframe_test (bool verbose);
127
+
128
+ #ifdef CZMQ_BUILD_DRAFT_API
129
+ // *** Draft method, for development use, may change without warning ***
130
+ // Return frame routing ID, if the frame came from a ZMQ_SERVER socket.
131
+ // Else returns zero.
132
+ CZMQ_EXPORT uint32_t
133
+ zframe_routing_id (zframe_t *self);
134
+
135
+ // *** Draft method, for development use, may change without warning ***
136
+ // Set routing ID on frame. This is used if/when the frame is sent to a
137
+ // ZMQ_SERVER socket.
138
+ CZMQ_EXPORT void
139
+ zframe_set_routing_id (zframe_t *self, uint32_t routing_id);
140
+
141
+ // *** Draft method, for development use, may change without warning ***
142
+ // Return frame group of radio-dish pattern.
143
+ CZMQ_EXPORT const char *
144
+ zframe_group (zframe_t *self);
145
+
146
+ // *** Draft method, for development use, may change without warning ***
147
+ // Set group on frame. This is used if/when the frame is sent to a
148
+ // ZMQ_RADIO socket.
149
+ // Return -1 on error, 0 on success.
150
+ CZMQ_EXPORT int
151
+ zframe_set_group (zframe_t *self, const char *group);
152
+
153
+ #endif // CZMQ_BUILD_DRAFT_API
154
+ // @end
155
+
156
+
157
+ // DEPRECATED as poor style -- callers should use zloop or zpoller
158
+ // Receive a new frame off the socket. Returns newly allocated frame, or
159
+ // NULL if there was no input waiting, or if the read was interrupted.
160
+ CZMQ_EXPORT zframe_t *
161
+ zframe_recv_nowait (void *source);
162
+
163
+ // DEPRECATED as inconsistent; breaks principle that logging should all go
164
+ // to a single destination.
165
+ // Print contents of the frame to FILE stream.
166
+ CZMQ_EXPORT void
167
+ zframe_fprint (zframe_t *self, const char *prefix, FILE *file);
168
+
169
+ // Deprecated method aliases
170
+ #define zframe_print_to_stream(s,p,F) zframe_fprint(s,p,F)
171
+
172
+ #ifdef __cplusplus
173
+ }
174
+ #endif
175
+
176
+ #endif
@@ -0,0 +1,95 @@
1
+ /* =========================================================================
2
+ zgossip - zgossip server
3
+
4
+ ** WARNING *************************************************************
5
+ THIS SOURCE FILE IS 100% GENERATED. If you edit this file, you will lose
6
+ your changes at the next build cycle. This is great for temporary printf
7
+ statements. DO NOT MAKE ANY CHANGES YOU WISH TO KEEP. The correct places
8
+ for commits are:
9
+
10
+ * The XML model used for this code generation: zgossip.xml, or
11
+ * The code generation script that built this file: zproto_server_c
12
+ ************************************************************************
13
+ Copyright (c) the Contributors as noted in the AUTHORS file.
14
+ This file is part of CZMQ, the high-level C binding for 0MQ:
15
+ http://czmq.zeromq.org.
16
+
17
+ This Source Code Form is subject to the terms of the Mozilla Public
18
+ License, v. 2.0. If a copy of the MPL was not distributed with this
19
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
20
+ =========================================================================
21
+ */
22
+
23
+ #ifndef ZGOSSIP_H_INCLUDED
24
+ #define ZGOSSIP_H_INCLUDED
25
+
26
+ #include "czmq.h"
27
+
28
+ #ifdef __cplusplus
29
+ extern "C" {
30
+ #endif
31
+
32
+ // @interface
33
+ // To work with zgossip, use the CZMQ zactor API:
34
+ //
35
+ // Create new zgossip instance, passing logging prefix:
36
+ //
37
+ // zactor_t *zgossip = zactor_new (zgossip, "myname");
38
+ //
39
+ // Destroy zgossip instance
40
+ //
41
+ // zactor_destroy (&zgossip);
42
+ //
43
+ // Enable verbose logging of commands and activity:
44
+ //
45
+ // zstr_send (zgossip, "VERBOSE");
46
+ //
47
+ // Bind zgossip to specified endpoint. TCP endpoints may specify
48
+ // the port number as "*" to aquire an ephemeral port:
49
+ //
50
+ // zstr_sendx (zgossip, "BIND", endpoint, NULL);
51
+ //
52
+ // Return assigned port number, specifically when BIND was done using an
53
+ // an ephemeral port:
54
+ //
55
+ // zstr_sendx (zgossip, "PORT", NULL);
56
+ // char *command, *port_str;
57
+ // zstr_recvx (zgossip, &command, &port_str, NULL);
58
+ // assert (streq (command, "PORT"));
59
+ //
60
+ // Specify configuration file to load, overwriting any previous loaded
61
+ // configuration file or options:
62
+ //
63
+ // zstr_sendx (zgossip, "LOAD", filename, NULL);
64
+ //
65
+ // Set configuration path value:
66
+ //
67
+ // zstr_sendx (zgossip, "SET", path, value, NULL);
68
+ //
69
+ // Save configuration data to config file on disk:
70
+ //
71
+ // zstr_sendx (zgossip, "SAVE", filename, NULL);
72
+ //
73
+ // Send zmsg_t instance to zgossip:
74
+ //
75
+ // zactor_send (zgossip, &msg);
76
+ //
77
+ // Receive zmsg_t instance from zgossip:
78
+ //
79
+ // zmsg_t *msg = zactor_recv (zgossip);
80
+ //
81
+ // This is the zgossip constructor as a zactor_fn:
82
+ //
83
+ CZMQ_EXPORT void
84
+ zgossip (zsock_t *pipe, void *args);
85
+
86
+ // Self test of this class
87
+ CZMQ_EXPORT void
88
+ zgossip_test (bool verbose);
89
+ // @end
90
+
91
+ #ifdef __cplusplus
92
+ }
93
+ #endif
94
+
95
+ #endif