ezmq 0.3.3 → 0.3.4
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 +4 -4
- data/doc/EZMQ/Client.html +1 -1
- data/doc/EZMQ/Publisher.html +1 -1
- data/doc/EZMQ/Puller.html +1 -1
- data/doc/EZMQ/Pusher.html +1 -1
- data/doc/EZMQ/Server.html +1 -1
- data/doc/EZMQ/Socket.html +38 -38
- data/doc/EZMQ/Subscriber.html +1 -1
- data/doc/_index.html +8 -1
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +27 -21
- data/doc/top-level-namespace.html +1 -1
- data/ezmq.gemspec +1 -1
- data/lib/ezmq.rb +1 -0
- data/lib/ezmq/socket.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: db0f5acc1f2dd405864b1d505be6d2d8544768f3
|
|
4
|
+
data.tar.gz: fba1f5ef6e57576f6cda48194a79b97bf114002f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 460d90b6081db2b9f67c2a388ecac4ceb625a20343795648b871d8dc87804476d0441c04b288fdbeb5f98b6431ad518260fb4a4c76da51a4d237b08f24ba0506
|
|
7
|
+
data.tar.gz: af48dc68db0c409106fbbe6a32f6d8780ffd97bd7cbef67cc865fb5230b2cf3e9d750b305600e3a3dfea1a9cd0120ee81dcc04c1731ffb1014fe5c08c75eab1b
|
data/doc/EZMQ.html
CHANGED
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
<dt class="r1 last">Defined in:</dt>
|
|
82
|
-
<dd class="r1 last">lib/ezmq/
|
|
83
|
-
lib/ezmq/
|
|
82
|
+
<dd class="r1 last">lib/ezmq/push.rb<span class="defines">,<br />
|
|
83
|
+
lib/ezmq/pull.rb,<br /> lib/ezmq/reply.rb,<br /> lib/ezmq/socket.rb,<br /> lib/ezmq/publish.rb,<br /> lib/ezmq/request.rb,<br /> lib/ezmq/context.rb,<br /> lib/ezmq/subscribe.rb</span>
|
|
84
84
|
</dd>
|
|
85
85
|
|
|
86
86
|
</dl>
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="EZMQ/Client.html" title="EZMQ::Client (class)">Client</a></span>, <span class='object_link'><a href="EZMQ/Publisher.html" title="EZMQ::Publisher (class)">Publisher</a></span>, <span class='object_link'><a href="EZMQ/Puller.html" title="EZMQ::Puller (class)">Puller</a></span>, <span class='object_link'><a href="EZMQ/Pusher.html" title="EZMQ::Pusher (class)">Pusher</a></span>, <span class='object_link'><a href="EZMQ/Server.html" title="EZMQ::Server (class)">Server</a></span>, <span class='object_link'><a href="EZMQ/Socket.html" title="EZMQ::Socket (class)">Socket</a></span>, <span class='object_link'><a href="EZMQ/Subscriber.html" title="EZMQ::Subscriber (class)">Subscriber</a></span>
|
|
106
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="EZMQ/Client.html" title="EZMQ::Client (class)">Client</a></span>, <span class='object_link'><a href="EZMQ/Context.html" title="EZMQ::Context (class)">Context</a></span>, <span class='object_link'><a href="EZMQ/Publisher.html" title="EZMQ::Publisher (class)">Publisher</a></span>, <span class='object_link'><a href="EZMQ/Puller.html" title="EZMQ::Puller (class)">Puller</a></span>, <span class='object_link'><a href="EZMQ/Pusher.html" title="EZMQ::Pusher (class)">Pusher</a></span>, <span class='object_link'><a href="EZMQ/Server.html" title="EZMQ::Server (class)">Server</a></span>, <span class='object_link'><a href="EZMQ/Socket.html" title="EZMQ::Socket (class)">Socket</a></span>, <span class='object_link'><a href="EZMQ/Subscriber.html" title="EZMQ::Subscriber (class)">Subscriber</a></span>
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
</p>
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
</div>
|
|
120
120
|
|
|
121
121
|
<div id="footer">
|
|
122
|
-
Generated on Wed Jan 28 09:
|
|
122
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
123
123
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
124
124
|
0.8.7.6 (ruby-2.0.0).
|
|
125
125
|
</div>
|
data/doc/EZMQ/Client.html
CHANGED
|
@@ -405,7 +405,7 @@
|
|
|
405
405
|
</div>
|
|
406
406
|
|
|
407
407
|
<div id="footer">
|
|
408
|
-
Generated on Wed Jan 28 09:
|
|
408
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
409
409
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
410
410
|
0.8.7.6 (ruby-2.0.0).
|
|
411
411
|
</div>
|
data/doc/EZMQ/Publisher.html
CHANGED
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
</div>
|
|
421
421
|
|
|
422
422
|
<div id="footer">
|
|
423
|
-
Generated on Wed Jan 28 09:
|
|
423
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
424
424
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
425
425
|
0.8.7.6 (ruby-2.0.0).
|
|
426
426
|
</div>
|
data/doc/EZMQ/Puller.html
CHANGED
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
</div>
|
|
268
268
|
|
|
269
269
|
<div id="footer">
|
|
270
|
-
Generated on Wed Jan 28 09:
|
|
270
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
271
271
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
272
272
|
0.8.7.6 (ruby-2.0.0).
|
|
273
273
|
</div>
|
data/doc/EZMQ/Pusher.html
CHANGED
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
</div>
|
|
268
268
|
|
|
269
269
|
<div id="footer">
|
|
270
|
-
Generated on Wed Jan 28 09:
|
|
270
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
271
271
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
272
272
|
0.8.7.6 (ruby-2.0.0).
|
|
273
273
|
</div>
|
data/doc/EZMQ/Server.html
CHANGED
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
</div>
|
|
391
391
|
|
|
392
392
|
<div id="footer">
|
|
393
|
-
Generated on Wed Jan 28 09:
|
|
393
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
394
394
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
395
395
|
0.8.7.6 (ruby-2.0.0).
|
|
396
396
|
</div>
|
data/doc/EZMQ/Socket.html
CHANGED
|
@@ -558,22 +558,22 @@
|
|
|
558
558
|
<pre class="lines">
|
|
559
559
|
|
|
560
560
|
|
|
561
|
-
24
|
|
562
|
-
25
|
|
563
561
|
26
|
|
564
562
|
27
|
|
565
563
|
28
|
|
566
564
|
29
|
|
567
565
|
30
|
|
568
566
|
31
|
|
569
|
-
32
|
|
567
|
+
32
|
|
568
|
+
33
|
|
569
|
+
34</pre>
|
|
570
570
|
</td>
|
|
571
571
|
<td>
|
|
572
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line
|
|
572
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line 26</span>
|
|
573
573
|
|
|
574
574
|
<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='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
575
575
|
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span> <span class='kw'>unless</span> <span class='qsymbols_beg'>%i(</span><span class='tstring_content'>bind</span><span class='words_sep'> </span><span class='tstring_content'>connect</span><span class='words_sep'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_mode'>mode</span>
|
|
576
|
-
<span class='ivar'>@context</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:context</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>
|
|
576
|
+
<span class='ivar'>@context</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:context</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>EZMQ</span><span class='op'>::</span><span class='const'>Context</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
577
577
|
<span class='ivar'>@socket</span> <span class='op'>=</span> <span class='ivar'>@context</span><span class='period'>.</span><span class='id identifier rubyid_socket'>socket</span> <span class='id identifier rubyid_type'>type</span>
|
|
578
578
|
<span class='ivar'>@encode</span> <span class='op'>=</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='tlambda'>-></span> <span class='id identifier rubyid_m'>m</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_m'>m</span> <span class='rbrace'>}</span>
|
|
579
579
|
<span class='ivar'>@decode</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:decode</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tlambda'>-></span> <span class='id identifier rubyid_m'>m</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_m'>m</span> <span class='rbrace'>}</span>
|
|
@@ -618,12 +618,12 @@
|
|
|
618
618
|
<pre class="lines">
|
|
619
619
|
|
|
620
620
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
621
|
+
7
|
|
622
|
+
8
|
|
623
|
+
9</pre>
|
|
624
624
|
</td>
|
|
625
625
|
<td>
|
|
626
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line
|
|
626
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line 7</span>
|
|
627
627
|
|
|
628
628
|
<span class='kw'>def</span> <span class='id identifier rubyid_context'>context</span>
|
|
629
629
|
<span class='ivar'>@context</span>
|
|
@@ -661,12 +661,12 @@
|
|
|
661
661
|
<pre class="lines">
|
|
662
662
|
|
|
663
663
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
664
|
+
7
|
|
665
|
+
8
|
|
666
|
+
9</pre>
|
|
667
667
|
</td>
|
|
668
668
|
<td>
|
|
669
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line
|
|
669
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line 7</span>
|
|
670
670
|
|
|
671
671
|
<span class='kw'>def</span> <span class='id identifier rubyid_decode'>decode</span>
|
|
672
672
|
<span class='ivar'>@decode</span>
|
|
@@ -704,12 +704,12 @@
|
|
|
704
704
|
<pre class="lines">
|
|
705
705
|
|
|
706
706
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
707
|
+
7
|
|
708
|
+
8
|
|
709
|
+
9</pre>
|
|
710
710
|
</td>
|
|
711
711
|
<td>
|
|
712
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line
|
|
712
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line 7</span>
|
|
713
713
|
|
|
714
714
|
<span class='kw'>def</span> <span class='id identifier rubyid_encode'>encode</span>
|
|
715
715
|
<span class='ivar'>@encode</span>
|
|
@@ -747,12 +747,12 @@
|
|
|
747
747
|
<pre class="lines">
|
|
748
748
|
|
|
749
749
|
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
750
|
+
7
|
|
751
|
+
8
|
|
752
|
+
9</pre>
|
|
753
753
|
</td>
|
|
754
754
|
<td>
|
|
755
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line
|
|
755
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line 7</span>
|
|
756
756
|
|
|
757
757
|
<span class='kw'>def</span> <span class='id identifier rubyid_socket'>socket</span>
|
|
758
758
|
<span class='ivar'>@socket</span>
|
|
@@ -893,14 +893,14 @@ address instead.</p>
|
|
|
893
893
|
<pre class="lines">
|
|
894
894
|
|
|
895
895
|
|
|
896
|
-
86
|
|
897
|
-
87
|
|
898
896
|
88
|
|
899
897
|
89
|
|
900
|
-
90
|
|
898
|
+
90
|
|
899
|
+
91
|
|
900
|
+
92</pre>
|
|
901
901
|
</td>
|
|
902
902
|
<td>
|
|
903
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line
|
|
903
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line 88</span>
|
|
904
904
|
|
|
905
905
|
<span class='kw'>def</span> <span class='id identifier rubyid_connect'>connect</span><span class='lparen'>(</span><span class='label'>protocol:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tcp</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>address:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>port:</span> <span class='int'>5555</span><span class='rparen'>)</span>
|
|
906
906
|
<span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span> <span class='id identifier rubyid_protocol'>protocol</span> <span class='embexpr_end'>}</span><span class='tstring_content'>://</span><span class='embexpr_beg'>#{</span> <span class='id identifier rubyid_address'>address</span> <span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
@@ -976,18 +976,18 @@ address instead.</p>
|
|
|
976
976
|
<pre class="lines">
|
|
977
977
|
|
|
978
978
|
|
|
979
|
-
101
|
|
980
|
-
102
|
|
981
979
|
103
|
|
982
980
|
104
|
|
983
981
|
105
|
|
984
982
|
106
|
|
985
983
|
107
|
|
986
984
|
108
|
|
987
|
-
109
|
|
985
|
+
109
|
|
986
|
+
110
|
|
987
|
+
111</pre>
|
|
988
988
|
</td>
|
|
989
989
|
<td>
|
|
990
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line
|
|
990
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line 103</span>
|
|
991
991
|
|
|
992
992
|
<span class='kw'>def</span> <span class='id identifier rubyid_listen'>listen</span>
|
|
993
993
|
<span class='id identifier rubyid_loop'>loop</span> <span class='kw'>do</span>
|
|
@@ -1135,8 +1135,6 @@ address instead.</p>
|
|
|
1135
1135
|
<pre class="lines">
|
|
1136
1136
|
|
|
1137
1137
|
|
|
1138
|
-
61
|
|
1139
|
-
62
|
|
1140
1138
|
63
|
|
1141
1139
|
64
|
|
1142
1140
|
65
|
|
@@ -1144,10 +1142,12 @@ address instead.</p>
|
|
|
1144
1142
|
67
|
|
1145
1143
|
68
|
|
1146
1144
|
69
|
|
1147
|
-
70
|
|
1145
|
+
70
|
|
1146
|
+
71
|
|
1147
|
+
72</pre>
|
|
1148
1148
|
</td>
|
|
1149
1149
|
<td>
|
|
1150
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line
|
|
1150
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line 63</span>
|
|
1151
1151
|
|
|
1152
1152
|
<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>
|
|
1153
1153
|
<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>
|
|
@@ -1278,13 +1278,13 @@ address instead.</p>
|
|
|
1278
1278
|
<pre class="lines">
|
|
1279
1279
|
|
|
1280
1280
|
|
|
1281
|
-
44
|
|
1282
|
-
45
|
|
1283
1281
|
46
|
|
1284
|
-
47
|
|
1282
|
+
47
|
|
1283
|
+
48
|
|
1284
|
+
49</pre>
|
|
1285
1285
|
</td>
|
|
1286
1286
|
<td>
|
|
1287
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line
|
|
1287
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/socket.rb', line 46</span>
|
|
1288
1288
|
|
|
1289
1289
|
<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='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
1290
1290
|
<span class='id identifier rubyid_encoded'>encoded</span> <span class='op'>=</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>
|
|
@@ -1300,7 +1300,7 @@ address instead.</p>
|
|
|
1300
1300
|
</div>
|
|
1301
1301
|
|
|
1302
1302
|
<div id="footer">
|
|
1303
|
-
Generated on Wed Jan 28 09:
|
|
1303
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
1304
1304
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1305
1305
|
0.8.7.6 (ruby-2.0.0).
|
|
1306
1306
|
</div>
|
data/doc/EZMQ/Subscriber.html
CHANGED
|
@@ -927,7 +927,7 @@ set, this will only remove one.</p>
|
|
|
927
927
|
</div>
|
|
928
928
|
|
|
929
929
|
<div id="footer">
|
|
930
|
-
Generated on Wed Jan 28 09:
|
|
930
|
+
Generated on Wed Jan 28 09:40:17 2015 by
|
|
931
931
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
932
932
|
0.8.7.6 (ruby-2.0.0).
|
|
933
933
|
</div>
|
data/doc/_index.html
CHANGED
|
@@ -91,6 +91,13 @@
|
|
|
91
91
|
|
|
92
92
|
</li>
|
|
93
93
|
|
|
94
|
+
<li>
|
|
95
|
+
<span class='object_link'><a href="EZMQ/Context.html" title="EZMQ::Context (class)">Context</a></span>
|
|
96
|
+
|
|
97
|
+
<small>(EZMQ)</small>
|
|
98
|
+
|
|
99
|
+
</li>
|
|
100
|
+
|
|
94
101
|
</ul>
|
|
95
102
|
</ul>
|
|
96
103
|
|
|
@@ -174,7 +181,7 @@
|
|
|
174
181
|
</div>
|
|
175
182
|
|
|
176
183
|
<div id="footer">
|
|
177
|
-
Generated on Wed Jan 28 09:
|
|
184
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
178
185
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
179
186
|
0.8.7.6 (ruby-2.0.0).
|
|
180
187
|
</div>
|
data/doc/class_list.html
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
<ul id="full_list" class="class">
|
|
52
52
|
<li><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></li>
|
|
53
|
-
<li><a class='toggle'></a> <span class='object_link'><a href="EZMQ.html" title="EZMQ (module)">EZMQ</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="EZMQ/Client.html" title="EZMQ::Client (class)">Client</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Publisher.html" title="EZMQ::Publisher (class)">Publisher</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Puller.html" title="EZMQ::Puller (class)">Puller</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Pusher.html" title="EZMQ::Pusher (class)">Pusher</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Server.html" title="EZMQ::Server (class)">Server</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Socket.html" title="EZMQ::Socket (class)">Socket</a></span> < Object<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Subscriber.html" title="EZMQ::Subscriber (class)">Subscriber</a></span> < Socket<small class='search_info'>EZMQ</small></li></ul>
|
|
53
|
+
<li><a class='toggle'></a> <span class='object_link'><a href="EZMQ.html" title="EZMQ (module)">EZMQ</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="EZMQ/Client.html" title="EZMQ::Client (class)">Client</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Context.html" title="EZMQ::Context (class)">Context</a></span> < Context<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Publisher.html" title="EZMQ::Publisher (class)">Publisher</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Puller.html" title="EZMQ::Puller (class)">Puller</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Pusher.html" title="EZMQ::Pusher (class)">Pusher</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Server.html" title="EZMQ::Server (class)">Server</a></span> < Socket<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Socket.html" title="EZMQ::Socket (class)">Socket</a></span> < Object<small class='search_info'>EZMQ</small></li><li><span class='object_link'><a href="EZMQ/Subscriber.html" title="EZMQ::Subscriber (class)">Subscriber</a></span> < Socket<small class='search_info'>EZMQ</small></li></ul>
|
|
54
54
|
|
|
55
55
|
</ul>
|
|
56
56
|
</div>
|
data/doc/file.README.html
CHANGED
|
@@ -230,7 +230,7 @@ sudo aptitude install libzmq3-dev
|
|
|
230
230
|
</div></div>
|
|
231
231
|
|
|
232
232
|
<div id="footer">
|
|
233
|
-
Generated on Wed Jan 28 09:
|
|
233
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
234
234
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
235
235
|
0.8.7.6 (ruby-2.0.0).
|
|
236
236
|
</div>
|
data/doc/index.html
CHANGED
|
@@ -230,7 +230,7 @@ sudo aptitude install libzmq3-dev
|
|
|
230
230
|
</div></div>
|
|
231
231
|
|
|
232
232
|
<div id="footer">
|
|
233
|
-
Generated on Wed Jan 28 09:
|
|
233
|
+
Generated on Wed Jan 28 09:40:16 2015 by
|
|
234
234
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
235
235
|
0.8.7.6 (ruby-2.0.0).
|
|
236
236
|
</div>
|
data/doc/method_list.html
CHANGED
|
@@ -82,20 +82,20 @@
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
<li class="r2 ">
|
|
85
|
-
<span class='object_link'><a href="EZMQ/
|
|
86
|
-
<small>EZMQ::
|
|
85
|
+
<span class='object_link'><a href="EZMQ/Pusher.html#initialize-instance_method" title="EZMQ::Pusher#initialize (method)">#initialize</a></span>
|
|
86
|
+
<small>EZMQ::Pusher</small>
|
|
87
87
|
</li>
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
<li class="r1 ">
|
|
91
|
-
<span class='object_link'><a href="EZMQ/
|
|
92
|
-
<small>EZMQ::
|
|
91
|
+
<span class='object_link'><a href="EZMQ/Context.html#initialize-instance_method" title="EZMQ::Context#initialize (method)">#initialize</a></span>
|
|
92
|
+
<small>EZMQ::Context</small>
|
|
93
93
|
</li>
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
<li class="r2 ">
|
|
97
|
-
<span class='object_link'><a href="EZMQ/
|
|
98
|
-
<small>EZMQ::
|
|
97
|
+
<span class='object_link'><a href="EZMQ/Publisher.html#initialize-instance_method" title="EZMQ::Publisher#initialize (method)">#initialize</a></span>
|
|
98
|
+
<small>EZMQ::Publisher</small>
|
|
99
99
|
</li>
|
|
100
100
|
|
|
101
101
|
|
|
@@ -106,26 +106,26 @@
|
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
<li class="r2 ">
|
|
109
|
-
<span class='object_link'><a href="EZMQ/
|
|
110
|
-
<small>EZMQ::
|
|
109
|
+
<span class='object_link'><a href="EZMQ/Subscriber.html#initialize-instance_method" title="EZMQ::Subscriber#initialize (method)">#initialize</a></span>
|
|
110
|
+
<small>EZMQ::Subscriber</small>
|
|
111
111
|
</li>
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
<li class="r1 ">
|
|
115
|
-
<span class='object_link'><a href="EZMQ/
|
|
116
|
-
<small>EZMQ::
|
|
115
|
+
<span class='object_link'><a href="EZMQ/Client.html#initialize-instance_method" title="EZMQ::Client#initialize (method)">#initialize</a></span>
|
|
116
|
+
<small>EZMQ::Client</small>
|
|
117
117
|
</li>
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
<li class="r2 ">
|
|
121
|
-
<span class='object_link'><a href="EZMQ/
|
|
122
|
-
<small>EZMQ::
|
|
121
|
+
<span class='object_link'><a href="EZMQ/Puller.html#initialize-instance_method" title="EZMQ::Puller#initialize (method)">#initialize</a></span>
|
|
122
|
+
<small>EZMQ::Puller</small>
|
|
123
123
|
</li>
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
<li class="r1 ">
|
|
127
|
-
<span class='object_link'><a href="EZMQ/
|
|
128
|
-
<small>EZMQ::
|
|
127
|
+
<span class='object_link'><a href="EZMQ/Server.html#initialize-instance_method" title="EZMQ::Server#initialize (method)">#initialize</a></span>
|
|
128
|
+
<small>EZMQ::Server</small>
|
|
129
129
|
</li>
|
|
130
130
|
|
|
131
131
|
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
<li class="r2 ">
|
|
145
|
-
<span class='object_link'><a href="EZMQ/Socket.html#
|
|
145
|
+
<span class='object_link'><a href="EZMQ/Socket.html#listen-instance_method" title="EZMQ::Socket#listen (method)">#listen</a></span>
|
|
146
146
|
<small>EZMQ::Socket</small>
|
|
147
147
|
</li>
|
|
148
148
|
|
|
@@ -154,14 +154,14 @@
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
<li class="r2 ">
|
|
157
|
-
<span class='object_link'><a href="EZMQ/
|
|
158
|
-
<small>EZMQ::
|
|
157
|
+
<span class='object_link'><a href="EZMQ/Socket.html#receive-instance_method" title="EZMQ::Socket#receive (method)">#receive</a></span>
|
|
158
|
+
<small>EZMQ::Socket</small>
|
|
159
159
|
</li>
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
<li class="r1 ">
|
|
163
|
-
<span class='object_link'><a href="EZMQ/
|
|
164
|
-
<small>EZMQ::
|
|
163
|
+
<span class='object_link'><a href="EZMQ/Client.html#request-instance_method" title="EZMQ::Client#request (method)">#request</a></span>
|
|
164
|
+
<small>EZMQ::Client</small>
|
|
165
165
|
</li>
|
|
166
166
|
|
|
167
167
|
|
|
@@ -172,18 +172,24 @@
|
|
|
172
172
|
|
|
173
173
|
|
|
174
174
|
<li class="r1 ">
|
|
175
|
+
<span class='object_link'><a href="EZMQ/Publisher.html#send-instance_method" title="EZMQ::Publisher#send (method)">#send</a></span>
|
|
176
|
+
<small>EZMQ::Publisher</small>
|
|
177
|
+
</li>
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
<li class="r2 ">
|
|
175
181
|
<span class='object_link'><a href="EZMQ/Socket.html#socket-instance_method" title="EZMQ::Socket#socket (method)">#socket</a></span>
|
|
176
182
|
<small>EZMQ::Socket</small>
|
|
177
183
|
</li>
|
|
178
184
|
|
|
179
185
|
|
|
180
|
-
<li class="
|
|
186
|
+
<li class="r1 ">
|
|
181
187
|
<span class='object_link'><a href="EZMQ/Subscriber.html#subscribe-instance_method" title="EZMQ::Subscriber#subscribe (method)">#subscribe</a></span>
|
|
182
188
|
<small>EZMQ::Subscriber</small>
|
|
183
189
|
</li>
|
|
184
190
|
|
|
185
191
|
|
|
186
|
-
<li class="
|
|
192
|
+
<li class="r2 ">
|
|
187
193
|
<span class='object_link'><a href="EZMQ/Subscriber.html#unsubscribe-instance_method" title="EZMQ::Subscriber#unsubscribe (method)">#unsubscribe</a></span>
|
|
188
194
|
<small>EZMQ::Subscriber</small>
|
|
189
195
|
</li>
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
105
|
<div id="footer">
|
|
106
|
-
Generated on Wed Jan 28 09:
|
|
106
|
+
Generated on Wed Jan 28 09:40:16 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.rb
CHANGED
data/lib/ezmq/socket.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require_relative 'context'
|
|
2
|
+
|
|
1
3
|
# Syntactic sugar for 0MQ, because Ruby shouldn't feel like C.
|
|
2
4
|
module EZMQ
|
|
3
5
|
# Wrapper class to simplify 0MQ sockets.
|
|
@@ -23,7 +25,7 @@ module EZMQ
|
|
|
23
25
|
#
|
|
24
26
|
def initialize(mode, type, **options)
|
|
25
27
|
fail ArgumentError unless %i(bind connect).include? mode
|
|
26
|
-
@context = options[:context] ||
|
|
28
|
+
@context = options[:context] || EZMQ::Context.new
|
|
27
29
|
@socket = @context.socket type
|
|
28
30
|
@encode = options[:encode] || -> m { m }
|
|
29
31
|
@decode = options[:decode] || -> m { m }
|