czmq-ffi-gen 0.13.0 → 0.14.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.
- checksums.yaml +4 -4
- data/CHANGES.md +8 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zactor.rb +40 -7
- data/lib/czmq-ffi-gen/czmq/ffi/zargs.rb +259 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zarmour.rb +3 -3
- data/lib/czmq-ffi-gen/czmq/ffi/zcert.rb +15 -6
- data/lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb +25 -11
- data/lib/czmq-ffi-gen/czmq/ffi/zchunk.rb +18 -18
- data/lib/czmq-ffi-gen/czmq/ffi/zclock.rb +6 -6
- data/lib/czmq-ffi-gen/czmq/ffi/zconfig.rb +27 -17
- data/lib/czmq-ffi-gen/czmq/ffi/zdigest.rb +4 -4
- data/lib/czmq-ffi-gen/czmq/ffi/zdir.rb +36 -36
- data/lib/czmq-ffi-gen/czmq/ffi/zdir_patch.rb +1 -1
- data/lib/czmq-ffi-gen/czmq/ffi/zfile.rb +27 -19
- data/lib/czmq-ffi-gen/czmq/ffi/zframe.rb +22 -21
- data/lib/czmq-ffi-gen/czmq/ffi/zhash.rb +54 -54
- data/lib/czmq-ffi-gen/czmq/ffi/zhashx.rb +82 -80
- data/lib/czmq-ffi-gen/czmq/ffi/ziflist.rb +30 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zlist.rb +30 -30
- data/lib/czmq-ffi-gen/czmq/ffi/zlistx.rb +44 -44
- data/lib/czmq-ffi-gen/czmq/ffi/zloop.rb +39 -39
- data/lib/czmq-ffi-gen/czmq/ffi/zmsg.rb +46 -46
- data/lib/czmq-ffi-gen/czmq/ffi/zpoller.rb +16 -16
- data/lib/czmq-ffi-gen/czmq/ffi/zproc.rb +237 -34
- data/lib/czmq-ffi-gen/czmq/ffi/zsock.rb +1201 -973
- data/lib/czmq-ffi-gen/czmq/ffi/zstr.rb +58 -19
- data/lib/czmq-ffi-gen/czmq/ffi/zsys.rb +836 -0
- data/lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb +6 -6
- data/lib/czmq-ffi-gen/czmq/ffi/ztrie.rb +10 -10
- data/lib/czmq-ffi-gen/czmq/ffi/zuuid.rb +4 -4
- data/lib/czmq-ffi-gen/czmq/ffi.rb +224 -698
- data/lib/czmq-ffi-gen/gem_version.rb +1 -1
- data/lib/czmq-ffi-gen/vendor.rb +9 -1
- metadata +5 -3
@@ -73,8 +73,8 @@ module CZMQ
|
|
73
73
|
end
|
74
74
|
|
75
75
|
# Receive C string from socket. Caller must free returned string using
|
76
|
-
# zstr_free(). Returns NULL if the context is being terminated or the
|
77
|
-
# process was interrupted.
|
76
|
+
# zstr_free(). Returns NULL if the context is being terminated or the
|
77
|
+
# process was interrupted.
|
78
78
|
#
|
79
79
|
# @param source [::FFI::Pointer, #to_ptr]
|
80
80
|
# @return [::FFI::AutoPointer]
|
@@ -84,13 +84,13 @@ module CZMQ
|
|
84
84
|
result
|
85
85
|
end
|
86
86
|
|
87
|
-
# Receive a series of strings (until NULL) from multipart data.
|
88
|
-
# Each string is allocated and filled with string data; if there
|
89
|
-
# are not enough frames, unallocated strings are set to NULL.
|
90
|
-
# Returns -1 if the message could not be read, else returns the
|
87
|
+
# Receive a series of strings (until NULL) from multipart data.
|
88
|
+
# Each string is allocated and filled with string data; if there
|
89
|
+
# are not enough frames, unallocated strings are set to NULL.
|
90
|
+
# Returns -1 if the message could not be read, else returns the
|
91
91
|
# number of strings filled, zero or more. Free each returned string
|
92
|
-
# using zstr_free(). If not enough strings are provided, remaining
|
93
|
-
# multipart frames in the message are dropped.
|
92
|
+
# using zstr_free(). If not enough strings are provided, remaining
|
93
|
+
# multipart frames in the message are dropped.
|
94
94
|
#
|
95
95
|
# @param source [::FFI::Pointer, #to_ptr]
|
96
96
|
# @param string_p [::FFI::Pointer, #to_ptr]
|
@@ -101,10 +101,23 @@ module CZMQ
|
|
101
101
|
result
|
102
102
|
end
|
103
103
|
|
104
|
-
#
|
104
|
+
# De-compress and receive C string from socket, received as a message
|
105
|
+
# with two frames: size of the uncompressed string, and the string itself.
|
106
|
+
# Caller must free returned string using zstr_free(). Returns NULL if the
|
107
|
+
# context is being terminated or the process was interrupted.
|
108
|
+
#
|
109
|
+
# @param source [::FFI::Pointer, #to_ptr]
|
110
|
+
# @return [::FFI::AutoPointer]
|
111
|
+
def self.recv_compress(source)
|
112
|
+
result = ::CZMQ::FFI.zstr_recv_compress(source)
|
113
|
+
result = ::FFI::AutoPointer.new(result, LibC.method(:free))
|
114
|
+
result
|
115
|
+
end
|
116
|
+
|
117
|
+
# Send a C string to a socket, as a frame. The string is sent without
|
105
118
|
# trailing null byte; to read this you can use zstr_recv, or a similar
|
106
|
-
# method that adds a null terminator on the received string. String
|
107
|
-
# may be NULL, which is sent as "".
|
119
|
+
# method that adds a null terminator on the received string. String
|
120
|
+
# may be NULL, which is sent as "".
|
108
121
|
#
|
109
122
|
# @param dest [::FFI::Pointer, #to_ptr]
|
110
123
|
# @param string [String, #to_s, nil]
|
@@ -115,7 +128,7 @@ module CZMQ
|
|
115
128
|
end
|
116
129
|
|
117
130
|
# Send a C string to a socket, as zstr_send(), with a MORE flag, so that
|
118
|
-
# you can send further strings in the same multi-part message.
|
131
|
+
# you can send further strings in the same multi-part message.
|
119
132
|
#
|
120
133
|
# @param dest [::FFI::Pointer, #to_ptr]
|
121
134
|
# @param string [String, #to_s, nil]
|
@@ -126,8 +139,8 @@ module CZMQ
|
|
126
139
|
end
|
127
140
|
|
128
141
|
# Send a formatted string to a socket. Note that you should NOT use
|
129
|
-
# user-supplied strings in the format (they may contain '%' which
|
130
|
-
# will create security holes).
|
142
|
+
# user-supplied strings in the format (they may contain '%' which
|
143
|
+
# will create security holes).
|
131
144
|
#
|
132
145
|
# @param dest [::FFI::Pointer, #to_ptr]
|
133
146
|
# @param format [String, #to_s, nil]
|
@@ -138,9 +151,9 @@ module CZMQ
|
|
138
151
|
result
|
139
152
|
end
|
140
153
|
|
141
|
-
# Send a formatted string to a socket, as for zstr_sendf(), with a
|
154
|
+
# Send a formatted string to a socket, as for zstr_sendf(), with a
|
142
155
|
# MORE flag, so that you can send further strings in the same multi-part
|
143
|
-
# message.
|
156
|
+
# message.
|
144
157
|
#
|
145
158
|
# @param dest [::FFI::Pointer, #to_ptr]
|
146
159
|
# @param format [String, #to_s, nil]
|
@@ -151,7 +164,7 @@ module CZMQ
|
|
151
164
|
result
|
152
165
|
end
|
153
166
|
|
154
|
-
# Send a series of strings (until NULL) as multipart data
|
167
|
+
# Send a series of strings (until NULL) as multipart data
|
155
168
|
# Returns 0 if the strings could be sent OK, or -1 on error.
|
156
169
|
#
|
157
170
|
# @param dest [::FFI::Pointer, #to_ptr]
|
@@ -163,8 +176,34 @@ module CZMQ
|
|
163
176
|
result
|
164
177
|
end
|
165
178
|
|
179
|
+
# Compress and send a C string to a socket, as a message with two frames:
|
180
|
+
# size of the uncompressed string, and the string itself. The string is
|
181
|
+
# sent without trailing null byte; to read this you can use
|
182
|
+
# zstr_recv_compress, or a similar method that de-compresses and adds a
|
183
|
+
# null terminator on the received string.
|
184
|
+
#
|
185
|
+
# @param dest [::FFI::Pointer, #to_ptr]
|
186
|
+
# @param string [String, #to_s, nil]
|
187
|
+
# @return [Integer]
|
188
|
+
def self.send_compress(dest, string)
|
189
|
+
result = ::CZMQ::FFI.zstr_send_compress(dest, string)
|
190
|
+
result
|
191
|
+
end
|
192
|
+
|
193
|
+
# Compress and send a C string to a socket, as zstr_send_compress(),
|
194
|
+
# with a MORE flag, so that you can send further strings in the same
|
195
|
+
# multi-part message.
|
196
|
+
#
|
197
|
+
# @param dest [::FFI::Pointer, #to_ptr]
|
198
|
+
# @param string [String, #to_s, nil]
|
199
|
+
# @return [Integer]
|
200
|
+
def self.sendm_compress(dest, string)
|
201
|
+
result = ::CZMQ::FFI.zstr_sendm_compress(dest, string)
|
202
|
+
result
|
203
|
+
end
|
204
|
+
|
166
205
|
# Accepts a void pointer and returns a fresh character string. If source
|
167
|
-
# is null, returns an empty string.
|
206
|
+
# is null, returns an empty string.
|
168
207
|
#
|
169
208
|
# @param source [::FFI::Pointer, #to_ptr]
|
170
209
|
# @return [::FFI::AutoPointer]
|
@@ -175,7 +214,7 @@ module CZMQ
|
|
175
214
|
end
|
176
215
|
|
177
216
|
# Free a provided string, and nullify the parent pointer. Safe to call on
|
178
|
-
# a null pointer.
|
217
|
+
# a null pointer.
|
179
218
|
#
|
180
219
|
# @param string_p [::FFI::Pointer, #to_ptr]
|
181
220
|
# @return [void]
|