czmq-ffi-gen 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4753723af1305df12590a3f43a5cedc724d3d8af
4
- data.tar.gz: 502e1643c0f83b02f414e4211bba56b91cef9817
3
+ metadata.gz: 119e644dab9cbe66ebf0d0064d2e8b9d06ff40ab
4
+ data.tar.gz: f74423436c46aa8bcbcf1fd3025d8511e2d3906b
5
5
  SHA512:
6
- metadata.gz: a309f48d12a153ab625476d187e635df2ec9e592da1442a4928557e329bb7e2be7123f58976926fb6f1a9b1b5023c5a690455e59873a2ee99591450cf7babf04
7
- data.tar.gz: 969c75a924e8bf90f0b66de5f5cb3faad2d050a6e7e5d1e142cf371796bdb62771ca3a139529ce93bb7b6441b4233de8fe495faa6323032e41197a9a679d45e7
6
+ metadata.gz: da31baf796d2cda0b860db2534308e91953c513540df8ad55c24df04eb2e7f55547b074fc7be147d7b9d93e0552bc267fa3d25eeefa45ab13fd097fa6b8b71c9
7
+ data.tar.gz: c4f0f6ace9dc9f45c4d4dfdeb8ffd4deb9714b33ab68bb741ab22775b0e4cdc3a517a3adb33035a4e50b0f3b11a9ea7d1b35b3e623633785b6bfb64cc4e44fd7
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.4.1 (01/06/2016)
2
+ -----
3
+ * upgrade CZMQ low-level binding to
4
+ - fix zbeacon so it doesn't close STDIN
5
+
1
6
  0.4.0 (12/26/2015)
2
7
  -----
3
8
  * upgrade CZMQ low-level binding to
data/README.md CHANGED
@@ -40,9 +40,9 @@ for the API documentation.
40
40
 
41
41
  ## Supported Rubies
42
42
 
43
- Tested with these:
43
+ Tested on CI with these:
44
44
 
45
- * Ruby 2.2.3
45
+ * Ruby 2.2.4
46
46
  * JRuby HEAD (>= 9.0.0.0)
47
47
  * Rubinius
48
48
 
@@ -90,17 +90,9 @@ module CZMQ
90
90
  result
91
91
  end
92
92
 
93
- # Get printable string for mode.
94
- #
95
- # @return [String]
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
- # Start the reactor. Takes control of the thread and returns when the 0MQ
352
- # context is terminated or the process is interrupted, or any event handler
353
- # returns -1. Event handlers may register new sockets and timers, and
354
- # cancel sockets. Returns 0 if interrupted, -1 if cancelled by a handler.
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
- # @return [Integer]
357
- def start()
357
+ # @param nonstop [Boolean]
358
+ # @return [void]
359
+ def set_nonstop(nonstop)
358
360
  raise DestroyedError unless @ptr
359
361
  self_p = @ptr
360
- result = ::CZMQ::FFI.zloop_start(self_p)
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
- # Ignore zsys_interrupted flag in this loop. By default, a zloop_start will
365
- # exit as soon as it detects zsys_interrupted is set to something other than
366
- # zero. Calling zloop_ignore_interrupts will supress this behavior.
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 [void]
369
- def ignore_interrupts()
372
+ # @return [Integer]
373
+ def start()
370
374
  raise DestroyedError unless @ptr
371
375
  self_p = @ptr
372
- result = ::CZMQ::FFI.zloop_ignore_interrupts(self_p)
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; the reader can be a libzmq socket (void *), a zsock_t
77
- # instance, or a zactor_t instance.
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
- # reader may be a libzmq void * socket, a zsock_t instance, or a zactor_t
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'
@@ -1,5 +1,5 @@
1
1
  module CZMQ
2
2
  module FFI
3
- GEM_VERSION = "0.4.0"
3
+ GEM_VERSION = "0.4.1"
4
4
  end
5
5
  end
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.0
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: 2015-12-26 00:00:00.000000000 Z
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi