ionian 0.6.1 → 0.6.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/Ionian/Extension/IO.html +1 -1
- data/doc/Ionian/Extension/Socket.html +1 -1
- data/doc/Ionian/Extension.html +1 -1
- data/doc/Ionian/Server.html +46 -7
- data/doc/Ionian/Socket.html +1 -1
- data/doc/Ionian.html +1 -1
- data/doc/created.rid +2 -2
- data/doc/index.html +1 -1
- data/doc/js/search_index.js +1 -1
- data/doc/table_of_contents.html +17 -12
- data/lib/ionian/server.rb +8 -0
- 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: 2c7b4d5f4fb4ff7174af237621df9f0c12c3b17e
|
4
|
+
data.tar.gz: 44c91a89ce08e4892c1e7c9f69380eb2ded9e468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37cb5dd9b49bd082cf1d41b982c8e97e2d7a0bf1e1019b80dce297cfdd455611443fa715eec3dddcef2e396d9545e89a1d88fc5aec4589cce71dabbdbf33051d
|
7
|
+
data.tar.gz: 7ce04147959ffa29e42a152d066599f163577ab077c4176dcf61540eefb5d98f34fe1cbb0e49087efe70022d2b3c185b87dad0fb23a7d8b938861f562355aaa9
|
@@ -673,7 +673,7 @@ be used if <a href="IO.html#method-i-read_match">read_match</a> is used.</p>
|
|
673
673
|
|
674
674
|
<footer id="validator-badges" role="contentinfo">
|
675
675
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
676
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.
|
676
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
677
677
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
678
678
|
</footer>
|
679
679
|
|
@@ -1404,7 +1404,7 @@ IP_MULTICAST_TTL )</p>
|
|
1404
1404
|
|
1405
1405
|
<footer id="validator-badges" role="contentinfo">
|
1406
1406
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
1407
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.
|
1407
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
1408
1408
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
1409
1409
|
</footer>
|
1410
1410
|
|
data/doc/Ionian/Extension.html
CHANGED
@@ -94,7 +94,7 @@
|
|
94
94
|
|
95
95
|
<footer id="validator-badges" role="contentinfo">
|
96
96
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
97
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.
|
97
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
98
98
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
99
99
|
</footer>
|
100
100
|
|
data/doc/Ionian/Server.html
CHANGED
@@ -77,6 +77,8 @@
|
|
77
77
|
|
78
78
|
<li ><a href="#method-i-close">#close</a>
|
79
79
|
|
80
|
+
<li ><a href="#method-i-closed-3F">#closed?</a>
|
81
|
+
|
80
82
|
<li ><a href="#method-i-listen">#listen</a>
|
81
83
|
|
82
84
|
<li ><a href="#method-i-on_accept">#on_accept</a>
|
@@ -138,7 +140,9 @@
|
|
138
140
|
server).</p>
|
139
141
|
|
140
142
|
<p>Accepts an optional block that is passed to <a
|
141
|
-
href="Server.html#method-i-register_accept_listener">register_accept_listener</a
|
143
|
+
href="Server.html#method-i-register_accept_listener">register_accept_listener</a>.
|
144
|
+
<a href="Server.html">Server</a> opens listening socket on instantiation if
|
145
|
+
this block is provided.</p>
|
142
146
|
|
143
147
|
<p>Args:</p>
|
144
148
|
|
@@ -150,7 +154,7 @@ protocol: :tcp, :unix. Default is :tcp.</pre>
|
|
150
154
|
|
151
155
|
|
152
156
|
<div class="method-source-code" id="new-source">
|
153
|
-
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line
|
157
|
+
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line 19</span>
|
154
158
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-operator">**</span><span class="ruby-identifier">kwargs</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
155
159
|
<span class="ruby-ivar">@accept_listeners</span> = []
|
156
160
|
<span class="ruby-identifier">register_accept_listener</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
|
@@ -177,6 +181,8 @@ protocol: :tcp, :unix. Default is :tcp.</pre>
|
|
177
181
|
<span class="ruby-keyword">when</span> <span class="ruby-value">:unix</span>
|
178
182
|
<span class="ruby-ivar">@server</span> = <span class="ruby-constant">UNIXServer</span>.<span class="ruby-identifier">new</span> <span class="ruby-ivar">@interface</span>
|
179
183
|
<span class="ruby-keyword">end</span>
|
184
|
+
|
185
|
+
<span class="ruby-identifier">listen</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
|
180
186
|
<span class="ruby-keyword">end</span></pre>
|
181
187
|
</div>
|
182
188
|
|
@@ -215,7 +221,7 @@ protocol: :tcp, :unix. Default is :tcp.</pre>
|
|
215
221
|
|
216
222
|
|
217
223
|
<div class="method-source-code" id="close-source">
|
218
|
-
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line
|
224
|
+
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line 74</span>
|
219
225
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">close</span>
|
220
226
|
<span class="ruby-ivar">@server</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@server</span>
|
221
227
|
<span class="ruby-ivar">@accept_thread</span>.<span class="ruby-identifier">join</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@accept_thread</span>
|
@@ -228,6 +234,39 @@ protocol: :tcp, :unix. Default is :tcp.</pre>
|
|
228
234
|
|
229
235
|
|
230
236
|
|
237
|
+
</div>
|
238
|
+
|
239
|
+
|
240
|
+
<div id="method-i-closed-3F" class="method-detail ">
|
241
|
+
|
242
|
+
<div class="method-heading">
|
243
|
+
<span class="method-name">closed?</span><span
|
244
|
+
class="method-args">()</span>
|
245
|
+
|
246
|
+
<span class="method-click-advice">click to toggle source</span>
|
247
|
+
|
248
|
+
</div>
|
249
|
+
|
250
|
+
|
251
|
+
<div class="method-description">
|
252
|
+
|
253
|
+
<p>Returns true if the server listener socket is closed.</p>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
<div class="method-source-code" id="closed-3F-source">
|
259
|
+
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line 81</span>
|
260
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">closed?</span>
|
261
|
+
<span class="ruby-ivar">@server</span>.<span class="ruby-identifier">closed?</span>
|
262
|
+
<span class="ruby-keyword">end</span></pre>
|
263
|
+
</div>
|
264
|
+
|
265
|
+
</div>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
231
270
|
</div>
|
232
271
|
|
233
272
|
|
@@ -253,7 +292,7 @@ will be run when a connection is accepted.</p>
|
|
253
292
|
|
254
293
|
|
255
294
|
<div class="method-source-code" id="listen-source">
|
256
|
-
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line
|
295
|
+
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line 52</span>
|
257
296
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">listen</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
258
297
|
<span class="ruby-identifier">register_accept_listener</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
|
259
298
|
|
@@ -332,7 +371,7 @@ connected client is passed to the block as an Ionain::Client.</p>
|
|
332
371
|
|
333
372
|
|
334
373
|
<div class="method-source-code" id="register_accept_listener-source">
|
335
|
-
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line
|
374
|
+
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line 87</span>
|
336
375
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_accept_listener</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
337
376
|
<span class="ruby-ivar">@accept_listeners</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">block</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@accept_listeners</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">block</span>
|
338
377
|
<span class="ruby-identifier">block</span>
|
@@ -370,7 +409,7 @@ connected client is passed to the block as an Ionain::Client.</p>
|
|
370
409
|
|
371
410
|
|
372
411
|
<div class="method-source-code" id="unregister_accept_listener-source">
|
373
|
-
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line
|
412
|
+
<pre><span class="ruby-comment"># File lib/ionian/server.rb, line 95</span>
|
374
413
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">unregister_accept_listener</span> <span class="ruby-identifier">proc</span>
|
375
414
|
<span class="ruby-ivar">@accept_listeners</span>.<span class="ruby-identifier">delete_if</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">proc</span>}
|
376
415
|
<span class="ruby-identifier">proc</span>
|
@@ -393,7 +432,7 @@ connected client is passed to the block as an Ionain::Client.</p>
|
|
393
432
|
|
394
433
|
<footer id="validator-badges" role="contentinfo">
|
395
434
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
396
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.
|
435
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
397
436
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
398
437
|
</footer>
|
399
438
|
|
data/doc/Ionian/Socket.html
CHANGED
@@ -739,7 +739,7 @@ reference to the given block. block = ionian_socket.register_observer {…}</p>
|
|
739
739
|
|
740
740
|
<footer id="validator-badges" role="contentinfo">
|
741
741
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
742
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.
|
742
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
743
743
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
744
744
|
</footer>
|
745
745
|
|
data/doc/Ionian.html
CHANGED
@@ -96,7 +96,7 @@ Features regular expression matching and notification of received data.</p>
|
|
96
96
|
|
97
97
|
<footer id="validator-badges" role="contentinfo">
|
98
98
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
99
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.
|
99
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
100
100
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
101
101
|
</footer>
|
102
102
|
|
data/doc/created.rid
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
Sun, 26 Jan 2014 13:05:49 -0800
|
2
2
|
lib/ionian.rb Mon, 20 Jan 2014 16:23:59 -0800
|
3
3
|
lib/ionian/extension/io.rb Fri, 24 Jan 2014 15:44:42 -0800
|
4
4
|
lib/ionian/extension/socket.rb Fri, 24 Jan 2014 22:04:33 -0800
|
5
|
-
lib/ionian/server.rb
|
5
|
+
lib/ionian/server.rb Sun, 26 Jan 2014 12:56:50 -0800
|
6
6
|
lib/ionian/socket.rb Fri, 24 Jan 2014 22:03:54 -0800
|
data/doc/index.html
CHANGED
@@ -87,7 +87,7 @@
|
|
87
87
|
|
88
88
|
<footer id="validator-badges" role="contentinfo">
|
89
89
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
90
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.
|
90
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
91
91
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
92
92
|
</footer>
|
93
93
|
|
data/doc/js/search_index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var search_data = {"index":{"searchIndex":["ionian","extension","io","socket","server","socket","<<()","close()","closed?()","cmd()","cork()","cork=()","cork?()","expression()","expression=()","extended()","extended()","flush()","has_data?()","has_data?()","initialize_ionian()","initialize_ionian_socket()","ip_add_membership()","ip_drop_membership()","ip_multicast_if()","ip_multicast_if=()","ip_multicast_loop()","ip_multicast_loop=()","ip_multicast_loop?()","ip_multicast_ttl()","ip_multicast_ttl=()","ipv6_add_membership()","ipv6_drop_membership()","ipv6_multicast_hops()","ipv6_multicast_hops=()","ipv6_multicast_if()","ipv6_multicast_if=()","ipv6_multicast_loop()","ipv6_multicast_loop=()","ipv6_multicast_loop?()","listen()","multicast()","multicast?()","new()","new()","no_delay()","no_delay=()","no_delay?()","on_accept()","on_match()","on_match()","persistent?()","purge()","puts()","read_all()","read_match()","recork()","register_accept_listener()","register_observer()","register_observer()","reuse_addr()","reuse_addr=()","reuse_addr?()","run_match()","ttl()","ttl=()","ttl?()","unregister_accept_listener()","unregister_observer()","unregister_observer()","write()"],"longSearchIndex":["ionian","ionian::extension","ionian::extension::io","ionian::extension::socket","ionian::server","ionian::socket","ionian::socket#<<()","ionian::server#close()","ionian::socket#closed?()","ionian::socket#cmd()","ionian::extension::socket#cork()","ionian::extension::socket#cork=()","ionian::extension::socket#cork?()","ionian::extension::io#expression()","ionian::extension::io#expression=()","ionian::extension::io::extended()","ionian::extension::socket::extended()","ionian::socket#flush()","ionian::extension::io#has_data?()","ionian::socket#has_data?()","ionian::extension::io#initialize_ionian()","ionian::extension::socket#initialize_ionian_socket()","ionian::extension::socket#ip_add_membership()","ionian::extension::socket#ip_drop_membership()","ionian::extension::socket#ip_multicast_if()","ionian::extension::socket#ip_multicast_if=()","ionian::extension::socket#ip_multicast_loop()","ionian::extension::socket#ip_multicast_loop=()","ionian::extension::socket#ip_multicast_loop?()","ionian::extension::socket#ip_multicast_ttl()","ionian::extension::socket#ip_multicast_ttl=()","ionian::extension::socket#ipv6_add_membership()","ionian::extension::socket#ipv6_drop_membership()","ionian::extension::socket#ipv6_multicast_hops()","ionian::extension::socket#ipv6_multicast_hops=()","ionian::extension::socket#ipv6_multicast_if()","ionian::extension::socket#ipv6_multicast_if=()","ionian::extension::socket#ipv6_multicast_loop()","ionian::extension::socket#ipv6_multicast_loop=()","ionian::extension::socket#ipv6_multicast_loop?()","ionian::server#listen()","ionian::extension::socket#multicast()","ionian::extension::socket#multicast?()","ionian::server::new()","ionian::socket::new()","ionian::extension::socket#no_delay()","ionian::extension::socket#no_delay=()","ionian::extension::socket#no_delay?()","ionian::server#on_accept()","ionian::extension::io#on_match()","ionian::socket#on_match()","ionian::socket#persistent?()","ionian::extension::io#purge()","ionian::socket#puts()","ionian::extension::io#read_all()","ionian::extension::io#read_match()","ionian::extension::socket#recork()","ionian::server#register_accept_listener()","ionian::extension::io#register_observer()","ionian::socket#register_observer()","ionian::extension::socket#reuse_addr()","ionian::extension::socket#reuse_addr=()","ionian::extension::socket#reuse_addr?()","ionian::extension::io#run_match()","ionian::extension::socket#ttl()","ionian::extension::socket#ttl=()","ionian::extension::socket#ttl?()","ionian::server#unregister_accept_listener()","ionian::extension::io#unregister_observer()","ionian::socket#unregister_observer()","ionian::socket#write()"],"info":[["Ionian","","Ionian.html","","<p>A library to simplify interaction with IO streams. This includes network\nsockets, file sockets, and serial …\n"],["Ionian::Extension","","Ionian/Extension.html","","<p>A collection of mixins.\n"],["Ionian::Extension::IO","","Ionian/Extension/IO.html","","<p>A mixin for IO objects that allows regular expression matching and\nconvenient notification of received …\n"],["Ionian::Extension::Socket","","Ionian/Extension/Socket.html","","<p>A mixin for Socket objects.\n<p>This module was designed to be extended by instantiated objects that\nimplement …\n"],["Ionian::Server","","Ionian/Server.html","","<p>A convenient wrapper for TCP, UDP, and Unix server sockets.\n"],["Ionian::Socket","","Ionian/Socket.html","","<p>A convenient wrapper for TCP, UDP, and Unix client sockets.\n"],["<<","Ionian::Socket","Ionian/Socket.html#method-i-3C-3C","(string)",""],["close","Ionian::Server","Ionian/Server.html#method-i-close","()","<p>Shutdown the server socket and stop listening for connections.\n"],["closed?","Ionian::Socket","Ionian/Socket.html#method-i-closed-3F","()","<p>Returns true if the socket is closed.\n"],["cmd","Ionian::Socket","Ionian/Socket.html#method-i-cmd","(string, **kwargs, &block)","<p>Send a command (data) to the socket. Returns an array of received matches.\nBlock yields received match. …\n"],["cork","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-cork","()","<p>Returns true if multiple writes are buffered into a single segment. See\n#recork. Linux only. ( TCP_CORK …\n"],["cork=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-cork-3D","(value)","<p>Buffers multiple writes into a single segment if true. The segment is sent\nonce the cork flag is disabled, …\n"],["cork?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-cork-3F","()",""],["expression","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-expression","()","<p>Returns the regular expression used for #read_match.\n"],["expression=","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-expression-3D","(exp)","<p>Set the expression to match against the read buffer. Can be a regular\nexpression specifying capture groups, …\n"],["extended","Ionian::Extension::IO","Ionian/Extension/IO.html#method-c-extended","(obj)","<p>Called automaticallly when the object is extended with #extend.\n"],["extended","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-c-extended","(obj)","<p>Called automaticallly when the object is extended with #extend.\n"],["flush","Ionian::Socket","Ionian/Socket.html#method-i-flush","()","<p>Flushes buffered data to the operating system. This method has no effect on\nnon-persistent sockets.\n"],["has_data?","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-has_data-3F","(timeout: 0)","<p>Returns true if there is data in the receive buffer. Args:\n\n<pre>Timeout: Number of seconds to wait for data ...</pre>\n"],["has_data?","Ionian::Socket","Ionian/Socket.html#method-i-has_data-3F","(**kwargs)","<p>Returns true if there is data in the receive buffer. Args:\n\n<pre>Timeout: Number of seconds to wait for data ...</pre>\n"],["initialize_ionian","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-initialize_ionian","()","<p>Initialize the Ionian instance variables. This is called automatically if\n#extend is called on an object. …\n"],["initialize_ionian_socket","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-initialize_ionian_socket","()","<p>Initialize the Ionian Socket variables. This is called automatically if\n#extend is called on an object. …\n"],["ip_add_membership","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_add_membership","(address = nil, interface = nil)","<p>Join a multicast group. Address is the class D multicast address (uses\nremote address if not specified). …\n"],["ip_drop_membership","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_drop_membership","(address = nil, interface = nil)","<p>Leave a multicast group. Address is the class D multicast address (uses\nremote address if not specified). …\n"],["ip_multicast_if","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_if","()","<p>Returns the default interface for outgoing multicasts. ( IP_MULTICAST_IF )\n"],["ip_multicast_if=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_if-3D","(interface = nil)","<p>Specify default interface for outgoing multicasts. ( IP_MULTICAST_IF )\n"],["ip_multicast_loop","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_loop","()","<p>Returns true if loopback of outgoing multicasts is enabled. (\nIP_MULTICAST_LOOP )\n"],["ip_multicast_loop=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_loop-3D","(value)","<p>Enables loopback of outgoing multicasts if true. ( IP_MULTICAST_LOOP )\n"],["ip_multicast_loop?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_loop-3F","()",""],["ip_multicast_ttl","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_ttl","()","<p>Returns the time to live (hop limit) for outgoing multicasts. (\nIP_MULTICAST_TTL )\n"],["ip_multicast_ttl=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_ttl-3D","(value)","<p>Set the time to live (hop limit) for outgoing multicasts. (\nIP_MULTICAST_TTL )\n"],["ipv6_add_membership","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_add_membership","()","<p>Not yet implemented.\n"],["ipv6_drop_membership","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_drop_membership","()","<p>Not yet implemented.\n"],["ipv6_multicast_hops","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_hops","()","<p>Not yet implemented.\n"],["ipv6_multicast_hops=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_hops-3D","(value)","<p>Not yet implemented.\n"],["ipv6_multicast_if","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_if","()","<p>Not yet implemented.\n"],["ipv6_multicast_if=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_if-3D","(value)","<p>Not yet implemented.\n"],["ipv6_multicast_loop","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_loop","()","<p>Not yet implemented.\n"],["ipv6_multicast_loop=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_loop-3D","(value)","<p>Not yet implemented.\n"],["ipv6_multicast_loop?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_loop-3F","()",""],["listen","Ionian::Server","Ionian/Server.html#method-i-listen","(&block)","<p>Starts the socket server listening for connections. Blocks registered with\n#register_accept_listener …\n"],["multicast","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-multicast","(address)","<p>Returns true if the given address is within the multicast range.\n"],["multicast?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-multicast-3F","(address)",""],["new","Ionian::Server","Ionian/Server.html#method-c-new","(**kwargs, &block)","<p>A convenient wrapper for TCP and Unix server sockets (UDP doesn't use a\nserver).\n<p>Accepts an optional …\n"],["new","Ionian::Socket","Ionian/Socket.html#method-c-new","(existing_socket = nil, **kwargs)","<p>Creates a new socket or wraps an existing socket.\n<p>Args:\n\n<pre>host: IP or hostname to connect to.\nport: ...</pre>\n"],["no_delay","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-no_delay","()","<p>Returns true if the Nagle algorithm is disabled. ( TCP_NODELAY )\n"],["no_delay=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-no_delay-3D","(value)","<p>Disables the Nagle algorithm if true. ( TCP_NODELAY )\n"],["no_delay?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-no_delay-3F","()",""],["on_accept","Ionian::Server","Ionian/Server.html#method-i-on_accept","(&block)",""],["on_match","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-on_match","(&block)",""],["on_match","Ionian::Socket","Ionian/Socket.html#method-i-on_match","(&block)",""],["persistent?","Ionian::Socket","Ionian/Socket.html#method-i-persistent-3F","()","<p>Returns true if the socket remains open after writing data.\n"],["purge","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-purge","()","<p>Erase the data in the IO and Ionian buffers. This is typically handled\nautomatically.\n"],["puts","Ionian::Socket","Ionian/Socket.html#method-i-puts","(*string)","<p>Writes the given string(s) to the socket and appends a newline character to\nany string not already ending …\n"],["read_all","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-read_all","()","<p>Read all data in the buffer. An alternative to using #readpartial with a\nlarge length.\n"],["read_match","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-read_match","(**kwargs, &block)","<p>Read matched data from the buffer. This method SHOULD NOT be used if\n#run_match is used.\n<p>Passes matches …\n"],["recork","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-recork","()","<p>Unsets cork to transmit data, then reapplies cork. ( TCP_CORK )\n"],["register_accept_listener","Ionian::Server","Ionian/Server.html#method-i-register_accept_listener","(&block)","<p>Register a block to be run when server accepts a client connection. The\nconnected client is passed to …\n"],["register_observer","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-register_observer","(&block)","<p>Register a block to be called when #run_match receives matched data. Method\ncallbacks can be registered …\n"],["register_observer","Ionian::Socket","Ionian/Socket.html#method-i-register_observer","(&block)","<p>Register a block to be called when #run_match receives matched data. Method\ncallbacks can be registered …\n"],["reuse_addr","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-reuse_addr","()","<p>Returns true if local address reuse is allowed. ( SO_REUSEADDR )\n"],["reuse_addr=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-reuse_addr-3D","(value)","<p>Allows local address reuse if true. ( SO_REUSEADDR )\n"],["reuse_addr?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-reuse_addr-3F","()",""],["run_match","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-run_match","(**kwargs)","<p>Start a thread that checks for data and notifies listeners (do |match,\nsocket|). Passes kwargs to #read_match …\n"],["ttl","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ttl","()","<p>Returns the time to live (hop limit). ( IP_TTL )\n"],["ttl=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ttl-3D","(value)","<p>Sets the time to live (hop limit). ( IP_TTL )\n"],["ttl?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ttl-3F","()",""],["unregister_accept_listener","Ionian::Server","Ionian/Server.html#method-i-unregister_accept_listener","(proc)","<p>Unregisters a socket accept notifier block.\n"],["unregister_observer","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-unregister_observer","(&block)","<p>Unregister a block from being called when matched data is received.\n"],["unregister_observer","Ionian::Socket","Ionian/Socket.html#method-i-unregister_observer","(&block)","<p>Unregister a block from being called when matched data is received.\n"],["write","Ionian::Socket","Ionian/Socket.html#method-i-write","(string)","<p>Writes the given string to the socket. Returns the number of bytes written.\n"]]}}
|
1
|
+
var search_data = {"index":{"searchIndex":["ionian","extension","io","socket","server","socket","<<()","close()","closed?()","closed?()","cmd()","cork()","cork=()","cork?()","expression()","expression=()","extended()","extended()","flush()","has_data?()","has_data?()","initialize_ionian()","initialize_ionian_socket()","ip_add_membership()","ip_drop_membership()","ip_multicast_if()","ip_multicast_if=()","ip_multicast_loop()","ip_multicast_loop=()","ip_multicast_loop?()","ip_multicast_ttl()","ip_multicast_ttl=()","ipv6_add_membership()","ipv6_drop_membership()","ipv6_multicast_hops()","ipv6_multicast_hops=()","ipv6_multicast_if()","ipv6_multicast_if=()","ipv6_multicast_loop()","ipv6_multicast_loop=()","ipv6_multicast_loop?()","listen()","multicast()","multicast?()","new()","new()","no_delay()","no_delay=()","no_delay?()","on_accept()","on_match()","on_match()","persistent?()","purge()","puts()","read_all()","read_match()","recork()","register_accept_listener()","register_observer()","register_observer()","reuse_addr()","reuse_addr=()","reuse_addr?()","run_match()","ttl()","ttl=()","ttl?()","unregister_accept_listener()","unregister_observer()","unregister_observer()","write()"],"longSearchIndex":["ionian","ionian::extension","ionian::extension::io","ionian::extension::socket","ionian::server","ionian::socket","ionian::socket#<<()","ionian::server#close()","ionian::server#closed?()","ionian::socket#closed?()","ionian::socket#cmd()","ionian::extension::socket#cork()","ionian::extension::socket#cork=()","ionian::extension::socket#cork?()","ionian::extension::io#expression()","ionian::extension::io#expression=()","ionian::extension::io::extended()","ionian::extension::socket::extended()","ionian::socket#flush()","ionian::extension::io#has_data?()","ionian::socket#has_data?()","ionian::extension::io#initialize_ionian()","ionian::extension::socket#initialize_ionian_socket()","ionian::extension::socket#ip_add_membership()","ionian::extension::socket#ip_drop_membership()","ionian::extension::socket#ip_multicast_if()","ionian::extension::socket#ip_multicast_if=()","ionian::extension::socket#ip_multicast_loop()","ionian::extension::socket#ip_multicast_loop=()","ionian::extension::socket#ip_multicast_loop?()","ionian::extension::socket#ip_multicast_ttl()","ionian::extension::socket#ip_multicast_ttl=()","ionian::extension::socket#ipv6_add_membership()","ionian::extension::socket#ipv6_drop_membership()","ionian::extension::socket#ipv6_multicast_hops()","ionian::extension::socket#ipv6_multicast_hops=()","ionian::extension::socket#ipv6_multicast_if()","ionian::extension::socket#ipv6_multicast_if=()","ionian::extension::socket#ipv6_multicast_loop()","ionian::extension::socket#ipv6_multicast_loop=()","ionian::extension::socket#ipv6_multicast_loop?()","ionian::server#listen()","ionian::extension::socket#multicast()","ionian::extension::socket#multicast?()","ionian::server::new()","ionian::socket::new()","ionian::extension::socket#no_delay()","ionian::extension::socket#no_delay=()","ionian::extension::socket#no_delay?()","ionian::server#on_accept()","ionian::extension::io#on_match()","ionian::socket#on_match()","ionian::socket#persistent?()","ionian::extension::io#purge()","ionian::socket#puts()","ionian::extension::io#read_all()","ionian::extension::io#read_match()","ionian::extension::socket#recork()","ionian::server#register_accept_listener()","ionian::extension::io#register_observer()","ionian::socket#register_observer()","ionian::extension::socket#reuse_addr()","ionian::extension::socket#reuse_addr=()","ionian::extension::socket#reuse_addr?()","ionian::extension::io#run_match()","ionian::extension::socket#ttl()","ionian::extension::socket#ttl=()","ionian::extension::socket#ttl?()","ionian::server#unregister_accept_listener()","ionian::extension::io#unregister_observer()","ionian::socket#unregister_observer()","ionian::socket#write()"],"info":[["Ionian","","Ionian.html","","<p>A library to simplify interaction with IO streams. This includes network\nsockets, file sockets, and serial …\n"],["Ionian::Extension","","Ionian/Extension.html","","<p>A collection of mixins.\n"],["Ionian::Extension::IO","","Ionian/Extension/IO.html","","<p>A mixin for IO objects that allows regular expression matching and\nconvenient notification of received …\n"],["Ionian::Extension::Socket","","Ionian/Extension/Socket.html","","<p>A mixin for Socket objects.\n<p>This module was designed to be extended by instantiated objects that\nimplement …\n"],["Ionian::Server","","Ionian/Server.html","","<p>A convenient wrapper for TCP, UDP, and Unix server sockets.\n"],["Ionian::Socket","","Ionian/Socket.html","","<p>A convenient wrapper for TCP, UDP, and Unix client sockets.\n"],["<<","Ionian::Socket","Ionian/Socket.html#method-i-3C-3C","(string)",""],["close","Ionian::Server","Ionian/Server.html#method-i-close","()","<p>Shutdown the server socket and stop listening for connections.\n"],["closed?","Ionian::Server","Ionian/Server.html#method-i-closed-3F","()","<p>Returns true if the server listener socket is closed.\n"],["closed?","Ionian::Socket","Ionian/Socket.html#method-i-closed-3F","()","<p>Returns true if the socket is closed.\n"],["cmd","Ionian::Socket","Ionian/Socket.html#method-i-cmd","(string, **kwargs, &block)","<p>Send a command (data) to the socket. Returns an array of received matches.\nBlock yields received match. …\n"],["cork","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-cork","()","<p>Returns true if multiple writes are buffered into a single segment. See\n#recork. Linux only. ( TCP_CORK …\n"],["cork=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-cork-3D","(value)","<p>Buffers multiple writes into a single segment if true. The segment is sent\nonce the cork flag is disabled, …\n"],["cork?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-cork-3F","()",""],["expression","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-expression","()","<p>Returns the regular expression used for #read_match.\n"],["expression=","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-expression-3D","(exp)","<p>Set the expression to match against the read buffer. Can be a regular\nexpression specifying capture groups, …\n"],["extended","Ionian::Extension::IO","Ionian/Extension/IO.html#method-c-extended","(obj)","<p>Called automaticallly when the object is extended with #extend.\n"],["extended","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-c-extended","(obj)","<p>Called automaticallly when the object is extended with #extend.\n"],["flush","Ionian::Socket","Ionian/Socket.html#method-i-flush","()","<p>Flushes buffered data to the operating system. This method has no effect on\nnon-persistent sockets.\n"],["has_data?","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-has_data-3F","(timeout: 0)","<p>Returns true if there is data in the receive buffer. Args:\n\n<pre>Timeout: Number of seconds to wait for data ...</pre>\n"],["has_data?","Ionian::Socket","Ionian/Socket.html#method-i-has_data-3F","(**kwargs)","<p>Returns true if there is data in the receive buffer. Args:\n\n<pre>Timeout: Number of seconds to wait for data ...</pre>\n"],["initialize_ionian","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-initialize_ionian","()","<p>Initialize the Ionian instance variables. This is called automatically if\n#extend is called on an object. …\n"],["initialize_ionian_socket","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-initialize_ionian_socket","()","<p>Initialize the Ionian Socket variables. This is called automatically if\n#extend is called on an object. …\n"],["ip_add_membership","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_add_membership","(address = nil, interface = nil)","<p>Join a multicast group. Address is the class D multicast address (uses\nremote address if not specified). …\n"],["ip_drop_membership","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_drop_membership","(address = nil, interface = nil)","<p>Leave a multicast group. Address is the class D multicast address (uses\nremote address if not specified). …\n"],["ip_multicast_if","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_if","()","<p>Returns the default interface for outgoing multicasts. ( IP_MULTICAST_IF )\n"],["ip_multicast_if=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_if-3D","(interface = nil)","<p>Specify default interface for outgoing multicasts. ( IP_MULTICAST_IF )\n"],["ip_multicast_loop","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_loop","()","<p>Returns true if loopback of outgoing multicasts is enabled. (\nIP_MULTICAST_LOOP )\n"],["ip_multicast_loop=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_loop-3D","(value)","<p>Enables loopback of outgoing multicasts if true. ( IP_MULTICAST_LOOP )\n"],["ip_multicast_loop?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_loop-3F","()",""],["ip_multicast_ttl","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_ttl","()","<p>Returns the time to live (hop limit) for outgoing multicasts. (\nIP_MULTICAST_TTL )\n"],["ip_multicast_ttl=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ip_multicast_ttl-3D","(value)","<p>Set the time to live (hop limit) for outgoing multicasts. (\nIP_MULTICAST_TTL )\n"],["ipv6_add_membership","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_add_membership","()","<p>Not yet implemented.\n"],["ipv6_drop_membership","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_drop_membership","()","<p>Not yet implemented.\n"],["ipv6_multicast_hops","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_hops","()","<p>Not yet implemented.\n"],["ipv6_multicast_hops=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_hops-3D","(value)","<p>Not yet implemented.\n"],["ipv6_multicast_if","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_if","()","<p>Not yet implemented.\n"],["ipv6_multicast_if=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_if-3D","(value)","<p>Not yet implemented.\n"],["ipv6_multicast_loop","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_loop","()","<p>Not yet implemented.\n"],["ipv6_multicast_loop=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_loop-3D","(value)","<p>Not yet implemented.\n"],["ipv6_multicast_loop?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ipv6_multicast_loop-3F","()",""],["listen","Ionian::Server","Ionian/Server.html#method-i-listen","(&block)","<p>Starts the socket server listening for connections. Blocks registered with\n#register_accept_listener …\n"],["multicast","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-multicast","(address)","<p>Returns true if the given address is within the multicast range.\n"],["multicast?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-multicast-3F","(address)",""],["new","Ionian::Server","Ionian/Server.html#method-c-new","(**kwargs, &block)","<p>A convenient wrapper for TCP and Unix server sockets (UDP doesn't use a\nserver).\n<p>Accepts an optional …\n"],["new","Ionian::Socket","Ionian/Socket.html#method-c-new","(existing_socket = nil, **kwargs)","<p>Creates a new socket or wraps an existing socket.\n<p>Args:\n\n<pre>host: IP or hostname to connect to.\nport: ...</pre>\n"],["no_delay","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-no_delay","()","<p>Returns true if the Nagle algorithm is disabled. ( TCP_NODELAY )\n"],["no_delay=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-no_delay-3D","(value)","<p>Disables the Nagle algorithm if true. ( TCP_NODELAY )\n"],["no_delay?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-no_delay-3F","()",""],["on_accept","Ionian::Server","Ionian/Server.html#method-i-on_accept","(&block)",""],["on_match","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-on_match","(&block)",""],["on_match","Ionian::Socket","Ionian/Socket.html#method-i-on_match","(&block)",""],["persistent?","Ionian::Socket","Ionian/Socket.html#method-i-persistent-3F","()","<p>Returns true if the socket remains open after writing data.\n"],["purge","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-purge","()","<p>Erase the data in the IO and Ionian buffers. This is typically handled\nautomatically.\n"],["puts","Ionian::Socket","Ionian/Socket.html#method-i-puts","(*string)","<p>Writes the given string(s) to the socket and appends a newline character to\nany string not already ending …\n"],["read_all","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-read_all","()","<p>Read all data in the buffer. An alternative to using #readpartial with a\nlarge length.\n"],["read_match","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-read_match","(**kwargs, &block)","<p>Read matched data from the buffer. This method SHOULD NOT be used if\n#run_match is used.\n<p>Passes matches …\n"],["recork","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-recork","()","<p>Unsets cork to transmit data, then reapplies cork. ( TCP_CORK )\n"],["register_accept_listener","Ionian::Server","Ionian/Server.html#method-i-register_accept_listener","(&block)","<p>Register a block to be run when server accepts a client connection. The\nconnected client is passed to …\n"],["register_observer","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-register_observer","(&block)","<p>Register a block to be called when #run_match receives matched data. Method\ncallbacks can be registered …\n"],["register_observer","Ionian::Socket","Ionian/Socket.html#method-i-register_observer","(&block)","<p>Register a block to be called when #run_match receives matched data. Method\ncallbacks can be registered …\n"],["reuse_addr","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-reuse_addr","()","<p>Returns true if local address reuse is allowed. ( SO_REUSEADDR )\n"],["reuse_addr=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-reuse_addr-3D","(value)","<p>Allows local address reuse if true. ( SO_REUSEADDR )\n"],["reuse_addr?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-reuse_addr-3F","()",""],["run_match","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-run_match","(**kwargs)","<p>Start a thread that checks for data and notifies listeners (do |match,\nsocket|). Passes kwargs to #read_match …\n"],["ttl","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ttl","()","<p>Returns the time to live (hop limit). ( IP_TTL )\n"],["ttl=","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ttl-3D","(value)","<p>Sets the time to live (hop limit). ( IP_TTL )\n"],["ttl?","Ionian::Extension::Socket","Ionian/Extension/Socket.html#method-i-ttl-3F","()",""],["unregister_accept_listener","Ionian::Server","Ionian/Server.html#method-i-unregister_accept_listener","(proc)","<p>Unregisters a socket accept notifier block.\n"],["unregister_observer","Ionian::Extension::IO","Ionian/Extension/IO.html#method-i-unregister_observer","(&block)","<p>Unregister a block from being called when matched data is received.\n"],["unregister_observer","Ionian::Socket","Ionian/Socket.html#method-i-unregister_observer","(&block)","<p>Unregister a block from being called when matched data is received.\n"],["write","Ionian::Socket","Ionian/Socket.html#method-i-write","(string)","<p>Writes the given string to the socket. Returns the number of bytes written.\n"]]}}
|
data/doc/table_of_contents.html
CHANGED
@@ -51,26 +51,26 @@
|
|
51
51
|
<h2 id="methods">Methods</h2>
|
52
52
|
<ul>
|
53
53
|
|
54
|
-
<li class="method">
|
55
|
-
<a href="Ionian/Extension/Socket.html#method-c-extended">::extended</a>
|
56
|
-
—
|
57
|
-
<span class="container">Ionian::Extension::Socket</span>
|
58
|
-
|
59
54
|
<li class="method">
|
60
55
|
<a href="Ionian/Extension/IO.html#method-c-extended">::extended</a>
|
61
56
|
—
|
62
57
|
<span class="container">Ionian::Extension::IO</span>
|
63
58
|
|
64
59
|
<li class="method">
|
65
|
-
<a href="Ionian/Socket.html#method-c-
|
60
|
+
<a href="Ionian/Extension/Socket.html#method-c-extended">::extended</a>
|
66
61
|
—
|
67
|
-
<span class="container">Ionian::Socket</span>
|
62
|
+
<span class="container">Ionian::Extension::Socket</span>
|
68
63
|
|
69
64
|
<li class="method">
|
70
65
|
<a href="Ionian/Server.html#method-c-new">::new</a>
|
71
66
|
—
|
72
67
|
<span class="container">Ionian::Server</span>
|
73
68
|
|
69
|
+
<li class="method">
|
70
|
+
<a href="Ionian/Socket.html#method-c-new">::new</a>
|
71
|
+
—
|
72
|
+
<span class="container">Ionian::Socket</span>
|
73
|
+
|
74
74
|
<li class="method">
|
75
75
|
<a href="Ionian/Socket.html#method-i-3C-3C">#<<</a>
|
76
76
|
—
|
@@ -81,6 +81,11 @@
|
|
81
81
|
—
|
82
82
|
<span class="container">Ionian::Server</span>
|
83
83
|
|
84
|
+
<li class="method">
|
85
|
+
<a href="Ionian/Server.html#method-i-closed-3F">#closed?</a>
|
86
|
+
—
|
87
|
+
<span class="container">Ionian::Server</span>
|
88
|
+
|
84
89
|
<li class="method">
|
85
90
|
<a href="Ionian/Socket.html#method-i-closed-3F">#closed?</a>
|
86
91
|
—
|
@@ -312,14 +317,14 @@
|
|
312
317
|
<span class="container">Ionian::Server</span>
|
313
318
|
|
314
319
|
<li class="method">
|
315
|
-
<a href="Ionian/
|
320
|
+
<a href="Ionian/Socket.html#method-i-register_observer">#register_observer</a>
|
316
321
|
—
|
317
|
-
<span class="container">Ionian::
|
322
|
+
<span class="container">Ionian::Socket</span>
|
318
323
|
|
319
324
|
<li class="method">
|
320
|
-
<a href="Ionian/
|
325
|
+
<a href="Ionian/Extension/IO.html#method-i-register_observer">#register_observer</a>
|
321
326
|
—
|
322
|
-
<span class="container">Ionian::
|
327
|
+
<span class="container">Ionian::Extension::IO</span>
|
323
328
|
|
324
329
|
<li class="method">
|
325
330
|
<a href="Ionian/Extension/Socket.html#method-i-reuse_addr">#reuse_addr</a>
|
@@ -381,7 +386,7 @@
|
|
381
386
|
|
382
387
|
<footer id="validator-badges" role="contentinfo">
|
383
388
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
384
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.
|
389
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
385
390
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
386
391
|
</footer>
|
387
392
|
|
data/lib/ionian/server.rb
CHANGED
@@ -10,6 +10,7 @@ module Ionian
|
|
10
10
|
# a server).
|
11
11
|
#
|
12
12
|
# Accepts an optional block that is passed to #register_accept_listener.
|
13
|
+
# Server opens listening socket on instantiation if this block is provided.
|
13
14
|
#
|
14
15
|
# Args:
|
15
16
|
# interface: The address of the network interface to bind to.
|
@@ -41,6 +42,8 @@ module Ionian
|
|
41
42
|
when :unix
|
42
43
|
@server = UNIXServer.new @interface
|
43
44
|
end
|
45
|
+
|
46
|
+
listen if block_given?
|
44
47
|
end
|
45
48
|
|
46
49
|
# Starts the socket server listening for connections.
|
@@ -74,6 +77,11 @@ module Ionian
|
|
74
77
|
@accept_thread = nil
|
75
78
|
end
|
76
79
|
|
80
|
+
# Returns true if the server listener socket is closed.
|
81
|
+
def closed?
|
82
|
+
@server.closed?
|
83
|
+
end
|
84
|
+
|
77
85
|
# Register a block to be run when server accepts a client connection.
|
78
86
|
# The connected client is passed to the block as an Ionain::Client.
|
79
87
|
def register_accept_listener &block
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ionian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex McLain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|