czmq-ffi-gen 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/README.md +2 -2
- data/lib/czmq-ffi-gen/czmq/ffi/zarmour.rb +13 -11
- data/lib/czmq-ffi-gen/czmq/ffi/zloop.rb +18 -14
- data/lib/czmq-ffi-gen/czmq/ffi/zpoller.rb +20 -17
- data/lib/czmq-ffi-gen/czmq/ffi.rb +3 -3
- data/lib/czmq-ffi-gen/gem_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 119e644dab9cbe66ebf0d0064d2e8b9d06ff40ab
|
4
|
+
data.tar.gz: f74423436c46aa8bcbcf1fd3025d8511e2d3906b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da31baf796d2cda0b860db2534308e91953c513540df8ad55c24df04eb2e7f55547b074fc7be147d7b9d93e0552bc267fa3d25eeefa45ab13fd097fa6b8b71c9
|
7
|
+
data.tar.gz: c4f0f6ace9dc9f45c4d4dfdeb8ffd4deb9714b33ab68bb741ab22775b0e4cdc3a517a3adb33035a4e50b0f3b11a9ea7d1b35b3e623633785b6bfb64cc4e44fd7
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -90,17 +90,9 @@ module CZMQ
|
|
90
90
|
result
|
91
91
|
end
|
92
92
|
|
93
|
-
#
|
94
|
-
#
|
95
|
-
#
|
96
|
-
def mode_str()
|
97
|
-
raise DestroyedError unless @ptr
|
98
|
-
self_p = @ptr
|
99
|
-
result = ::CZMQ::FFI.zarmour_mode_str(self_p)
|
100
|
-
result
|
101
|
-
end
|
102
|
-
|
103
|
-
# Encode a stream of bytes into an armoured string.
|
93
|
+
# Encode a stream of bytes into an armoured string. Returns the armoured
|
94
|
+
# string, or NULL if there was insufficient memory available to allocate
|
95
|
+
# a new string.
|
104
96
|
#
|
105
97
|
# @param data [::FFI::Pointer, #to_ptr]
|
106
98
|
# @param size [Integer, #to_int, #to_i]
|
@@ -138,6 +130,16 @@ module CZMQ
|
|
138
130
|
result
|
139
131
|
end
|
140
132
|
|
133
|
+
# Get printable string for mode.
|
134
|
+
#
|
135
|
+
# @return [String]
|
136
|
+
def mode_str()
|
137
|
+
raise DestroyedError unless @ptr
|
138
|
+
self_p = @ptr
|
139
|
+
result = ::CZMQ::FFI.zarmour_mode_str(self_p)
|
140
|
+
result
|
141
|
+
end
|
142
|
+
|
141
143
|
# Set the mode property.
|
142
144
|
#
|
143
145
|
# @param mode [Symbol]
|
@@ -336,7 +336,8 @@ module CZMQ
|
|
336
336
|
result
|
337
337
|
end
|
338
338
|
|
339
|
-
# Set verbose tracing of reactor on/off
|
339
|
+
# Set verbose tracing of reactor on/off. The default verbose setting is
|
340
|
+
# off (false).
|
340
341
|
#
|
341
342
|
# @param verbose [Boolean]
|
342
343
|
# @return [void]
|
@@ -348,28 +349,31 @@ module CZMQ
|
|
348
349
|
result
|
349
350
|
end
|
350
351
|
|
351
|
-
#
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
352
|
+
# By default the reactor stops if the process receives a SIGINT or SIGTERM
|
353
|
+
# signal. This makes it impossible to shut-down message based architectures
|
354
|
+
# like zactors. This method lets you switch off break handling. The default
|
355
|
+
# nonstop setting is off (false).
|
355
356
|
#
|
356
|
-
# @
|
357
|
-
|
357
|
+
# @param nonstop [Boolean]
|
358
|
+
# @return [void]
|
359
|
+
def set_nonstop(nonstop)
|
358
360
|
raise DestroyedError unless @ptr
|
359
361
|
self_p = @ptr
|
360
|
-
|
362
|
+
nonstop = !(0==nonstop||!nonstop) # boolean
|
363
|
+
result = ::CZMQ::FFI.zloop_set_nonstop(self_p, nonstop)
|
361
364
|
result
|
362
365
|
end
|
363
366
|
|
364
|
-
#
|
365
|
-
#
|
366
|
-
#
|
367
|
+
# Start the reactor. Takes control of the thread and returns when the 0MQ
|
368
|
+
# context is terminated or the process is interrupted, or any event handler
|
369
|
+
# returns -1. Event handlers may register new sockets and timers, and
|
370
|
+
# cancel sockets. Returns 0 if interrupted, -1 if canceled by a handler.
|
367
371
|
#
|
368
|
-
# @return [
|
369
|
-
def
|
372
|
+
# @return [Integer]
|
373
|
+
def start()
|
370
374
|
raise DestroyedError unless @ptr
|
371
375
|
self_p = @ptr
|
372
|
-
result = ::CZMQ::FFI.
|
376
|
+
result = ::CZMQ::FFI.zloop_start(self_p)
|
373
377
|
result
|
374
378
|
end
|
375
379
|
|
@@ -73,8 +73,9 @@ module CZMQ
|
|
73
73
|
@finalizer = nil
|
74
74
|
end
|
75
75
|
|
76
|
-
# Create new poller
|
77
|
-
#
|
76
|
+
# Create new poller, specifying zero or more readers. The list of
|
77
|
+
# readers ends in a NULL. Each reader can be a zsock_t instance, a
|
78
|
+
# zactor_t instance, a libzmq socket (void *), or a file handle.
|
78
79
|
# @param reader [::FFI::Pointer, #to_ptr]
|
79
80
|
# @param args [Array<Object>]
|
80
81
|
# @return [CZMQ::Zpoller]
|
@@ -105,9 +106,8 @@ module CZMQ
|
|
105
106
|
result
|
106
107
|
end
|
107
108
|
|
108
|
-
# Remove a reader from the poller; returns 0 if OK, -1 on failure. The
|
109
|
-
#
|
110
|
-
# instance.
|
109
|
+
# Remove a reader from the poller; returns 0 if OK, -1 on failure. The reader
|
110
|
+
# must have been passed during construction, or in an zpoller_add () call.
|
111
111
|
#
|
112
112
|
# @param reader [::FFI::Pointer, #to_ptr]
|
113
113
|
# @return [Integer]
|
@@ -118,6 +118,21 @@ module CZMQ
|
|
118
118
|
result
|
119
119
|
end
|
120
120
|
|
121
|
+
# By default the poller stops if the process receives a SIGINT or SIGTERM
|
122
|
+
# signal. This makes it impossible to shut-down message based architectures
|
123
|
+
# like zactors. This method lets you switch off break handling. The default
|
124
|
+
# nonstop setting is off (false).
|
125
|
+
#
|
126
|
+
# @param nonstop [Boolean]
|
127
|
+
# @return [void]
|
128
|
+
def set_nonstop(nonstop)
|
129
|
+
raise DestroyedError unless @ptr
|
130
|
+
self_p = @ptr
|
131
|
+
nonstop = !(0==nonstop||!nonstop) # boolean
|
132
|
+
result = ::CZMQ::FFI.zpoller_set_nonstop(self_p, nonstop)
|
133
|
+
result
|
134
|
+
end
|
135
|
+
|
121
136
|
# Poll the registered readers for I/O, return first reader that has input.
|
122
137
|
# The reader will be a libzmq void * socket, or a zsock_t or zactor_t
|
123
138
|
# instance as specified in zpoller_new/zpoller_add. The timeout should be
|
@@ -160,18 +175,6 @@ module CZMQ
|
|
160
175
|
result
|
161
176
|
end
|
162
177
|
|
163
|
-
# Ignore zsys_interrupted flag in this poller. By default, a zpoller_wait will
|
164
|
-
# return immediately if detects zsys_interrupted is set to something other than
|
165
|
-
# zero. Calling zpoller_ignore_interrupts will supress this behavior.
|
166
|
-
#
|
167
|
-
# @return [void]
|
168
|
-
def ignore_interrupts()
|
169
|
-
raise DestroyedError unless @ptr
|
170
|
-
self_p = @ptr
|
171
|
-
result = ::CZMQ::FFI.zpoller_ignore_interrupts(self_p)
|
172
|
-
result
|
173
|
-
end
|
174
|
-
|
175
178
|
# Self test of this class.
|
176
179
|
#
|
177
180
|
# @param verbose [Boolean]
|
@@ -60,10 +60,10 @@ module CZMQ
|
|
60
60
|
|
61
61
|
attach_function :zarmour_new, [], :pointer, **opts
|
62
62
|
attach_function :zarmour_destroy, [:pointer], :void, **opts
|
63
|
-
attach_function :zarmour_mode_str, [:pointer], :string, **opts
|
64
63
|
attach_function :zarmour_encode, [:pointer, :pointer, :size_t], :pointer, **opts
|
65
64
|
attach_function :zarmour_decode, [:pointer, :string, :pointer], :pointer, **opts
|
66
65
|
attach_function :zarmour_mode, [:pointer], :zarmour_mode, **opts
|
66
|
+
attach_function :zarmour_mode_str, [:pointer], :string, **opts
|
67
67
|
attach_function :zarmour_set_mode, [:pointer, :zarmour_mode], :void, **opts
|
68
68
|
attach_function :zarmour_pad, [:pointer], :bool, **opts
|
69
69
|
attach_function :zarmour_set_pad, [:pointer, :bool], :void, **opts
|
@@ -347,8 +347,8 @@ module CZMQ
|
|
347
347
|
attach_function :zloop_set_ticket_delay, [:pointer, :size_t], :void, **opts
|
348
348
|
attach_function :zloop_set_max_timers, [:pointer, :size_t], :void, **opts
|
349
349
|
attach_function :zloop_set_verbose, [:pointer, :bool], :void, **opts
|
350
|
+
attach_function :zloop_set_nonstop, [:pointer, :bool], :void, **opts
|
350
351
|
attach_function :zloop_start, [:pointer], :int, **opts
|
351
|
-
attach_function :zloop_ignore_interrupts, [:pointer], :void, **opts
|
352
352
|
attach_function :zloop_test, [:bool], :void, **opts
|
353
353
|
|
354
354
|
require_relative 'ffi/zloop'
|
@@ -396,10 +396,10 @@ module CZMQ
|
|
396
396
|
attach_function :zpoller_destroy, [:pointer], :void, **opts
|
397
397
|
attach_function :zpoller_add, [:pointer, :pointer], :int, **opts
|
398
398
|
attach_function :zpoller_remove, [:pointer, :pointer], :int, **opts
|
399
|
+
attach_function :zpoller_set_nonstop, [:pointer, :bool], :void, **opts
|
399
400
|
attach_function :zpoller_wait, [:pointer, :int], :pointer, **opts
|
400
401
|
attach_function :zpoller_expired, [:pointer], :bool, **opts
|
401
402
|
attach_function :zpoller_terminated, [:pointer], :bool, **opts
|
402
|
-
attach_function :zpoller_ignore_interrupts, [:pointer], :void, **opts
|
403
403
|
attach_function :zpoller_test, [:bool], :void, **opts
|
404
404
|
|
405
405
|
require_relative 'ffi/zpoller'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: czmq-ffi-gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrik Wenger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|