ezmq 0.4.1 → 0.4.2
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/doc/EZMQ.html +1 -1
- data/doc/EZMQ/Client.html +29 -11
- data/doc/EZMQ/Context.html +1 -1
- data/doc/EZMQ/Pair.html +1 -1
- data/doc/EZMQ/Publisher.html +29 -11
- data/doc/EZMQ/Puller.html +1 -1
- data/doc/EZMQ/Pusher.html +1 -1
- data/doc/EZMQ/Server.html +23 -5
- data/doc/EZMQ/Socket.html +1 -1
- data/doc/EZMQ/Subscriber.html +40 -20
- data/doc/_index.html +1 -1
- data/doc/file.README.html +3 -1
- data/doc/index.html +3 -1
- data/doc/top-level-namespace.html +1 -1
- data/ezmq.gemspec +1 -1
- data/lib/ezmq/publish.rb +3 -2
- data/lib/ezmq/reply.rb +3 -3
- data/lib/ezmq/request.rb +3 -2
- data/lib/ezmq/subscribe.rb +3 -2
- 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: e5a788915b054fd2c4e816b9bc70d5dfc99fbb58
|
4
|
+
data.tar.gz: bc21858f05a0637343bc94afdceb06f267efaa02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2a77d86bf0dfd89a1f50d28a3562a3f752b45b5af224c8be8a5479b050e2025f1b890cd8a60faaa76978840b8e981d0cff5b3000ed0d40ef88d41b9f3fac689
|
7
|
+
data.tar.gz: 52977954bf53644eb6a1cbfa895599640c25734afb558bca3a0cad48a88fbb58171a5051b9eb2e4fcbe656547ee94d6a877a20e15269750de8bf07b43b5507c3
|
data/doc/EZMQ.html
CHANGED
@@ -251,7 +251,7 @@
|
|
251
251
|
</div>
|
252
252
|
|
253
253
|
<div id="footer">
|
254
|
-
Generated on
|
254
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
255
255
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
256
256
|
0.8.7.6 (ruby-2.0.0).
|
257
257
|
</div>
|
data/doc/EZMQ/Client.html
CHANGED
@@ -135,7 +135,7 @@
|
|
135
135
|
<li class="public ">
|
136
136
|
<span class="summary_signature">
|
137
137
|
|
138
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Client) <strong>initialize</strong>(**options) </a>
|
138
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Client) <strong>initialize</strong>(mode = :connect, **options) </a>
|
139
139
|
|
140
140
|
|
141
141
|
|
@@ -202,7 +202,7 @@
|
|
202
202
|
<div class="method_details first">
|
203
203
|
<h3 class="signature first" id="initialize-instance_method">
|
204
204
|
|
205
|
-
- (<tt><span class='object_link'><a href="" title="EZMQ::Client (class)">Client</a></span></tt>) <strong>initialize</strong>(**options)
|
205
|
+
- (<tt><span class='object_link'><a href="" title="EZMQ::Client (class)">Client</a></span></tt>) <strong>initialize</strong>(mode = :connect, **options)
|
206
206
|
|
207
207
|
|
208
208
|
|
@@ -220,6 +220,24 @@
|
|
220
220
|
<p class="tag_title">Parameters:</p>
|
221
221
|
<ul class="param">
|
222
222
|
|
223
|
+
<li>
|
224
|
+
|
225
|
+
<span class='name'>mode</span>
|
226
|
+
|
227
|
+
|
228
|
+
<span class='type'>(<tt>:bind</tt>, <tt>:connect</tt>)</span>
|
229
|
+
|
230
|
+
|
231
|
+
<em class="default">(defaults to: <tt>:connect</tt>)</em>
|
232
|
+
|
233
|
+
|
234
|
+
—
|
235
|
+
<div class='inline'>
|
236
|
+
<p>(:connect) a mode for the socket.</p>
|
237
|
+
</div>
|
238
|
+
|
239
|
+
</li>
|
240
|
+
|
223
241
|
<li>
|
224
242
|
|
225
243
|
<span class='name'>options</span>
|
@@ -252,15 +270,15 @@
|
|
252
270
|
<pre class="lines">
|
253
271
|
|
254
272
|
|
255
|
-
14
|
256
273
|
15
|
257
|
-
16
|
274
|
+
16
|
275
|
+
17</pre>
|
258
276
|
</td>
|
259
277
|
<td>
|
260
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/request.rb', line
|
278
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/request.rb', line 15</span>
|
261
279
|
|
262
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
263
|
-
<span class='kw'>super</span> <span class='
|
280
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:connect</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
281
|
+
<span class='kw'>super</span> <span class='id identifier rubyid_mode'>mode</span><span class='comma'>,</span> <span class='const'>ZMQ</span><span class='op'>::</span><span class='const'>REQ</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
264
282
|
<span class='kw'>end</span></pre>
|
265
283
|
</td>
|
266
284
|
</tr>
|
@@ -375,17 +393,17 @@
|
|
375
393
|
<pre class="lines">
|
376
394
|
|
377
395
|
|
378
|
-
27
|
379
396
|
28
|
380
397
|
29
|
381
398
|
30
|
382
399
|
31
|
383
400
|
32
|
384
401
|
33
|
385
|
-
34
|
402
|
+
34
|
403
|
+
35</pre>
|
386
404
|
</td>
|
387
405
|
<td>
|
388
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/request.rb', line
|
406
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/request.rb', line 28</span>
|
389
407
|
|
390
408
|
<span class='kw'>def</span> <span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
391
409
|
<span class='id identifier rubyid_send'>send</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
@@ -405,7 +423,7 @@
|
|
405
423
|
</div>
|
406
424
|
|
407
425
|
<div id="footer">
|
408
|
-
Generated on
|
426
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
409
427
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
410
428
|
0.8.7.6 (ruby-2.0.0).
|
411
429
|
</div>
|
data/doc/EZMQ/Context.html
CHANGED
@@ -216,7 +216,7 @@ entire context can be terminated, closing all sockets within it.</code></pre>
|
|
216
216
|
</div>
|
217
217
|
|
218
218
|
<div id="footer">
|
219
|
-
Generated on
|
219
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
220
220
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
221
221
|
0.8.7.6 (ruby-2.0.0).
|
222
222
|
</div>
|
data/doc/EZMQ/Pair.html
CHANGED
@@ -270,7 +270,7 @@ end can send or receive messages.</code></pre>
|
|
270
270
|
</div>
|
271
271
|
|
272
272
|
<div id="footer">
|
273
|
-
Generated on
|
273
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
274
274
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
275
275
|
0.8.7.6 (ruby-2.0.0).
|
276
276
|
</div>
|
data/doc/EZMQ/Publisher.html
CHANGED
@@ -135,7 +135,7 @@
|
|
135
135
|
<li class="public ">
|
136
136
|
<span class="summary_signature">
|
137
137
|
|
138
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Publisher) <strong>initialize</strong>(**options) </a>
|
138
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Publisher) <strong>initialize</strong>(mode = :bind, **options) </a>
|
139
139
|
|
140
140
|
|
141
141
|
|
@@ -202,7 +202,7 @@
|
|
202
202
|
<div class="method_details first">
|
203
203
|
<h3 class="signature first" id="initialize-instance_method">
|
204
204
|
|
205
|
-
- (<tt><span class='object_link'><a href="" title="EZMQ::Publisher (class)">Publisher</a></span></tt>) <strong>initialize</strong>(**options)
|
205
|
+
- (<tt><span class='object_link'><a href="" title="EZMQ::Publisher (class)">Publisher</a></span></tt>) <strong>initialize</strong>(mode = :bind, **options)
|
206
206
|
|
207
207
|
|
208
208
|
|
@@ -220,6 +220,24 @@
|
|
220
220
|
<p class="tag_title">Parameters:</p>
|
221
221
|
<ul class="param">
|
222
222
|
|
223
|
+
<li>
|
224
|
+
|
225
|
+
<span class='name'>mode</span>
|
226
|
+
|
227
|
+
|
228
|
+
<span class='type'>(<tt>:bind</tt>, <tt>:connect</tt>)</span>
|
229
|
+
|
230
|
+
|
231
|
+
<em class="default">(defaults to: <tt>:bind</tt>)</em>
|
232
|
+
|
233
|
+
|
234
|
+
—
|
235
|
+
<div class='inline'>
|
236
|
+
<p>(:bind) a mode for the socket.</p>
|
237
|
+
</div>
|
238
|
+
|
239
|
+
</li>
|
240
|
+
|
223
241
|
<li>
|
224
242
|
|
225
243
|
<span class='name'>options</span>
|
@@ -252,15 +270,15 @@
|
|
252
270
|
<pre class="lines">
|
253
271
|
|
254
272
|
|
255
|
-
14
|
256
273
|
15
|
257
|
-
16
|
274
|
+
16
|
275
|
+
17</pre>
|
258
276
|
</td>
|
259
277
|
<td>
|
260
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/publish.rb', line
|
278
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/publish.rb', line 15</span>
|
261
279
|
|
262
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
263
|
-
<span class='kw'>super</span> <span class='
|
280
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:bind</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
281
|
+
<span class='kw'>super</span> <span class='id identifier rubyid_mode'>mode</span><span class='comma'>,</span> <span class='const'>ZMQ</span><span class='op'>::</span><span class='const'>PUB</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
264
282
|
<span class='kw'>end</span></pre>
|
265
283
|
</td>
|
266
284
|
</tr>
|
@@ -398,13 +416,13 @@
|
|
398
416
|
<pre class="lines">
|
399
417
|
|
400
418
|
|
401
|
-
27
|
402
419
|
28
|
403
420
|
29
|
404
|
-
30
|
421
|
+
30
|
422
|
+
31</pre>
|
405
423
|
</td>
|
406
424
|
<td>
|
407
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/publish.rb', line
|
425
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/publish.rb', line 28</span>
|
408
426
|
|
409
427
|
<span class='kw'>def</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>topic:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
410
428
|
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span> <span class='id identifier rubyid_topic'>topic</span> <span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span> <span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:encode</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='ivar'>@encode</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='id identifier rubyid_message'>message</span> <span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
@@ -420,7 +438,7 @@
|
|
420
438
|
</div>
|
421
439
|
|
422
440
|
<div id="footer">
|
423
|
-
Generated on
|
441
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
424
442
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
425
443
|
0.8.7.6 (ruby-2.0.0).
|
426
444
|
</div>
|
data/doc/EZMQ/Puller.html
CHANGED
@@ -270,7 +270,7 @@ sources.</code></pre>
|
|
270
270
|
</div>
|
271
271
|
|
272
272
|
<div id="footer">
|
273
|
-
Generated on
|
273
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
274
274
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
275
275
|
0.8.7.6 (ruby-2.0.0).
|
276
276
|
</div>
|
data/doc/EZMQ/Pusher.html
CHANGED
@@ -271,7 +271,7 @@ destinations.</code></pre>
|
|
271
271
|
</div>
|
272
272
|
|
273
273
|
<div id="footer">
|
274
|
-
Generated on
|
274
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
275
275
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
276
276
|
0.8.7.6 (ruby-2.0.0).
|
277
277
|
</div>
|
data/doc/EZMQ/Server.html
CHANGED
@@ -135,7 +135,7 @@
|
|
135
135
|
<li class="public ">
|
136
136
|
<span class="summary_signature">
|
137
137
|
|
138
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Server) <strong>initialize</strong>(**options) </a>
|
138
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Server) <strong>initialize</strong>(mode = :bind, **options) </a>
|
139
139
|
|
140
140
|
|
141
141
|
|
@@ -202,7 +202,7 @@
|
|
202
202
|
<div class="method_details first">
|
203
203
|
<h3 class="signature first" id="initialize-instance_method">
|
204
204
|
|
205
|
-
- (<tt><span class='object_link'><a href="" title="EZMQ::Server (class)">Server</a></span></tt>) <strong>initialize</strong>(**options)
|
205
|
+
- (<tt><span class='object_link'><a href="" title="EZMQ::Server (class)">Server</a></span></tt>) <strong>initialize</strong>(mode = :bind, **options)
|
206
206
|
|
207
207
|
|
208
208
|
|
@@ -220,6 +220,24 @@
|
|
220
220
|
<p class="tag_title">Parameters:</p>
|
221
221
|
<ul class="param">
|
222
222
|
|
223
|
+
<li>
|
224
|
+
|
225
|
+
<span class='name'>mode</span>
|
226
|
+
|
227
|
+
|
228
|
+
<span class='type'>(<tt>:bind</tt>, <tt>:connect</tt>)</span>
|
229
|
+
|
230
|
+
|
231
|
+
<em class="default">(defaults to: <tt>:bind</tt>)</em>
|
232
|
+
|
233
|
+
|
234
|
+
—
|
235
|
+
<div class='inline'>
|
236
|
+
<p>(:bind) a mode for the socket.</p>
|
237
|
+
</div>
|
238
|
+
|
239
|
+
</li>
|
240
|
+
|
223
241
|
<li>
|
224
242
|
|
225
243
|
<span class='name'>options</span>
|
@@ -259,8 +277,8 @@
|
|
259
277
|
<td>
|
260
278
|
<pre class="code"><span class="info file"># File 'lib/ezmq/reply.rb', line 15</span>
|
261
279
|
|
262
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
263
|
-
<span class='kw'>super</span> <span class='
|
280
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:bind</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
281
|
+
<span class='kw'>super</span> <span class='id identifier rubyid_mode'>mode</span><span class='comma'>,</span> <span class='const'>ZMQ</span><span class='op'>::</span><span class='const'>REP</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
264
282
|
<span class='kw'>end</span></pre>
|
265
283
|
</td>
|
266
284
|
</tr>
|
@@ -390,7 +408,7 @@
|
|
390
408
|
</div>
|
391
409
|
|
392
410
|
<div id="footer">
|
393
|
-
Generated on
|
411
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
394
412
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
395
413
|
0.8.7.6 (ruby-2.0.0).
|
396
414
|
</div>
|
data/doc/EZMQ/Socket.html
CHANGED
@@ -1292,7 +1292,7 @@ address instead.</p>
|
|
1292
1292
|
</div>
|
1293
1293
|
|
1294
1294
|
<div id="footer">
|
1295
|
-
Generated on
|
1295
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
1296
1296
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1297
1297
|
0.8.7.6 (ruby-2.0.0).
|
1298
1298
|
</div>
|
data/doc/EZMQ/Subscriber.html
CHANGED
@@ -135,7 +135,7 @@
|
|
135
135
|
<li class="public ">
|
136
136
|
<span class="summary_signature">
|
137
137
|
|
138
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Publisher) <strong>initialize</strong>(**options) </a>
|
138
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Publisher) <strong>initialize</strong>(mode = :connect, **options) </a>
|
139
139
|
|
140
140
|
|
141
141
|
|
@@ -274,7 +274,7 @@
|
|
274
274
|
<div class="method_details first">
|
275
275
|
<h3 class="signature first" id="initialize-instance_method">
|
276
276
|
|
277
|
-
- (<tt><span class='object_link'><a href="Publisher.html" title="EZMQ::Publisher (class)">Publisher</a></span></tt>) <strong>initialize</strong>(**options)
|
277
|
+
- (<tt><span class='object_link'><a href="Publisher.html" title="EZMQ::Publisher (class)">Publisher</a></span></tt>) <strong>initialize</strong>(mode = :connect, **options)
|
278
278
|
|
279
279
|
|
280
280
|
|
@@ -300,6 +300,24 @@
|
|
300
300
|
<p class="tag_title">Parameters:</p>
|
301
301
|
<ul class="param">
|
302
302
|
|
303
|
+
<li>
|
304
|
+
|
305
|
+
<span class='name'>mode</span>
|
306
|
+
|
307
|
+
|
308
|
+
<span class='type'>(<tt>:bind</tt>, <tt>:connect</tt>)</span>
|
309
|
+
|
310
|
+
|
311
|
+
<em class="default">(defaults to: <tt>:connect</tt>)</em>
|
312
|
+
|
313
|
+
|
314
|
+
—
|
315
|
+
<div class='inline'>
|
316
|
+
<p>(:connect) a mode for the socket.</p>
|
317
|
+
</div>
|
318
|
+
|
319
|
+
</li>
|
320
|
+
|
303
321
|
<li>
|
304
322
|
|
305
323
|
<span class='name'>options</span>
|
@@ -321,6 +339,8 @@
|
|
321
339
|
|
322
340
|
|
323
341
|
|
342
|
+
|
343
|
+
|
324
344
|
<p class="tag_title">Options Hash (<tt>**options</tt>):</p>
|
325
345
|
<ul class="option">
|
326
346
|
|
@@ -354,16 +374,16 @@
|
|
354
374
|
<pre class="lines">
|
355
375
|
|
356
376
|
|
357
|
-
17
|
358
377
|
18
|
359
378
|
19
|
360
|
-
20
|
379
|
+
20
|
380
|
+
21</pre>
|
361
381
|
</td>
|
362
382
|
<td>
|
363
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line
|
383
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line 18</span>
|
364
384
|
|
365
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
366
|
-
<span class='kw'>super</span> <span class='
|
385
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:connect</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
386
|
+
<span class='kw'>super</span> <span class='id identifier rubyid_mode'>mode</span><span class='comma'>,</span> <span class='const'>ZMQ</span><span class='op'>::</span><span class='const'>SUB</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
367
387
|
<span class='id identifier rubyid_subscribe'>subscribe</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:topic</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:topic</span><span class='rbracket'>]</span>
|
368
388
|
<span class='kw'>end</span></pre>
|
369
389
|
</td>
|
@@ -458,14 +478,14 @@
|
|
458
478
|
<pre class="lines">
|
459
479
|
|
460
480
|
|
461
|
-
57
|
462
481
|
58
|
463
482
|
59
|
464
483
|
60
|
465
|
-
61
|
484
|
+
61
|
485
|
+
62</pre>
|
466
486
|
</td>
|
467
487
|
<td>
|
468
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line
|
488
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line 58</span>
|
469
489
|
|
470
490
|
<span class='kw'>def</span> <span class='id identifier rubyid_listen'>listen</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
471
491
|
<span class='id identifier rubyid_loop'>loop</span> <span class='kw'>do</span>
|
@@ -625,7 +645,6 @@
|
|
625
645
|
<pre class="lines">
|
626
646
|
|
627
647
|
|
628
|
-
35
|
629
648
|
36
|
630
649
|
37
|
631
650
|
38
|
@@ -637,10 +656,11 @@
|
|
637
656
|
44
|
638
657
|
45
|
639
658
|
46
|
640
|
-
47
|
659
|
+
47
|
660
|
+
48</pre>
|
641
661
|
</td>
|
642
662
|
<td>
|
643
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line
|
663
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line 36</span>
|
644
664
|
|
645
665
|
<span class='kw'>def</span> <span class='id identifier rubyid_receive'>receive</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
646
666
|
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
@@ -737,12 +757,12 @@ provided, #initialize calls #subscribe automatically.</p>
|
|
737
757
|
<pre class="lines">
|
738
758
|
|
739
759
|
|
740
|
-
74
|
741
760
|
75
|
742
|
-
76
|
761
|
+
76
|
762
|
+
77</pre>
|
743
763
|
</td>
|
744
764
|
<td>
|
745
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line
|
765
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line 75</span>
|
746
766
|
|
747
767
|
<span class='kw'>def</span> <span class='id identifier rubyid_subscribe'>subscribe</span><span class='lparen'>(</span><span class='id identifier rubyid_topic'>topic</span><span class='rparen'>)</span>
|
748
768
|
<span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_setsockopt'>setsockopt</span><span class='lparen'>(</span><span class='const'>ZMQ</span><span class='op'>::</span><span class='const'>SUBSCRIBE</span><span class='comma'>,</span> <span class='id identifier rubyid_topic'>topic</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='int'>0</span>
|
@@ -817,12 +837,12 @@ set, this will only remove one.</p>
|
|
817
837
|
<pre class="lines">
|
818
838
|
|
819
839
|
|
820
|
-
85
|
821
840
|
86
|
822
|
-
87
|
841
|
+
87
|
842
|
+
88</pre>
|
823
843
|
</td>
|
824
844
|
<td>
|
825
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line
|
845
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/subscribe.rb', line 86</span>
|
826
846
|
|
827
847
|
<span class='kw'>def</span> <span class='id identifier rubyid_unsubscribe'>unsubscribe</span><span class='lparen'>(</span><span class='id identifier rubyid_topic'>topic</span><span class='rparen'>)</span>
|
828
848
|
<span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_setsockopt'>setsockopt</span><span class='lparen'>(</span><span class='const'>ZMQ</span><span class='op'>::</span><span class='const'>UNSUBSCRIBE</span><span class='comma'>,</span> <span class='id identifier rubyid_topic'>topic</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='int'>0</span>
|
@@ -837,7 +857,7 @@ set, this will only remove one.</p>
|
|
837
857
|
</div>
|
838
858
|
|
839
859
|
<div id="footer">
|
840
|
-
Generated on
|
860
|
+
Generated on Tue Feb 24 13:47:50 2015 by
|
841
861
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
842
862
|
0.8.7.6 (ruby-2.0.0).
|
843
863
|
</div>
|
data/doc/_index.html
CHANGED
@@ -188,7 +188,7 @@
|
|
188
188
|
</div>
|
189
189
|
|
190
190
|
<div id="footer">
|
191
|
-
Generated on
|
191
|
+
Generated on Tue Feb 24 13:47:49 2015 by
|
192
192
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
193
193
|
0.8.7.6 (ruby-2.0.0).
|
194
194
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -63,6 +63,8 @@
|
|
63
63
|
|
64
64
|
<div id="content"><div id='filecontents'><h1><a href="https://colstrom.github.io/ezmq/">EZMQ (Effortless ZeroMQ)</a></h1>
|
65
65
|
|
66
|
+
<p><a href="https://gitter.im/colstrom/ezmq?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img src="https://badges.gitter.im/Join%20Chat.svg" alt="Join the chat at https://gitter.im/colstrom/ezmq" /></a></p>
|
67
|
+
|
66
68
|
<p><a href="http://badge.fury.io/rb/ezmq"><img src="https://badge.fury.io/rb/ezmq.svg" alt="Gem Version" /></a>
|
67
69
|
<a href="https://gemnasium.com/colstrom/ezmq"><img src="https://gemnasium.com/colstrom/ezmq.svg" alt="Dependency Status" /></a>
|
68
70
|
<a href="https://codeclimate.com/github/colstrom/ezmq"><img src="https://codeclimate.com/github/colstrom/ezmq/badges/gpa.svg" alt="Code Climate" /></a></p>
|
@@ -238,7 +240,7 @@ sudo aptitude install libzmq3-dev
|
|
238
240
|
</div></div>
|
239
241
|
|
240
242
|
<div id="footer">
|
241
|
-
Generated on
|
243
|
+
Generated on Tue Feb 24 13:47:49 2015 by
|
242
244
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
243
245
|
0.8.7.6 (ruby-2.0.0).
|
244
246
|
</div>
|
data/doc/index.html
CHANGED
@@ -63,6 +63,8 @@
|
|
63
63
|
|
64
64
|
<div id="content"><div id='filecontents'><h1><a href="https://colstrom.github.io/ezmq/">EZMQ (Effortless ZeroMQ)</a></h1>
|
65
65
|
|
66
|
+
<p><a href="https://gitter.im/colstrom/ezmq?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img src="https://badges.gitter.im/Join%20Chat.svg" alt="Join the chat at https://gitter.im/colstrom/ezmq" /></a></p>
|
67
|
+
|
66
68
|
<p><a href="http://badge.fury.io/rb/ezmq"><img src="https://badge.fury.io/rb/ezmq.svg" alt="Gem Version" /></a>
|
67
69
|
<a href="https://gemnasium.com/colstrom/ezmq"><img src="https://gemnasium.com/colstrom/ezmq.svg" alt="Dependency Status" /></a>
|
68
70
|
<a href="https://codeclimate.com/github/colstrom/ezmq"><img src="https://codeclimate.com/github/colstrom/ezmq/badges/gpa.svg" alt="Code Climate" /></a></p>
|
@@ -238,7 +240,7 @@ sudo aptitude install libzmq3-dev
|
|
238
240
|
</div></div>
|
239
241
|
|
240
242
|
<div id="footer">
|
241
|
-
Generated on
|
243
|
+
Generated on Tue Feb 24 13:47:49 2015 by
|
242
244
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
243
245
|
0.8.7.6 (ruby-2.0.0).
|
244
246
|
</div>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Tue Feb 24 13:47:49 2015 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.7.6 (ruby-2.0.0).
|
109
109
|
</div>
|
data/ezmq.gemspec
CHANGED
data/lib/ezmq/publish.rb
CHANGED
@@ -6,13 +6,14 @@ module EZMQ
|
|
6
6
|
class Publisher < EZMQ::Socket
|
7
7
|
# Creates a new Publisher socket.
|
8
8
|
#
|
9
|
+
# @param [:bind, :connect] mode (:bind) a mode for the socket.
|
9
10
|
# @param [Hash] options optional parameters.
|
10
11
|
# @see EZMQ::Socket EZMQ::Socket for optional parameters.
|
11
12
|
#
|
12
13
|
# @return [Publisher] a new instance of Publisher.
|
13
14
|
#
|
14
|
-
def initialize(**options)
|
15
|
-
super
|
15
|
+
def initialize(mode = :bind, **options)
|
16
|
+
super mode, ZMQ::PUB, options
|
16
17
|
end
|
17
18
|
|
18
19
|
# Sends a message on the socket, with an optional topic.
|
data/lib/ezmq/reply.rb
CHANGED
@@ -6,14 +6,14 @@ module EZMQ
|
|
6
6
|
class Server < EZMQ::Socket
|
7
7
|
# Creates a new Server socket.
|
8
8
|
#
|
9
|
+
# @param [:bind, :connect] mode (:bind) a mode for the socket.
|
9
10
|
# @param [Hash] options optional parameters
|
10
|
-
#
|
11
11
|
# @see EZMQ::Socket EZMQ::Socket for optional parameters.
|
12
12
|
#
|
13
13
|
# @return [Server] a new instance of Server
|
14
14
|
#
|
15
|
-
def initialize(**options)
|
16
|
-
super
|
15
|
+
def initialize(mode = :bind, **options)
|
16
|
+
super mode, ZMQ::REP, options
|
17
17
|
end
|
18
18
|
|
19
19
|
# Listens for a request, and responds to it.
|
data/lib/ezmq/request.rb
CHANGED
@@ -6,13 +6,14 @@ module EZMQ
|
|
6
6
|
class Client < EZMQ::Socket
|
7
7
|
# Creates a new Client socket.
|
8
8
|
#
|
9
|
+
# @param [:bind, :connect] mode (:connect) a mode for the socket.
|
9
10
|
# @param [Hash] options optional parameters.
|
10
11
|
# @see EZMQ::Socket EZMQ::Socket for optional parameters.
|
11
12
|
#
|
12
13
|
# @return [Client] a new instance of Client.
|
13
14
|
#
|
14
|
-
def initialize(**options)
|
15
|
-
super
|
15
|
+
def initialize(mode = :connect, **options)
|
16
|
+
super mode, ZMQ::REQ, options
|
16
17
|
end
|
17
18
|
|
18
19
|
# Sends a message and waits to receive a response.
|
data/lib/ezmq/subscribe.rb
CHANGED
@@ -8,14 +8,15 @@ module EZMQ
|
|
8
8
|
#
|
9
9
|
# @note The default behaviour is to output and messages received to STDOUT.
|
10
10
|
#
|
11
|
+
# @param [:bind, :connect] mode (:connect) a mode for the socket.
|
11
12
|
# @param [Hash] options optional parameters.
|
12
13
|
# @option options [String] topic a topic to subscribe to.
|
13
14
|
# @see EZMQ::Socket EZMQ::Socket for optional parameters.
|
14
15
|
#
|
15
16
|
# @return [Publisher] a new instance of Publisher.
|
16
17
|
#
|
17
|
-
def initialize(**options)
|
18
|
-
super
|
18
|
+
def initialize(mode = :connect, **options)
|
19
|
+
super mode, ZMQ::SUB, options
|
19
20
|
subscribe options[:topic] if options[:topic]
|
20
21
|
end
|
21
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ezmq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Olstrom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi-rzmq
|