ezmq 0.3.6 → 0.3.7
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/Rakefile +31 -10
- data/doc/EZMQ.html +135 -3
- data/doc/EZMQ/Client.html +1 -1
- data/doc/EZMQ/Context.html +1 -1
- data/doc/EZMQ/Pair.html +279 -0
- data/doc/EZMQ/Publisher.html +1 -1
- data/doc/EZMQ/Puller.html +9 -6
- data/doc/EZMQ/Pusher.html +10 -6
- data/doc/EZMQ/Server.html +1 -1
- data/doc/EZMQ/Socket.html +4 -3
- 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 +36 -24
- data/doc/top-level-namespace.html +1 -1
- data/ezmq.gemspec +1 -1
- data/lib/ezmq.rb +1 -0
- data/lib/ezmq/pair.rb +39 -0
- data/lib/ezmq/pull.rb +3 -1
- data/lib/ezmq/push.rb +3 -1
- data/lib/ezmq/socket.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46b7285032dabec9656efcba1ef4605c6175c47a
|
4
|
+
data.tar.gz: bfd62eadbc82531ff1eedf8f8aa50501d69572ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 092728ae0b28bcdf69f9e5591a654414efda4012b985086201622f8e24d76c6e4a4c5d57a08a21572ee72e853ed9ed838e97529f8afcfcb90fbfbebf261131b8
|
7
|
+
data.tar.gz: 6786e5495ac80837a6cb996486370323030b81e21b5b6fe31c2fa47d42b741db8b0cf21f78716c18180bbb91b4c66801f5a751df8b84c04d18c49aef72999b04
|
data/Rakefile
CHANGED
@@ -1,28 +1,49 @@
|
|
1
1
|
# require 'simplecov'
|
2
2
|
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
require 'reek/rake/task'
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
require 'roodi_task'
|
7
|
+
|
3
8
|
task default: [:test]
|
4
9
|
|
5
|
-
task :
|
6
|
-
|
10
|
+
task test: [:rspec]
|
11
|
+
|
12
|
+
desc 'Run Test Suite with RSpec'
|
13
|
+
RSpec::Core::RakeTask.new(:rspec) do |task|
|
14
|
+
task.patterns = ['spec/**/*.rb']
|
15
|
+
task.fail_on_error = false
|
7
16
|
end
|
8
17
|
|
9
18
|
task audit: [:style, :complexity, :duplication, :design, :documentation]
|
10
19
|
|
11
|
-
task :
|
12
|
-
|
20
|
+
task style: [:rubocop]
|
21
|
+
|
22
|
+
desc 'Enforce Style Conformance with RuboCop'
|
23
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
24
|
+
task.patterns = ['lib/**/*.rb']
|
25
|
+
task.fail_on_error = false
|
13
26
|
end
|
14
27
|
|
15
|
-
task :
|
16
|
-
|
28
|
+
task complexity: [:flog]
|
29
|
+
|
30
|
+
desc 'Assess Complexity with Flog'
|
31
|
+
# FlogTask.new :flog, 9000, ['lib']
|
32
|
+
task :flog do
|
33
|
+
sh 'flog lib/**/*.rb'
|
17
34
|
end
|
18
35
|
|
19
|
-
task :
|
36
|
+
task duplication: [:flay]
|
37
|
+
|
38
|
+
task :flay do
|
20
39
|
sh 'flay'
|
21
40
|
end
|
22
41
|
|
23
|
-
task :
|
24
|
-
|
25
|
-
|
42
|
+
task design: [:roodi, :reek]
|
43
|
+
|
44
|
+
desc 'Find Code Smells with Reek'
|
45
|
+
Reek::Rake::Task.new(:reek) do |task|
|
46
|
+
task.fail_on_error = false
|
26
47
|
end
|
27
48
|
|
28
49
|
task :rework do
|
data/doc/EZMQ.html
CHANGED
@@ -80,7 +80,7 @@
|
|
80
80
|
|
81
81
|
<dt class="r1 last">Defined in:</dt>
|
82
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>
|
83
|
+
lib/ezmq/pair.rb,<br /> 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/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>
|
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/Pair.html" title="EZMQ::Pair (class)">Pair</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>
|
@@ -114,12 +114,144 @@
|
|
114
114
|
|
115
115
|
|
116
116
|
|
117
|
+
|
118
|
+
<h2>
|
119
|
+
Class Method Summary
|
120
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
121
|
+
</h2>
|
122
|
+
|
123
|
+
<ul class="summary">
|
124
|
+
|
125
|
+
<li class="public ">
|
126
|
+
<span class="summary_signature">
|
127
|
+
|
128
|
+
<a href="#create_linked_pair-class_method" title="create_linked_pair (class method)">+ (Array<EZMQ::Pair>) <strong>create_linked_pair</strong>(**options) </a>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
</span>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
117
140
|
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
143
|
+
<p>Returns a pair of EZMQ::Pair sockets connected to each other.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
</ul>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<div id="class_method_details" class="method_details_list">
|
155
|
+
<h2>Class Method Details</h2>
|
156
|
+
|
157
|
+
|
158
|
+
<div class="method_details first">
|
159
|
+
<h3 class="signature first" id="create_linked_pair-class_method">
|
160
|
+
|
161
|
+
+ (<tt>Array<<span class='object_link'><a href="EZMQ/Pair.html" title="EZMQ::Pair (class)">EZMQ::Pair</a></span>></tt>) <strong>create_linked_pair</strong>(**options)
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
</h3><div class="docstring">
|
168
|
+
<div class="discussion">
|
169
|
+
|
170
|
+
<p>Returns a pair of EZMQ::Pair sockets connected to each other.</p>
|
171
|
+
|
172
|
+
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
<div class="tags">
|
176
|
+
<p class="tag_title">Parameters:</p>
|
177
|
+
<ul class="param">
|
178
|
+
|
179
|
+
<li>
|
180
|
+
|
181
|
+
<span class='name'>options</span>
|
182
|
+
|
183
|
+
|
184
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
—
|
189
|
+
<div class='inline'>
|
190
|
+
<p>optional parameters.</p>
|
191
|
+
</div>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
</ul>
|
196
|
+
|
197
|
+
<p class="tag_title">Returns:</p>
|
198
|
+
<ul class="return">
|
199
|
+
|
200
|
+
<li>
|
201
|
+
|
202
|
+
|
203
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="EZMQ/Pair.html" title="EZMQ::Pair (class)">EZMQ::Pair</a></span>></tt>)</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</li>
|
208
|
+
|
209
|
+
</ul>
|
210
|
+
|
211
|
+
<p class="tag_title">See Also:</p>
|
212
|
+
<ul class="see">
|
213
|
+
|
214
|
+
<li><span class='object_link'><a href="EZMQ/Socket.html" title="EZMQ::Socket (class)">EZMQ::Socket for optional parameters.</a></span></li>
|
215
|
+
|
216
|
+
</ul>
|
217
|
+
|
218
|
+
</div><table class="source_code">
|
219
|
+
<tr>
|
220
|
+
<td>
|
221
|
+
<pre class="lines">
|
222
|
+
|
223
|
+
|
224
|
+
31
|
225
|
+
32
|
226
|
+
33
|
227
|
+
34
|
228
|
+
35
|
229
|
+
36
|
230
|
+
37
|
231
|
+
38</pre>
|
232
|
+
</td>
|
233
|
+
<td>
|
234
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/pair.rb', line 31</span>
|
235
|
+
|
236
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create_linked_pair'>create_linked_pair</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
237
|
+
<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>
|
238
|
+
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:protocol</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>inproc</span><span class='tstring_end'>'</span></span>
|
239
|
+
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:address</span><span class='rbracket'>]</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='period'>.</span><span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_address'>address</span>
|
240
|
+
<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_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_mode'>mode</span><span class='op'>|</span>
|
241
|
+
<span class='const'>EZMQ</span><span class='op'>::</span><span class='const'>Pair</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_mode'>mode</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
242
|
+
<span class='kw'>end</span>
|
243
|
+
<span class='kw'>end</span></pre>
|
244
|
+
</td>
|
245
|
+
</tr>
|
246
|
+
</table>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
</div>
|
118
250
|
|
119
251
|
</div>
|
120
252
|
|
121
253
|
<div id="footer">
|
122
|
-
Generated on
|
254
|
+
Generated on Mon Feb 2 15:37:51 2015 by
|
123
255
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
124
256
|
0.8.7.6 (ruby-2.0.0).
|
125
257
|
</div>
|
data/doc/EZMQ/Client.html
CHANGED
@@ -405,7 +405,7 @@
|
|
405
405
|
</div>
|
406
406
|
|
407
407
|
<div id="footer">
|
408
|
-
Generated on
|
408
|
+
Generated on Mon Feb 2 15:37:51 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/Context.html
CHANGED
@@ -217,7 +217,7 @@ protocol.</p>
|
|
217
217
|
</div>
|
218
218
|
|
219
219
|
<div id="footer">
|
220
|
-
Generated on
|
220
|
+
Generated on Mon Feb 2 15:37:51 2015 by
|
221
221
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
222
222
|
0.8.7.6 (ruby-2.0.0).
|
223
223
|
</div>
|
data/doc/EZMQ/Pair.html
ADDED
@@ -0,0 +1,279 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: EZMQ::Pair
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!EZMQ/Pair.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (P)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../EZMQ.html" title="EZMQ (module)">EZMQ</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Pair</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: EZMQ::Pair
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="Socket.html" title="EZMQ::Socket (class)">Socket</a></span></span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next"><span class='object_link'><a href="Socket.html" title="EZMQ::Socket (class)">Socket</a></span></li>
|
82
|
+
|
83
|
+
<li class="next">EZMQ::Pair</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/ezmq/pair.rb</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p>Pair sockets are meant to operate in pairs, as the name implies. They are</p>
|
108
|
+
|
109
|
+
<pre class="code ruby"><code class="ruby">bi-directional, with a one-to-one relationship between endpoints. Either
|
110
|
+
end can send or receive messages.</code></pre>
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
<div class="tags">
|
116
|
+
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<h2>Instance Attribute Summary</h2>
|
125
|
+
|
126
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Socket.html" title="EZMQ::Socket (class)">Socket</a></span></h3>
|
127
|
+
<p class="inherited"><span class='object_link'><a href="Socket.html#context-instance_method" title="EZMQ::Socket#context (method)">#context</a></span>, <span class='object_link'><a href="Socket.html#decode-instance_method" title="EZMQ::Socket#decode (method)">#decode</a></span>, <span class='object_link'><a href="Socket.html#encode-instance_method" title="EZMQ::Socket#encode (method)">#encode</a></span>, <span class='object_link'><a href="Socket.html#socket-instance_method" title="EZMQ::Socket#socket (method)">#socket</a></span></p>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<h2>
|
132
|
+
Instance Method Summary
|
133
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
134
|
+
</h2>
|
135
|
+
|
136
|
+
<ul class="summary">
|
137
|
+
|
138
|
+
<li class="public ">
|
139
|
+
<span class="summary_signature">
|
140
|
+
|
141
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Pair) <strong>initialize</strong>(mode, **options) </a>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</span>
|
146
|
+
|
147
|
+
|
148
|
+
<span class="note title constructor">constructor</span>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<span class="summary_desc"><div class='inline'>
|
158
|
+
<p>Creates a new Pair socket.</p>
|
159
|
+
</div></span>
|
160
|
+
|
161
|
+
</li>
|
162
|
+
|
163
|
+
|
164
|
+
</ul>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Socket.html" title="EZMQ::Socket (class)">Socket</a></span></h3>
|
177
|
+
<p class="inherited"><span class='object_link'><a href="Socket.html#connect-instance_method" title="EZMQ::Socket#connect (method)">#connect</a></span>, <span class='object_link'><a href="Socket.html#listen-instance_method" title="EZMQ::Socket#listen (method)">#listen</a></span>, <span class='object_link'><a href="Socket.html#receive-instance_method" title="EZMQ::Socket#receive (method)">#receive</a></span>, <span class='object_link'><a href="Socket.html#send-instance_method" title="EZMQ::Socket#send (method)">#send</a></span></p>
|
178
|
+
<div id="constructor_details" class="method_details_list">
|
179
|
+
<h2>Constructor Details</h2>
|
180
|
+
|
181
|
+
<div class="method_details first">
|
182
|
+
<h3 class="signature first" id="initialize-instance_method">
|
183
|
+
|
184
|
+
- (<tt><span class='object_link'><a href="" title="EZMQ::Pair (class)">Pair</a></span></tt>) <strong>initialize</strong>(mode, **options)
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
</h3><div class="docstring">
|
191
|
+
<div class="discussion">
|
192
|
+
|
193
|
+
<p>Creates a new Pair socket.</p>
|
194
|
+
|
195
|
+
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
<div class="tags">
|
199
|
+
<p class="tag_title">Parameters:</p>
|
200
|
+
<ul class="param">
|
201
|
+
|
202
|
+
<li>
|
203
|
+
|
204
|
+
<span class='name'>mode</span>
|
205
|
+
|
206
|
+
|
207
|
+
<span class='type'>(<tt>:bind</tt>, <tt>:connect</tt>)</span>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
—
|
212
|
+
<div class='inline'>
|
213
|
+
<p>a mode for the socket.</p>
|
214
|
+
</div>
|
215
|
+
|
216
|
+
</li>
|
217
|
+
|
218
|
+
<li>
|
219
|
+
|
220
|
+
<span class='name'>options</span>
|
221
|
+
|
222
|
+
|
223
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
—
|
228
|
+
<div class='inline'>
|
229
|
+
<p>optional parameters.</p>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
</li>
|
233
|
+
|
234
|
+
</ul>
|
235
|
+
|
236
|
+
|
237
|
+
<p class="tag_title">See Also:</p>
|
238
|
+
<ul class="see">
|
239
|
+
|
240
|
+
<li><span class='object_link'><a href="Socket.html" title="EZMQ::Socket (class)">EZMQ::Socket for optional parameters.</a></span></li>
|
241
|
+
|
242
|
+
</ul>
|
243
|
+
|
244
|
+
</div><table class="source_code">
|
245
|
+
<tr>
|
246
|
+
<td>
|
247
|
+
<pre class="lines">
|
248
|
+
|
249
|
+
|
250
|
+
18
|
251
|
+
19
|
252
|
+
20
|
253
|
+
21</pre>
|
254
|
+
</td>
|
255
|
+
<td>
|
256
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/pair.rb', line 18</span>
|
257
|
+
|
258
|
+
<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='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
259
|
+
<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>
|
260
|
+
<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'>PAIR</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
261
|
+
<span class='kw'>end</span></pre>
|
262
|
+
</td>
|
263
|
+
</tr>
|
264
|
+
</table>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
</div>
|
268
|
+
|
269
|
+
|
270
|
+
</div>
|
271
|
+
|
272
|
+
<div id="footer">
|
273
|
+
Generated on Mon Feb 2 15:37:51 2015 by
|
274
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
275
|
+
0.8.7.6 (ruby-2.0.0).
|
276
|
+
</div>
|
277
|
+
|
278
|
+
</body>
|
279
|
+
</html>
|
data/doc/EZMQ/Publisher.html
CHANGED
@@ -420,7 +420,7 @@
|
|
420
420
|
</div>
|
421
421
|
|
422
422
|
<div id="footer">
|
423
|
-
Generated on
|
423
|
+
Generated on Mon Feb 2 15:37:51 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
@@ -104,7 +104,10 @@
|
|
104
104
|
<h2>Overview</h2><div class="docstring">
|
105
105
|
<div class="discussion">
|
106
106
|
|
107
|
-
<p>Pull socket that receives messages but does not send them
|
107
|
+
<p>Pull socket that receives messages but does not send them. Pullers can</p>
|
108
|
+
|
109
|
+
<pre class="code ruby"><code class="ruby">connect to multiple Pushers, and will fair-queue messages from available
|
110
|
+
sources.</code></pre>
|
108
111
|
|
109
112
|
|
110
113
|
</div>
|
@@ -246,12 +249,12 @@
|
|
246
249
|
<pre class="lines">
|
247
250
|
|
248
251
|
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
+
17
|
253
|
+
18
|
254
|
+
19</pre>
|
252
255
|
</td>
|
253
256
|
<td>
|
254
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/pull.rb', line
|
257
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/pull.rb', line 17</span>
|
255
258
|
|
256
259
|
<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>
|
257
260
|
<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'>PULL</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
@@ -267,7 +270,7 @@
|
|
267
270
|
</div>
|
268
271
|
|
269
272
|
<div id="footer">
|
270
|
-
Generated on
|
273
|
+
Generated on Mon Feb 2 15:37:51 2015 by
|
271
274
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
272
275
|
0.8.7.6 (ruby-2.0.0).
|
273
276
|
</div>
|
data/doc/EZMQ/Pusher.html
CHANGED
@@ -104,7 +104,11 @@
|
|
104
104
|
<h2>Overview</h2><div class="docstring">
|
105
105
|
<div class="discussion">
|
106
106
|
|
107
|
-
<p>Push socket that sends messages but does not receive them
|
107
|
+
<p>Push socket that sends messages but does not receive them. It can connect
|
108
|
+
to</p>
|
109
|
+
|
110
|
+
<pre class="code ruby"><code class="ruby">multiple Pull sockets, and will load-balance requests to available
|
111
|
+
destinations.</code></pre>
|
108
112
|
|
109
113
|
|
110
114
|
</div>
|
@@ -246,12 +250,12 @@
|
|
246
250
|
<pre class="lines">
|
247
251
|
|
248
252
|
|
249
|
-
|
250
|
-
|
251
|
-
|
253
|
+
17
|
254
|
+
18
|
255
|
+
19</pre>
|
252
256
|
</td>
|
253
257
|
<td>
|
254
|
-
<pre class="code"><span class="info file"># File 'lib/ezmq/push.rb', line
|
258
|
+
<pre class="code"><span class="info file"># File 'lib/ezmq/push.rb', line 17</span>
|
255
259
|
|
256
260
|
<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>
|
257
261
|
<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'>PUSH</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
@@ -267,7 +271,7 @@
|
|
267
271
|
</div>
|
268
272
|
|
269
273
|
<div id="footer">
|
270
|
-
Generated on
|
274
|
+
Generated on Mon Feb 2 15:37:51 2015 by
|
271
275
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
272
276
|
0.8.7.6 (ruby-2.0.0).
|
273
277
|
</div>
|
data/doc/EZMQ/Server.html
CHANGED
@@ -390,7 +390,7 @@
|
|
390
390
|
</div>
|
391
391
|
|
392
392
|
<div id="footer">
|
393
|
-
Generated on
|
393
|
+
Generated on Mon Feb 2 15:37:51 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
@@ -112,7 +112,7 @@
|
|
112
112
|
|
113
113
|
</div><div id="subclasses">
|
114
114
|
<h2>Direct Known Subclasses</h2>
|
115
|
-
<p class="children"><span class='object_link'><a href="Client.html" title="EZMQ::Client (class)">Client</a></span>, <span class='object_link'><a href="Publisher.html" title="EZMQ::Publisher (class)">Publisher</a></span>, <span class='object_link'><a href="Puller.html" title="EZMQ::Puller (class)">Puller</a></span>, <span class='object_link'><a href="Pusher.html" title="EZMQ::Pusher (class)">Pusher</a></span>, <span class='object_link'><a href="Server.html" title="EZMQ::Server (class)">Server</a></span>, <span class='object_link'><a href="Subscriber.html" title="EZMQ::Subscriber (class)">Subscriber</a></span></p>
|
115
|
+
<p class="children"><span class='object_link'><a href="Client.html" title="EZMQ::Client (class)">Client</a></span>, <span class='object_link'><a href="Pair.html" title="EZMQ::Pair (class)">Pair</a></span>, <span class='object_link'><a href="Publisher.html" title="EZMQ::Publisher (class)">Publisher</a></span>, <span class='object_link'><a href="Puller.html" title="EZMQ::Puller (class)">Puller</a></span>, <span class='object_link'><a href="Pusher.html" title="EZMQ::Pusher (class)">Pusher</a></span>, <span class='object_link'><a href="Server.html" title="EZMQ::Server (class)">Server</a></span>, <span class='object_link'><a href="Subscriber.html" title="EZMQ::Subscriber (class)">Subscriber</a></span></p>
|
116
116
|
</div>
|
117
117
|
|
118
118
|
|
@@ -387,7 +387,8 @@
|
|
387
387
|
<div class="note notetag">
|
388
388
|
<strong>Note:</strong>
|
389
389
|
<div class='inline'>
|
390
|
-
<p>port is ignored unless protocol is
|
390
|
+
<p>port is ignored unless protocol is one of 'tcp', 'pgm' or
|
391
|
+
'epgm'.</p>
|
391
392
|
</div>
|
392
393
|
</div>
|
393
394
|
|
@@ -1301,7 +1302,7 @@ address instead.</p>
|
|
1301
1302
|
</div>
|
1302
1303
|
|
1303
1304
|
<div id="footer">
|
1304
|
-
Generated on
|
1305
|
+
Generated on Mon Feb 2 15:37:51 2015 by
|
1305
1306
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1306
1307
|
0.8.7.6 (ruby-2.0.0).
|
1307
1308
|
</div>
|
data/doc/EZMQ/Subscriber.html
CHANGED
@@ -847,7 +847,7 @@ set, this will only remove one.</p>
|
|
847
847
|
</div>
|
848
848
|
|
849
849
|
<div id="footer">
|
850
|
-
Generated on
|
850
|
+
Generated on Mon Feb 2 15:37:52 2015 by
|
851
851
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
852
852
|
0.8.7.6 (ruby-2.0.0).
|
853
853
|
</div>
|
data/doc/_index.html
CHANGED
@@ -119,6 +119,13 @@
|
|
119
119
|
<li class="letter">P</li>
|
120
120
|
<ul>
|
121
121
|
|
122
|
+
<li>
|
123
|
+
<span class='object_link'><a href="EZMQ/Pair.html" title="EZMQ::Pair (class)">Pair</a></span>
|
124
|
+
|
125
|
+
<small>(EZMQ)</small>
|
126
|
+
|
127
|
+
</li>
|
128
|
+
|
122
129
|
<li>
|
123
130
|
<span class='object_link'><a href="EZMQ/Publisher.html" title="EZMQ::Publisher (class)">Publisher</a></span>
|
124
131
|
|
@@ -181,7 +188,7 @@
|
|
181
188
|
</div>
|
182
189
|
|
183
190
|
<div id="footer">
|
184
|
-
Generated on
|
191
|
+
Generated on Mon Feb 2 15:37:50 2015 by
|
185
192
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
186
193
|
0.8.7.6 (ruby-2.0.0).
|
187
194
|
</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/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>
|
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/Pair.html" title="EZMQ::Pair (class)">Pair</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>
|
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
|
233
|
+
Generated on Mon Feb 2 15:37:50 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
|
233
|
+
Generated on Mon Feb 2 15:37:50 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
@@ -64,23 +64,35 @@
|
|
64
64
|
|
65
65
|
|
66
66
|
<li class="r1 ">
|
67
|
+
<span class='object_link'><a href="EZMQ.html#create_linked_pair-class_method" title="EZMQ.create_linked_pair (method)">create_linked_pair</a></span>
|
68
|
+
<small>EZMQ</small>
|
69
|
+
</li>
|
70
|
+
|
71
|
+
|
72
|
+
<li class="r2 ">
|
67
73
|
<span class='object_link'><a href="EZMQ/Socket.html#decode-instance_method" title="EZMQ::Socket#decode (method)">#decode</a></span>
|
68
74
|
<small>EZMQ::Socket</small>
|
69
75
|
</li>
|
70
76
|
|
71
77
|
|
72
|
-
<li class="
|
78
|
+
<li class="r1 ">
|
73
79
|
<span class='object_link'><a href="EZMQ/Socket.html#encode-instance_method" title="EZMQ::Socket#encode (method)">#encode</a></span>
|
74
80
|
<small>EZMQ::Socket</small>
|
75
81
|
</li>
|
76
82
|
|
77
83
|
|
78
|
-
<li class="
|
84
|
+
<li class="r2 ">
|
79
85
|
<span class='object_link'><a href="EZMQ/Pusher.html#initialize-instance_method" title="EZMQ::Pusher#initialize (method)">#initialize</a></span>
|
80
86
|
<small>EZMQ::Pusher</small>
|
81
87
|
</li>
|
82
88
|
|
83
89
|
|
90
|
+
<li class="r1 ">
|
91
|
+
<span class='object_link'><a href="EZMQ/Server.html#initialize-instance_method" title="EZMQ::Server#initialize (method)">#initialize</a></span>
|
92
|
+
<small>EZMQ::Server</small>
|
93
|
+
</li>
|
94
|
+
|
95
|
+
|
84
96
|
<li class="r2 ">
|
85
97
|
<span class='object_link'><a href="EZMQ/Client.html#initialize-instance_method" title="EZMQ::Client#initialize (method)">#initialize</a></span>
|
86
98
|
<small>EZMQ::Client</small>
|
@@ -88,14 +100,14 @@
|
|
88
100
|
|
89
101
|
|
90
102
|
<li class="r1 ">
|
91
|
-
<span class='object_link'><a href="EZMQ/
|
92
|
-
<small>EZMQ::
|
103
|
+
<span class='object_link'><a href="EZMQ/Puller.html#initialize-instance_method" title="EZMQ::Puller#initialize (method)">#initialize</a></span>
|
104
|
+
<small>EZMQ::Puller</small>
|
93
105
|
</li>
|
94
106
|
|
95
107
|
|
96
108
|
<li class="r2 ">
|
97
|
-
<span class='object_link'><a href="EZMQ/
|
98
|
-
<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>
|
99
111
|
</li>
|
100
112
|
|
101
113
|
|
@@ -106,26 +118,26 @@
|
|
106
118
|
|
107
119
|
|
108
120
|
<li class="r2 ">
|
109
|
-
<span class='object_link'><a href="EZMQ/
|
110
|
-
<small>EZMQ::
|
121
|
+
<span class='object_link'><a href="EZMQ/Publisher.html#initialize-instance_method" title="EZMQ::Publisher#initialize (method)">#initialize</a></span>
|
122
|
+
<small>EZMQ::Publisher</small>
|
111
123
|
</li>
|
112
124
|
|
113
125
|
|
114
126
|
<li class="r1 ">
|
115
|
-
<span class='object_link'><a href="EZMQ/
|
116
|
-
<small>EZMQ::
|
127
|
+
<span class='object_link'><a href="EZMQ/Pair.html#initialize-instance_method" title="EZMQ::Pair#initialize (method)">#initialize</a></span>
|
128
|
+
<small>EZMQ::Pair</small>
|
117
129
|
</li>
|
118
130
|
|
119
131
|
|
120
132
|
<li class="r2 ">
|
121
|
-
<span class='object_link'><a href="EZMQ/
|
122
|
-
<small>EZMQ::
|
133
|
+
<span class='object_link'><a href="EZMQ/Context.html#initialize-instance_method" title="EZMQ::Context#initialize (method)">#initialize</a></span>
|
134
|
+
<small>EZMQ::Context</small>
|
123
135
|
</li>
|
124
136
|
|
125
137
|
|
126
138
|
<li class="r1 ">
|
127
|
-
<span class='object_link'><a href="EZMQ/
|
128
|
-
<small>EZMQ::
|
139
|
+
<span class='object_link'><a href="EZMQ/Socket.html#listen-instance_method" title="EZMQ::Socket#listen (method)">#listen</a></span>
|
140
|
+
<small>EZMQ::Socket</small>
|
129
141
|
</li>
|
130
142
|
|
131
143
|
|
@@ -136,20 +148,20 @@
|
|
136
148
|
|
137
149
|
|
138
150
|
<li class="r1 ">
|
139
|
-
<span class='object_link'><a href="EZMQ/
|
140
|
-
<small>EZMQ::
|
151
|
+
<span class='object_link'><a href="EZMQ/Server.html#listen-instance_method" title="EZMQ::Server#listen (method)">#listen</a></span>
|
152
|
+
<small>EZMQ::Server</small>
|
141
153
|
</li>
|
142
154
|
|
143
155
|
|
144
156
|
<li class="r2 ">
|
145
|
-
<span class='object_link'><a href="EZMQ/
|
146
|
-
<small>EZMQ::
|
157
|
+
<span class='object_link'><a href="EZMQ/Subscriber.html#receive-instance_method" title="EZMQ::Subscriber#receive (method)">#receive</a></span>
|
158
|
+
<small>EZMQ::Subscriber</small>
|
147
159
|
</li>
|
148
160
|
|
149
161
|
|
150
162
|
<li class="r1 ">
|
151
|
-
<span class='object_link'><a href="EZMQ/
|
152
|
-
<small>EZMQ::
|
163
|
+
<span class='object_link'><a href="EZMQ/Socket.html#receive-instance_method" title="EZMQ::Socket#receive (method)">#receive</a></span>
|
164
|
+
<small>EZMQ::Socket</small>
|
153
165
|
</li>
|
154
166
|
|
155
167
|
|
@@ -160,14 +172,14 @@
|
|
160
172
|
|
161
173
|
|
162
174
|
<li class="r1 ">
|
163
|
-
<span class='object_link'><a href="EZMQ/
|
164
|
-
<small>EZMQ::
|
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>
|
165
177
|
</li>
|
166
178
|
|
167
179
|
|
168
180
|
<li class="r2 ">
|
169
|
-
<span class='object_link'><a href="EZMQ/
|
170
|
-
<small>EZMQ::
|
181
|
+
<span class='object_link'><a href="EZMQ/Socket.html#send-instance_method" title="EZMQ::Socket#send (method)">#send</a></span>
|
182
|
+
<small>EZMQ::Socket</small>
|
171
183
|
</li>
|
172
184
|
|
173
185
|
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Mon Feb 2 15:37:50 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/pair.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require_relative 'context'
|
2
|
+
require_relative 'socket'
|
3
|
+
|
4
|
+
# Syntactic sugar for 0MQ, because Ruby shouldn't feel like C.
|
5
|
+
module EZMQ
|
6
|
+
# Pair sockets are meant to operate in pairs, as the name implies. They are
|
7
|
+
# bi-directional, with a one-to-one relationship between endpoints. Either
|
8
|
+
# end can send or receive messages.
|
9
|
+
class Pair < EZMQ::Socket
|
10
|
+
# Creates a new Pair socket.
|
11
|
+
#
|
12
|
+
# @param [:bind, :connect] mode a mode for the socket.
|
13
|
+
# @param [Hash] options optional parameters.
|
14
|
+
# @see EZMQ::Socket EZMQ::Socket for optional parameters.
|
15
|
+
#
|
16
|
+
# @return [Pair] a new instance of Pair.
|
17
|
+
#
|
18
|
+
def initialize(mode, **options)
|
19
|
+
fail ArgumentError unless %i(bind connect).include? mode
|
20
|
+
super mode, ZMQ::PAIR, options
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Returns a pair of EZMQ::Pair sockets connected to each other.
|
25
|
+
#
|
26
|
+
# @param [Hash] options optional parameters.
|
27
|
+
# @see EZMQ::Socket EZMQ::Socket for optional parameters.
|
28
|
+
#
|
29
|
+
# @return [Array<EZMQ::Pair>]
|
30
|
+
#
|
31
|
+
def self.create_linked_pair(**options)
|
32
|
+
options[:context] ||= EZMQ::Context.new
|
33
|
+
options[:protocol] ||= 'inproc'
|
34
|
+
options[:address] ||= options[:context].context.address
|
35
|
+
%i(bind connect).map do |mode|
|
36
|
+
EZMQ::Pair.new mode, options
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/ezmq/pull.rb
CHANGED
@@ -2,7 +2,9 @@ require_relative 'socket'
|
|
2
2
|
|
3
3
|
# Syntactic sugar for 0MQ, because Ruby shouldn't feel like C.
|
4
4
|
module EZMQ
|
5
|
-
# Pull socket that receives messages but does not send them.
|
5
|
+
# Pull socket that receives messages but does not send them. Pullers can
|
6
|
+
# connect to multiple Pushers, and will fair-queue messages from available
|
7
|
+
# sources.
|
6
8
|
class Puller < EZMQ::Socket
|
7
9
|
# Creates a new Puller socket.
|
8
10
|
#
|
data/lib/ezmq/push.rb
CHANGED
@@ -2,7 +2,9 @@ require_relative 'socket'
|
|
2
2
|
|
3
3
|
# Syntactic sugar for 0MQ, because Ruby shouldn't feel like C.
|
4
4
|
module EZMQ
|
5
|
-
# Push socket that sends messages but does not receive them.
|
5
|
+
# Push socket that sends messages but does not receive them. It can connect to
|
6
|
+
# multiple Pull sockets, and will load-balance requests to available
|
7
|
+
# destinations.
|
6
8
|
class Pusher < EZMQ::Socket
|
7
9
|
# Creates a new Pusher socket.
|
8
10
|
#
|
data/lib/ezmq/socket.rb
CHANGED
@@ -19,7 +19,7 @@ module EZMQ
|
|
19
19
|
# @option options [String] protocol ('tcp') protocol for transport.
|
20
20
|
# @option options [String] address ('127.0.0.1') address for endpoint.
|
21
21
|
# @option options [Fixnum] port (5555) port for endpoint.
|
22
|
-
# @note port is ignored unless protocol is
|
22
|
+
# @note port is ignored unless protocol is one of 'tcp', 'pgm' or 'epgm'.
|
23
23
|
#
|
24
24
|
# @return [Socket] a new instance of Socket.
|
25
25
|
#
|
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.3.
|
4
|
+
version: 0.3.7
|
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-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi-rzmq
|
@@ -166,6 +166,7 @@ files:
|
|
166
166
|
- doc/EZMQ.html
|
167
167
|
- doc/EZMQ/Client.html
|
168
168
|
- doc/EZMQ/Context.html
|
169
|
+
- doc/EZMQ/Pair.html
|
169
170
|
- doc/EZMQ/Publisher.html
|
170
171
|
- doc/EZMQ/Puller.html
|
171
172
|
- doc/EZMQ/Pusher.html
|
@@ -189,6 +190,7 @@ files:
|
|
189
190
|
- ezmq.gemspec
|
190
191
|
- lib/ezmq.rb
|
191
192
|
- lib/ezmq/context.rb
|
193
|
+
- lib/ezmq/pair.rb
|
192
194
|
- lib/ezmq/publish.rb
|
193
195
|
- lib/ezmq/pull.rb
|
194
196
|
- lib/ezmq/push.rb
|