ionian 0.6.4 → 0.6.5
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 +44 -48
- data/doc/Ionian/Extension/Socket.html +462 -170
- data/doc/Ionian/Extension.html +4 -4
- data/doc/Ionian/Server.html +4 -4
- data/doc/Ionian/Socket.html +321 -103
- data/doc/Ionian.html +4 -4
- data/doc/_index.html +5 -5
- data/doc/css/style.css +1 -0
- data/doc/file.README.html +4 -4
- data/doc/file.license.html +4 -4
- data/doc/frames.html +1 -1
- data/doc/index.html +4 -4
- data/doc/method_list.html +81 -39
- data/doc/top-level-namespace.html +4 -4
- data/lib/ionian/extension/io.rb +22 -24
- data/lib/ionian/extension/socket.rb +52 -14
- data/lib/ionian/socket.rb +27 -17
- metadata +2 -2
data/doc/Ionian/Socket.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ionian::Socket
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!Ionian/Socket.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -117,6 +117,93 @@
|
|
117
117
|
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
118
118
|
<ul class="summary">
|
119
119
|
|
120
|
+
<li class="public ">
|
121
|
+
<span class="summary_signature">
|
122
|
+
|
123
|
+
<a href="#bind_port-instance_method" title="#bind_port (instance method)">- (Object) <strong>bind_port</strong> </a>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<span class="note title readonly">readonly</span>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
143
|
+
<p>Local port number.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#host-instance_method" title="#host (instance method)">- (Object) <strong>host</strong> </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<span class="note title readonly">readonly</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'>
|
172
|
+
<p>IP address or URL of server.</p>
|
173
|
+
</div></span>
|
174
|
+
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
<li class="public ">
|
179
|
+
<span class="summary_signature">
|
180
|
+
|
181
|
+
<a href="#port-instance_method" title="#port (instance method)">- (Object) <strong>port</strong> </a>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
</span>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<span class="note title readonly">readonly</span>
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<span class="summary_desc"><div class='inline'>
|
201
|
+
<p>Remote port number.</p>
|
202
|
+
</div></span>
|
203
|
+
|
204
|
+
</li>
|
205
|
+
|
206
|
+
|
120
207
|
<li class="public ">
|
121
208
|
<span class="summary_signature">
|
122
209
|
|
@@ -506,15 +593,6 @@ expression: Overrides the #read_match regular expression for received data.</cod
|
|
506
593
|
<pre class="lines">
|
507
594
|
|
508
595
|
|
509
|
-
25
|
510
|
-
26
|
511
|
-
27
|
512
|
-
28
|
513
|
-
29
|
514
|
-
30
|
515
|
-
31
|
516
|
-
32
|
517
|
-
33
|
518
596
|
34
|
519
597
|
35
|
520
598
|
36
|
@@ -565,12 +643,22 @@ expression: Overrides the #read_match regular expression for received data.</cod
|
|
565
643
|
81
|
566
644
|
82
|
567
645
|
83
|
568
|
-
84
|
646
|
+
84
|
647
|
+
85
|
648
|
+
86
|
649
|
+
87
|
650
|
+
88
|
651
|
+
89
|
652
|
+
90
|
653
|
+
91
|
654
|
+
92
|
655
|
+
93
|
656
|
+
94</pre>
|
569
657
|
</td>
|
570
658
|
<td>
|
571
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
659
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 34</span>
|
572
660
|
|
573
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span
|
661
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_existing_socket'>existing_socket</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
|
574
662
|
<span class='ivar'>@socket</span> <span class='op'>=</span> <span class='id identifier rubyid_existing_socket'>existing_socket</span>
|
575
663
|
|
576
664
|
<span class='ivar'>@ionian_listeners</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -603,16 +691,17 @@ expression: Overrides the #read_match regular expression for received data.</cod
|
|
603
691
|
<span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span> <span class='op'>=</span> <span class='ivar'>@expression</span> <span class='kw'>if</span> <span class='ivar'>@expression</span>
|
604
692
|
|
605
693
|
<span class='id identifier rubyid_initialize_socket_methods'>initialize_socket_methods</span>
|
694
|
+
|
606
695
|
<span class='kw'>else</span>
|
607
696
|
<span class='comment'># Initialize new socket.
|
608
697
|
</span>
|
609
|
-
<span class='comment'>#
|
610
|
-
</span> <span class='
|
611
|
-
|
612
|
-
<span class='ivar'>@host</span> <span class='op'>=</span> <span class='id identifier
|
613
|
-
<span class='ivar'>@port</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:port</span><span class='comma'>,</span>
|
698
|
+
<span class='comment'># Parse host out of "host:port" if specified.
|
699
|
+
</span> <span class='id identifier rubyid_host_port_ary'>host_port_ary</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:host</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>:</span><span class='tstring_end'>'</span></span>
|
700
|
+
|
701
|
+
<span class='ivar'>@host</span> <span class='op'>=</span> <span class='id identifier rubyid_host_port_ary'>host_port_ary</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
702
|
+
<span class='ivar'>@port</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:port</span><span class='comma'>,</span> <span class='id identifier rubyid_host_port_ary'>host_port_ary</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>||</span> <span class='int'>23</span>
|
614
703
|
<span class='ivar'>@bind_port</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:bind_port</span><span class='comma'>,</span> <span class='ivar'>@port</span>
|
615
|
-
|
704
|
+
|
616
705
|
<span class='comment'># Automatically select UDP for the multicast range. Otherwise default to TCP.
|
617
706
|
</span> <span class='id identifier rubyid_default_protocol'>default_protocol</span> <span class='op'>=</span> <span class='symbol'>:tcp</span>
|
618
707
|
<span class='id identifier rubyid_default_protocol'>default_protocol</span> <span class='op'>=</span> <span class='symbol'>:udp</span> <span class='kw'>if</span> <span class='const'>Ionian</span><span class='op'>::</span><span class='const'>Extension</span><span class='op'>::</span><span class='const'>Socket</span><span class='period'>.</span><span class='id identifier rubyid_multicast?'>multicast?</span> <span class='ivar'>@host</span>
|
@@ -643,7 +732,136 @@ expression: Overrides the #read_match regular expression for received data.</cod
|
|
643
732
|
|
644
733
|
<span id=""></span>
|
645
734
|
<div class="method_details first">
|
646
|
-
<h3 class="signature first" id="
|
735
|
+
<h3 class="signature first" id="bind_port-instance_method">
|
736
|
+
|
737
|
+
- (<tt>Object</tt>) <strong>bind_port</strong> <span class="extras">(readonly)</span>
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
|
743
|
+
</h3><div class="docstring">
|
744
|
+
<div class="discussion">
|
745
|
+
|
746
|
+
<p>Local port number.</p>
|
747
|
+
|
748
|
+
|
749
|
+
</div>
|
750
|
+
</div>
|
751
|
+
<div class="tags">
|
752
|
+
|
753
|
+
|
754
|
+
</div><table class="source_code">
|
755
|
+
<tr>
|
756
|
+
<td>
|
757
|
+
<pre class="lines">
|
758
|
+
|
759
|
+
|
760
|
+
15
|
761
|
+
16
|
762
|
+
17</pre>
|
763
|
+
</td>
|
764
|
+
<td>
|
765
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 15</span>
|
766
|
+
|
767
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_bind_port'>bind_port</span>
|
768
|
+
<span class='ivar'>@bind_port</span>
|
769
|
+
<span class='kw'>end</span></pre>
|
770
|
+
</td>
|
771
|
+
</tr>
|
772
|
+
</table>
|
773
|
+
</div>
|
774
|
+
|
775
|
+
|
776
|
+
<span id=""></span>
|
777
|
+
<div class="method_details ">
|
778
|
+
<h3 class="signature " id="host-instance_method">
|
779
|
+
|
780
|
+
- (<tt>Object</tt>) <strong>host</strong> <span class="extras">(readonly)</span>
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
|
785
|
+
|
786
|
+
</h3><div class="docstring">
|
787
|
+
<div class="discussion">
|
788
|
+
|
789
|
+
<p>IP address or URL of server.</p>
|
790
|
+
|
791
|
+
|
792
|
+
</div>
|
793
|
+
</div>
|
794
|
+
<div class="tags">
|
795
|
+
|
796
|
+
|
797
|
+
</div><table class="source_code">
|
798
|
+
<tr>
|
799
|
+
<td>
|
800
|
+
<pre class="lines">
|
801
|
+
|
802
|
+
|
803
|
+
9
|
804
|
+
10
|
805
|
+
11</pre>
|
806
|
+
</td>
|
807
|
+
<td>
|
808
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 9</span>
|
809
|
+
|
810
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_host'>host</span>
|
811
|
+
<span class='ivar'>@host</span>
|
812
|
+
<span class='kw'>end</span></pre>
|
813
|
+
</td>
|
814
|
+
</tr>
|
815
|
+
</table>
|
816
|
+
</div>
|
817
|
+
|
818
|
+
|
819
|
+
<span id=""></span>
|
820
|
+
<div class="method_details ">
|
821
|
+
<h3 class="signature " id="port-instance_method">
|
822
|
+
|
823
|
+
- (<tt>Object</tt>) <strong>port</strong> <span class="extras">(readonly)</span>
|
824
|
+
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
</h3><div class="docstring">
|
830
|
+
<div class="discussion">
|
831
|
+
|
832
|
+
<p>Remote port number.</p>
|
833
|
+
|
834
|
+
|
835
|
+
</div>
|
836
|
+
</div>
|
837
|
+
<div class="tags">
|
838
|
+
|
839
|
+
|
840
|
+
</div><table class="source_code">
|
841
|
+
<tr>
|
842
|
+
<td>
|
843
|
+
<pre class="lines">
|
844
|
+
|
845
|
+
|
846
|
+
12
|
847
|
+
13
|
848
|
+
14</pre>
|
849
|
+
</td>
|
850
|
+
<td>
|
851
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 12</span>
|
852
|
+
|
853
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_port'>port</span>
|
854
|
+
<span class='ivar'>@port</span>
|
855
|
+
<span class='kw'>end</span></pre>
|
856
|
+
</td>
|
857
|
+
</tr>
|
858
|
+
</table>
|
859
|
+
</div>
|
860
|
+
|
861
|
+
|
862
|
+
<span id=""></span>
|
863
|
+
<div class="method_details ">
|
864
|
+
<h3 class="signature " id="protocol-instance_method">
|
647
865
|
|
648
866
|
- (<tt>Object</tt>) <strong>protocol</strong> <span class="extras">(readonly)</span>
|
649
867
|
|
@@ -673,12 +891,12 @@ expression: Overrides the #read_match regular expression for received data.</cod
|
|
673
891
|
<pre class="lines">
|
674
892
|
|
675
893
|
|
676
|
-
|
677
|
-
|
678
|
-
|
894
|
+
98
|
895
|
+
99
|
896
|
+
100</pre>
|
679
897
|
</td>
|
680
898
|
<td>
|
681
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
899
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 98</span>
|
682
900
|
|
683
901
|
<span class='kw'>def</span> <span class='id identifier rubyid_protocol'>protocol</span>
|
684
902
|
<span class='ivar'>@protocol</span>
|
@@ -734,13 +952,13 @@ expression: Overrides the #read_match regular expression for received data.</cod
|
|
734
952
|
<pre class="lines">
|
735
953
|
|
736
954
|
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
955
|
+
169
|
956
|
+
170
|
957
|
+
171
|
958
|
+
172</pre>
|
741
959
|
</td>
|
742
960
|
<td>
|
743
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
961
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 169</span>
|
744
962
|
|
745
963
|
<span class='kw'>def</span> <span class='id identifier rubyid_closed?'>closed?</span>
|
746
964
|
<span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>unless</span> <span class='ivar'>@socket</span>
|
@@ -778,27 +996,27 @@ Block yields received match. See Ionian::Extension::IO#read_match.</p>
|
|
778
996
|
<pre class="lines">
|
779
997
|
|
780
998
|
|
781
|
-
111
|
782
|
-
112
|
783
|
-
113
|
784
|
-
114
|
785
|
-
115
|
786
|
-
116
|
787
|
-
117
|
788
|
-
118
|
789
|
-
119
|
790
|
-
120
|
791
999
|
121
|
792
1000
|
122
|
793
1001
|
123
|
794
1002
|
124
|
795
1003
|
125
|
796
|
-
126
|
1004
|
+
126
|
1005
|
+
127
|
1006
|
+
128
|
1007
|
+
129
|
1008
|
+
130
|
1009
|
+
131
|
1010
|
+
132
|
1011
|
+
133
|
1012
|
+
134
|
1013
|
+
135
|
1014
|
+
136</pre>
|
797
1015
|
</td>
|
798
1016
|
<td>
|
799
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1017
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 121</span>
|
800
1018
|
|
801
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_cmd'>cmd</span
|
1019
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_cmd'>cmd</span> <span class='id identifier rubyid_string'>string</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span>
|
802
1020
|
<span class='id identifier rubyid_create_socket'>create_socket</span> <span class='kw'>unless</span> <span class='ivar'>@persistent</span>
|
803
1021
|
|
804
1022
|
<span class='kw'>if</span> <span class='ivar'>@protocol</span> <span class='op'>==</span> <span class='symbol'>:udp</span>
|
@@ -809,7 +1027,7 @@ Block yields received match. See Ionian::Extension::IO#read_match.</p>
|
|
809
1027
|
|
810
1028
|
<span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_flush'>flush</span>
|
811
1029
|
|
812
|
-
<span class='id identifier rubyid_matches'>matches</span> <span class='op'>=</span> <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_read_match'>read_match</span><span class='lparen'>(</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span> <span class='lbrace'>{</span
|
1030
|
+
<span class='id identifier rubyid_matches'>matches</span> <span class='op'>=</span> <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_read_match'>read_match</span><span class='lparen'>(</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span> <span class='kw'>yield</span> <span class='id identifier rubyid_match'>match</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span> <span class='rbrace'>}</span>
|
813
1031
|
<span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span> <span class='kw'>unless</span> <span class='ivar'>@persistent</span>
|
814
1032
|
|
815
1033
|
<span class='id identifier rubyid_matches'>matches</span>
|
@@ -845,12 +1063,12 @@ Block yields received match. See Ionian::Extension::IO#read_match.</p>
|
|
845
1063
|
<pre class="lines">
|
846
1064
|
|
847
1065
|
|
848
|
-
|
849
|
-
|
850
|
-
|
1066
|
+
102
|
1067
|
+
103
|
1068
|
+
104</pre>
|
851
1069
|
</td>
|
852
1070
|
<td>
|
853
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1071
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 102</span>
|
854
1072
|
|
855
1073
|
<span class='kw'>def</span> <span class='id identifier rubyid_expression'>expression</span>
|
856
1074
|
<span class='ivar'>@expression</span> <span class='op'>||</span> <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span>
|
@@ -886,15 +1104,15 @@ Block yields received match. See Ionian::Extension::IO#read_match.</p>
|
|
886
1104
|
<pre class="lines">
|
887
1105
|
|
888
1106
|
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
1107
|
+
107
|
1108
|
+
108
|
1109
|
+
109
|
1110
|
+
110</pre>
|
893
1111
|
</td>
|
894
1112
|
<td>
|
895
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1113
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 107</span>
|
896
1114
|
|
897
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_expression='>expression=</span
|
1115
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_expression='>expression=</span> <span class='id identifier rubyid_exp'>exp</span>
|
898
1116
|
<span class='ivar'>@expression</span> <span class='op'>=</span> <span class='id identifier rubyid_exp'>exp</span>
|
899
1117
|
<span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span> <span class='op'>=</span> <span class='id identifier rubyid_exp'>exp</span> <span class='kw'>if</span> <span class='ivar'>@socket</span>
|
900
1118
|
<span class='kw'>end</span></pre>
|
@@ -930,12 +1148,12 @@ non-persistent sockets.</p>
|
|
930
1148
|
<pre class="lines">
|
931
1149
|
|
932
1150
|
|
933
|
-
|
934
|
-
|
935
|
-
|
1151
|
+
176
|
1152
|
+
177
|
1153
|
+
178</pre>
|
936
1154
|
</td>
|
937
1155
|
<td>
|
938
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1156
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 176</span>
|
939
1157
|
|
940
1158
|
<span class='kw'>def</span> <span class='id identifier rubyid_flush'>flush</span>
|
941
1159
|
<span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_flush'>flush</span> <span class='kw'>if</span> <span class='ivar'>@persistent</span>
|
@@ -987,15 +1205,15 @@ non-persistent sockets.</p>
|
|
987
1205
|
<pre class="lines">
|
988
1206
|
|
989
1207
|
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
1208
|
+
163
|
1209
|
+
164
|
1210
|
+
165
|
1211
|
+
166</pre>
|
994
1212
|
</td>
|
995
1213
|
<td>
|
996
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1214
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 163</span>
|
997
1215
|
|
998
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_has_data?'>has_data?</span
|
1216
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_has_data?'>has_data?</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
|
999
1217
|
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='ivar'>@socket</span>
|
1000
1218
|
<span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_has_data?'>has_data?</span> <span class='id identifier rubyid_kwargs'>kwargs</span>
|
1001
1219
|
<span class='kw'>end</span></pre>
|
@@ -1043,12 +1261,12 @@ non-persistent sockets.</p>
|
|
1043
1261
|
<pre class="lines">
|
1044
1262
|
|
1045
1263
|
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1264
|
+
113
|
1265
|
+
114
|
1266
|
+
115</pre>
|
1049
1267
|
</td>
|
1050
1268
|
<td>
|
1051
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1269
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 113</span>
|
1052
1270
|
|
1053
1271
|
<span class='kw'>def</span> <span class='id identifier rubyid_persistent?'>persistent?</span>
|
1054
1272
|
<span class='ivar'>@persistent</span> <span class='op'>==</span> <span class='kw'>false</span> <span class='op'>||</span> <span class='ivar'>@persistent</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='op'>?</span> <span class='kw'>false</span> <span class='op'>:</span> <span class='kw'>true</span>
|
@@ -1085,15 +1303,15 @@ any string not already ending with one.</p>
|
|
1085
1303
|
<pre class="lines">
|
1086
1304
|
|
1087
1305
|
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1306
|
+
182
|
1307
|
+
183
|
1308
|
+
184</pre>
|
1091
1309
|
</td>
|
1092
1310
|
<td>
|
1093
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1311
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 182</span>
|
1094
1312
|
|
1095
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_puts'>puts</span
|
1096
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span
|
1313
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_puts'>puts</span> <span class='op'>*</span><span class='id identifier rubyid_string'>string</span>
|
1314
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span> <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
1097
1315
|
<span class='kw'>end</span></pre>
|
1098
1316
|
</td>
|
1099
1317
|
</tr>
|
@@ -1132,14 +1350,14 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
|
|
1132
1350
|
<pre class="lines">
|
1133
1351
|
|
1134
1352
|
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1353
|
+
142
|
1354
|
+
143
|
1355
|
+
144
|
1356
|
+
145
|
1357
|
+
146</pre>
|
1140
1358
|
</td>
|
1141
1359
|
<td>
|
1142
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1360
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 142</span>
|
1143
1361
|
|
1144
1362
|
<span class='kw'>def</span> <span class='id identifier rubyid_register_observer'>register_observer</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span>
|
1145
1363
|
<span class='ivar'>@ionian_listeners</span> <span class='op'><<</span> <span class='id identifier rubyid_block'>block</span> <span class='kw'>unless</span> <span class='ivar'>@ionian_listeners</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_block'>block</span>
|
@@ -1177,17 +1395,17 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
|
|
1177
1395
|
<pre class="lines">
|
1178
1396
|
|
1179
1397
|
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1398
|
+
151
|
1399
|
+
152
|
1400
|
+
153
|
1401
|
+
154
|
1402
|
+
155</pre>
|
1185
1403
|
</td>
|
1186
1404
|
<td>
|
1187
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1405
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 151</span>
|
1188
1406
|
|
1189
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_unregister_observer'>unregister_observer</span
|
1190
|
-
<span class='ivar'>@ionian_listeners</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='lbrace'>{</span
|
1407
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_unregister_observer'>unregister_observer</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span>
|
1408
|
+
<span class='ivar'>@ionian_listeners</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_o'>o</span> <span class='op'>==</span> <span class='id identifier rubyid_block'>block</span> <span class='rbrace'>}</span>
|
1191
1409
|
<span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_unregister_observer'>unregister_observer</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span> <span class='kw'>if</span> <span class='ivar'>@socket</span>
|
1192
1410
|
<span class='id identifier rubyid_block'>block</span>
|
1193
1411
|
<span class='kw'>end</span></pre>
|
@@ -1226,16 +1444,6 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
|
|
1226
1444
|
<pre class="lines">
|
1227
1445
|
|
1228
1446
|
|
1229
|
-
178
|
1230
|
-
179
|
1231
|
-
180
|
1232
|
-
181
|
1233
|
-
182
|
1234
|
-
183
|
1235
|
-
184
|
1236
|
-
185
|
1237
|
-
186
|
1238
|
-
187
|
1239
1447
|
188
|
1240
1448
|
189
|
1241
1449
|
190
|
@@ -1246,12 +1454,22 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
|
|
1246
1454
|
195
|
1247
1455
|
196
|
1248
1456
|
197
|
1249
|
-
198
|
1457
|
+
198
|
1458
|
+
199
|
1459
|
+
200
|
1460
|
+
201
|
1461
|
+
202
|
1462
|
+
203
|
1463
|
+
204
|
1464
|
+
205
|
1465
|
+
206
|
1466
|
+
207
|
1467
|
+
208</pre>
|
1250
1468
|
</td>
|
1251
1469
|
<td>
|
1252
|
-
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line
|
1470
|
+
<pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 188</span>
|
1253
1471
|
|
1254
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span
|
1472
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_string'>string</span>
|
1255
1473
|
<span class='id identifier rubyid_create_socket'>create_socket</span> <span class='kw'>unless</span> <span class='ivar'>@persistent</span>
|
1256
1474
|
|
1257
1475
|
<span class='id identifier rubyid_num_bytes'>num_bytes</span> <span class='op'>=</span> <span class='int'>0</span>
|
@@ -1282,9 +1500,9 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
|
|
1282
1500
|
</div>
|
1283
1501
|
|
1284
1502
|
<div id="footer">
|
1285
|
-
Generated on
|
1503
|
+
Generated on Fri Apr 11 21:18:17 2014 by
|
1286
1504
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1287
|
-
0.8.7.
|
1505
|
+
0.8.7.4 (ruby-2.1.1).
|
1288
1506
|
</div>
|
1289
1507
|
|
1290
1508
|
</body>
|
data/doc/Ionian.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ionian
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '';
|
20
|
-
framesUrl = "frames.html#!"
|
20
|
+
framesUrl = "frames.html#!Ionian.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -123,9 +123,9 @@ Features regular expression matching and notification of received data.</p>
|
|
123
123
|
</div>
|
124
124
|
|
125
125
|
<div id="footer">
|
126
|
-
Generated on
|
126
|
+
Generated on Fri Apr 11 21:18:17 2014 by
|
127
127
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
128
|
-
0.8.7.
|
128
|
+
0.8.7.4 (ruby-2.1.1).
|
129
129
|
</div>
|
130
130
|
|
131
131
|
</body>
|