firescan 0.07
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.
- data/LICENSE.txt +202 -0
- data/README.txt +37 -0
- data/USAGE.txt +43 -0
- data/VERSION.txt +4 -0
- data/bin/firescan +4 -0
- data/build +7 -0
- data/doc/Example.html +224 -0
- data/doc/Firebind.html +213 -0
- data/doc/Firebind/Client.html +750 -0
- data/doc/Firebind/Portspec.html +390 -0
- data/doc/Firebind/Scan.html +413 -0
- data/doc/Firebind/ScanError.html +277 -0
- data/doc/Firebind/ScanState.html +1015 -0
- data/doc/Firebind/SimpleProtocol.html +292 -0
- data/doc/Firebind/TcpTransport.html +481 -0
- data/doc/Firebind/Transport.html +275 -0
- data/doc/Firebind/UdpTransport.html +472 -0
- data/doc/LICENSE_txt.html +323 -0
- data/doc/README_txt.html +171 -0
- data/doc/Runner.html +166 -0
- data/doc/TestPortspec.html +289 -0
- data/doc/Tools.html +321 -0
- data/doc/USAGE_txt.html +184 -0
- data/doc/VERSION_txt.html +126 -0
- data/doc/build.html +125 -0
- data/doc/created.rid +22 -0
- data/doc/doc/created_rid.html +121 -0
- data/doc/firescan_gemspec.html +140 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +118 -0
- data/doc/js/darkfish.js +155 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +595 -0
- data/doc/table_of_contents.html +230 -0
- data/firescan.gemspec +18 -0
- data/lib/example.rb +20 -0
- data/lib/firebind/client.rb +308 -0
- data/lib/firebind/portspec.rb +107 -0
- data/lib/firebind/scan.rb +288 -0
- data/lib/firebind/scan_error.rb +32 -0
- data/lib/firebind/scan_state.rb +140 -0
- data/lib/firebind/simple_protocol.rb +59 -0
- data/lib/firebind/tcp_transport.rb +184 -0
- data/lib/firebind/tools.rb +107 -0
- data/lib/firebind/transport.rb +44 -0
- data/lib/firebind/udp_transport.rb +174 -0
- data/test/portspec_test.rb +53 -0
- data/test/runner.rb +7 -0
- metadata +136 -0
@@ -0,0 +1,390 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class Firebind::Portspec - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/firebind/portspec.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
<nav id="parent-class-section" class="section">
|
62
|
+
<h3 class="section-header">Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">Object
|
65
|
+
|
66
|
+
</nav>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<nav id="method-list-section" class="section">
|
72
|
+
<h3 class="section-header">Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list">
|
75
|
+
|
76
|
+
<li ><a href="#method-c-new">::new</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-i-size">#size</a>
|
79
|
+
|
80
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
81
|
+
|
82
|
+
</ul>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="project-metadata">
|
88
|
+
<nav id="fileindex-section" class="section project-section">
|
89
|
+
<h3 class="section-header">Pages</h3>
|
90
|
+
|
91
|
+
<ul>
|
92
|
+
|
93
|
+
<li class="file"><a href="../LICENSE_txt.html">LICENSE</a>
|
94
|
+
|
95
|
+
<li class="file"><a href="../README_txt.html">README</a>
|
96
|
+
|
97
|
+
<li class="file"><a href="../USAGE_txt.html">USAGE</a>
|
98
|
+
|
99
|
+
<li class="file"><a href="../VERSION_txt.html">VERSION</a>
|
100
|
+
|
101
|
+
<li class="file"><a href="../build.html">build</a>
|
102
|
+
|
103
|
+
<li class="file"><a href="../doc/created_rid.html">created.rid</a>
|
104
|
+
|
105
|
+
<li class="file"><a href="../firescan_gemspec.html">firescan.gemspec</a>
|
106
|
+
|
107
|
+
</ul>
|
108
|
+
</nav>
|
109
|
+
|
110
|
+
<nav id="classindex-section" class="section project-section">
|
111
|
+
<h3 class="section-header">Class and Module Index</h3>
|
112
|
+
|
113
|
+
<ul class="link-list">
|
114
|
+
|
115
|
+
<li><a href="../Example.html">Example</a>
|
116
|
+
|
117
|
+
<li><a href="../Firebind.html">Firebind</a>
|
118
|
+
|
119
|
+
<li><a href="../Firebind/Client.html">Firebind::Client</a>
|
120
|
+
|
121
|
+
<li><a href="../Firebind/Portspec.html">Firebind::Portspec</a>
|
122
|
+
|
123
|
+
<li><a href="../Firebind/Scan.html">Firebind::Scan</a>
|
124
|
+
|
125
|
+
<li><a href="../Firebind/ScanError.html">Firebind::ScanError</a>
|
126
|
+
|
127
|
+
<li><a href="../Firebind/ScanState.html">Firebind::ScanState</a>
|
128
|
+
|
129
|
+
<li><a href="../Firebind/SimpleProtocol.html">Firebind::SimpleProtocol</a>
|
130
|
+
|
131
|
+
<li><a href="../Firebind/TcpTransport.html">Firebind::TcpTransport</a>
|
132
|
+
|
133
|
+
<li><a href="../Firebind/Transport.html">Firebind::Transport</a>
|
134
|
+
|
135
|
+
<li><a href="../Firebind/UdpTransport.html">Firebind::UdpTransport</a>
|
136
|
+
|
137
|
+
<li><a href="../Runner.html">Runner</a>
|
138
|
+
|
139
|
+
<li><a href="../TestPortspec.html">TestPortspec</a>
|
140
|
+
|
141
|
+
<li><a href="../Tools.html">Tools</a>
|
142
|
+
|
143
|
+
</ul>
|
144
|
+
</nav>
|
145
|
+
|
146
|
+
</div>
|
147
|
+
</nav>
|
148
|
+
|
149
|
+
<div id="documentation">
|
150
|
+
<h1 class="class">class Firebind::Portspec</h1>
|
151
|
+
|
152
|
+
<div id="description" class="description">
|
153
|
+
|
154
|
+
<p>This data structure encapsulates the properties and operations of a port
|
155
|
+
list. Arbitrary lists of comma separated and dashed-ranges can be converted
|
156
|
+
into a full array of ports for a list. This class will eventually require
|
157
|
+
the full complement of set arithmetic</p>
|
158
|
+
|
159
|
+
</div><!-- description -->
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
<!-- Attributes -->
|
173
|
+
<section id="attribute-method-details" class="method-section section">
|
174
|
+
<h3 class="section-header">Attributes</h3>
|
175
|
+
|
176
|
+
|
177
|
+
<div id="attribute-i-compiled_list" class="method-detail">
|
178
|
+
<div class="method-heading attribute-method-heading">
|
179
|
+
<span class="method-name">compiled_list</span><span
|
180
|
+
class="attribute-access-type">[R]</span>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<div class="method-description">
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
</div>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
<div id="attribute-i-ports" class="method-detail">
|
191
|
+
<div class="method-heading attribute-method-heading">
|
192
|
+
<span class="method-name">ports</span><span
|
193
|
+
class="attribute-access-type">[R]</span>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
<div class="method-description">
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
</div>
|
201
|
+
</div>
|
202
|
+
|
203
|
+
</section><!-- attribute-method-details -->
|
204
|
+
|
205
|
+
|
206
|
+
<!-- Methods -->
|
207
|
+
|
208
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
209
|
+
<h3 class="section-header">Public Class Methods</h3>
|
210
|
+
|
211
|
+
|
212
|
+
<div id="method-c-new" class="method-detail ">
|
213
|
+
|
214
|
+
<div class="method-heading">
|
215
|
+
<span class="method-name">new</span><span
|
216
|
+
class="method-args">(port_list)</span>
|
217
|
+
|
218
|
+
<span class="method-click-advice">click to toggle source</span>
|
219
|
+
|
220
|
+
</div>
|
221
|
+
|
222
|
+
|
223
|
+
<div class="method-description">
|
224
|
+
|
225
|
+
<p>Supply either a string or int array examples: 1,2,3,55,10-20 or
|
226
|
+
[56,34,443,25,6000]</p>
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
<div class="method-source-code" id="new-source">
|
232
|
+
<pre><span class="ruby-comment"># File lib/firebind/portspec.rb, line 28</span>
|
233
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">port_list</span>)
|
234
|
+
|
235
|
+
<span class="ruby-identifier">port_map</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
236
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">port_list</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-comment"># numeric array, possible dups and out of range values</span>
|
237
|
+
<span class="ruby-identifier">port_list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">port</span><span class="ruby-operator">|</span>
|
238
|
+
<span class="ruby-identifier">port_map</span>[<span class="ruby-identifier">port</span>] = <span class="ruby-identifier">port</span>
|
239
|
+
<span class="ruby-keyword">end</span>
|
240
|
+
|
241
|
+
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">port_list</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">String</span>) <span class="ruby-comment"># comma and dash port list, possible dups and out of range values</span>
|
242
|
+
<span class="ruby-comment">#validate</span>
|
243
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">port_list</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp">/^[0-9,\-]+$/</span>
|
244
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">'Bad port specification '</span><span class="ruby-operator">+</span><span class="ruby-identifier">port_list</span>, <span class="ruby-identifier">caller</span>
|
245
|
+
<span class="ruby-keyword">end</span>
|
246
|
+
<span class="ruby-identifier">port_list</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/\s*,\s*/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span>
|
247
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">part</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/[\-]+/</span> <span class="ruby-comment"># is this a range?</span>
|
248
|
+
<span class="ruby-identifier">first</span>,<span class="ruby-identifier">last</span> = <span class="ruby-identifier">part</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/\-/</span>)
|
249
|
+
<span class="ruby-comment">#noinspection RubyForLoopInspection</span>
|
250
|
+
<span class="ruby-keyword">for</span> <span class="ruby-identifier">port</span> <span class="ruby-keyword">in</span> <span class="ruby-identifier">first</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/[^0-9]/</span>,<span class="ruby-string">''</span>).<span class="ruby-identifier">to_i</span><span class="ruby-operator">..</span><span class="ruby-identifier">last</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/[^0-9]/</span>,<span class="ruby-string">''</span>).<span class="ruby-identifier">to_i</span>
|
251
|
+
<span class="ruby-identifier">port_map</span>[<span class="ruby-identifier">port</span>] = <span class="ruby-identifier">port</span>
|
252
|
+
<span class="ruby-keyword">end</span>
|
253
|
+
<span class="ruby-keyword">else</span>
|
254
|
+
<span class="ruby-identifier">port</span> = <span class="ruby-identifier">part</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/[^0-9]/</span>,<span class="ruby-string">''</span>).<span class="ruby-identifier">to_i</span>
|
255
|
+
<span class="ruby-identifier">port_map</span>[<span class="ruby-identifier">port</span>] = <span class="ruby-identifier">port</span>
|
256
|
+
<span class="ruby-keyword">end</span>
|
257
|
+
<span class="ruby-keyword">end</span>
|
258
|
+
<span class="ruby-keyword">end</span>
|
259
|
+
|
260
|
+
<span class="ruby-comment"># sort the map and insert the expanded port list into our @ports array</span>
|
261
|
+
<span class="ruby-ivar">@ports</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
262
|
+
<span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
|
263
|
+
<span class="ruby-identifier">port_map</span>.<span class="ruby-identifier">sort_by</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">number</span>,<span class="ruby-identifier">flag</span><span class="ruby-operator">|</span><span class="ruby-identifier">number</span>}.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">port</span>,<span class="ruby-identifier">flag</span><span class="ruby-operator">|</span>
|
264
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">port</span> <span class="ruby-operator"><</span> <span class="ruby-value">1</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">port</span> <span class="ruby-operator">></span> <span class="ruby-value">65535</span>
|
265
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">'Bad port number '</span><span class="ruby-operator">+</span><span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">caller</span>
|
266
|
+
<span class="ruby-keyword">end</span>
|
267
|
+
<span class="ruby-ivar">@ports</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">port</span>
|
268
|
+
<span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
269
|
+
<span class="ruby-keyword">end</span>
|
270
|
+
|
271
|
+
<span class="ruby-comment"># generate a compiled port specification based on the ordered list in array</span>
|
272
|
+
<span class="ruby-identifier">last_port</span> = <span class="ruby-value">-1</span>
|
273
|
+
<span class="ruby-identifier">building_a_range</span> = <span class="ruby-keyword">false</span>
|
274
|
+
<span class="ruby-ivar">@compiled_list</span> = <span class="ruby-string">''</span>
|
275
|
+
<span class="ruby-ivar">@ports</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">port</span>,<span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
|
276
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">port</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">last_port</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>)
|
277
|
+
<span class="ruby-comment"># continue building range</span>
|
278
|
+
<span class="ruby-identifier">building_a_range</span> = <span class="ruby-keyword">true</span>
|
279
|
+
<span class="ruby-comment"># are we at the end of the array? if so we're not coming back here...</span>
|
280
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">index</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@ports</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>
|
281
|
+
<span class="ruby-ivar">@compiled_list</span> <span class="ruby-operator">+=</span> <span class="ruby-string">'-'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_s</span>
|
282
|
+
<span class="ruby-keyword">end</span>
|
283
|
+
<span class="ruby-keyword">else</span>
|
284
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">building_a_range</span>
|
285
|
+
<span class="ruby-comment"># end of the range</span>
|
286
|
+
<span class="ruby-ivar">@compiled_list</span> <span class="ruby-operator">+=</span> <span class="ruby-string">'-'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">last_port</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-string">','</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_s</span>
|
287
|
+
<span class="ruby-identifier">building_a_range</span> = <span class="ruby-keyword">false</span>
|
288
|
+
<span class="ruby-keyword">else</span>
|
289
|
+
<span class="ruby-ivar">@compiled_list</span> <span class="ruby-operator">+=</span> <span class="ruby-string">','</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@compiled_list</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
290
|
+
<span class="ruby-ivar">@compiled_list</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_s</span>
|
291
|
+
<span class="ruby-keyword">end</span>
|
292
|
+
<span class="ruby-keyword">end</span>
|
293
|
+
<span class="ruby-identifier">last_port</span> = <span class="ruby-identifier">port</span>
|
294
|
+
<span class="ruby-keyword">end</span>
|
295
|
+
<span class="ruby-keyword">end</span></pre>
|
296
|
+
</div><!-- new-source -->
|
297
|
+
|
298
|
+
</div>
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
</div><!-- new-method -->
|
304
|
+
|
305
|
+
|
306
|
+
</section><!-- public-class-method-details -->
|
307
|
+
|
308
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
309
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
310
|
+
|
311
|
+
|
312
|
+
<div id="method-i-size" class="method-detail ">
|
313
|
+
|
314
|
+
<div class="method-heading">
|
315
|
+
<span class="method-name">size</span><span
|
316
|
+
class="method-args">()</span>
|
317
|
+
|
318
|
+
<span class="method-click-advice">click to toggle source</span>
|
319
|
+
|
320
|
+
</div>
|
321
|
+
|
322
|
+
|
323
|
+
<div class="method-description">
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
<div class="method-source-code" id="size-source">
|
331
|
+
<pre><span class="ruby-comment"># File lib/firebind/portspec.rb, line 96</span>
|
332
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">size</span>
|
333
|
+
<span class="ruby-ivar">@ports</span>.<span class="ruby-identifier">length</span>
|
334
|
+
<span class="ruby-keyword">end</span></pre>
|
335
|
+
</div><!-- size-source -->
|
336
|
+
|
337
|
+
</div>
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
</div><!-- size-method -->
|
343
|
+
|
344
|
+
|
345
|
+
<div id="method-i-to_s" class="method-detail ">
|
346
|
+
|
347
|
+
<div class="method-heading">
|
348
|
+
<span class="method-name">to_s</span><span
|
349
|
+
class="method-args">()</span>
|
350
|
+
|
351
|
+
<span class="method-click-advice">click to toggle source</span>
|
352
|
+
|
353
|
+
</div>
|
354
|
+
|
355
|
+
|
356
|
+
<div class="method-description">
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
<div class="method-source-code" id="to_s-source">
|
364
|
+
<pre><span class="ruby-comment"># File lib/firebind/portspec.rb, line 92</span>
|
365
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
366
|
+
<span class="ruby-ivar">@compiled_list</span>
|
367
|
+
<span class="ruby-keyword">end</span></pre>
|
368
|
+
</div><!-- to_s-source -->
|
369
|
+
|
370
|
+
</div>
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
</div><!-- to_s-method -->
|
376
|
+
|
377
|
+
|
378
|
+
</section><!-- public-instance-method-details -->
|
379
|
+
|
380
|
+
</section><!-- 5Buntitled-5D -->
|
381
|
+
|
382
|
+
</div><!-- documentation -->
|
383
|
+
|
384
|
+
|
385
|
+
<footer id="validator-badges">
|
386
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
387
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
|
388
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
389
|
+
</footer>
|
390
|
+
|
@@ -0,0 +1,413 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class Firebind::Scan - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/firebind/scan.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
<nav id="parent-class-section" class="section">
|
62
|
+
<h3 class="section-header">Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">Object
|
65
|
+
|
66
|
+
</nav>
|
67
|
+
|
68
|
+
<!-- Included Modules -->
|
69
|
+
<nav id="includes-section" class="section">
|
70
|
+
<h3 class="section-header">Included Modules</h3>
|
71
|
+
|
72
|
+
<ul class="link-list">
|
73
|
+
|
74
|
+
|
75
|
+
<li><span class="include">Observable</span>
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<li><a class="include" href="../Tools.html">Tools</a>
|
80
|
+
|
81
|
+
|
82
|
+
</ul>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
|
86
|
+
<!-- Method Quickref -->
|
87
|
+
<nav id="method-list-section" class="section">
|
88
|
+
<h3 class="section-header">Methods</h3>
|
89
|
+
|
90
|
+
<ul class="link-list">
|
91
|
+
|
92
|
+
<li ><a href="#method-c-new">::new</a>
|
93
|
+
|
94
|
+
<li ><a href="#method-i-scan">#scan</a>
|
95
|
+
|
96
|
+
<li ><a href="#method-i-stop">#stop</a>
|
97
|
+
|
98
|
+
</ul>
|
99
|
+
</nav>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div id="project-metadata">
|
104
|
+
<nav id="fileindex-section" class="section project-section">
|
105
|
+
<h3 class="section-header">Pages</h3>
|
106
|
+
|
107
|
+
<ul>
|
108
|
+
|
109
|
+
<li class="file"><a href="../LICENSE_txt.html">LICENSE</a>
|
110
|
+
|
111
|
+
<li class="file"><a href="../README_txt.html">README</a>
|
112
|
+
|
113
|
+
<li class="file"><a href="../USAGE_txt.html">USAGE</a>
|
114
|
+
|
115
|
+
<li class="file"><a href="../VERSION_txt.html">VERSION</a>
|
116
|
+
|
117
|
+
<li class="file"><a href="../build.html">build</a>
|
118
|
+
|
119
|
+
<li class="file"><a href="../doc/created_rid.html">created.rid</a>
|
120
|
+
|
121
|
+
<li class="file"><a href="../firescan_gemspec.html">firescan.gemspec</a>
|
122
|
+
|
123
|
+
</ul>
|
124
|
+
</nav>
|
125
|
+
|
126
|
+
<nav id="classindex-section" class="section project-section">
|
127
|
+
<h3 class="section-header">Class and Module Index</h3>
|
128
|
+
|
129
|
+
<ul class="link-list">
|
130
|
+
|
131
|
+
<li><a href="../Example.html">Example</a>
|
132
|
+
|
133
|
+
<li><a href="../Firebind.html">Firebind</a>
|
134
|
+
|
135
|
+
<li><a href="../Firebind/Client.html">Firebind::Client</a>
|
136
|
+
|
137
|
+
<li><a href="../Firebind/Portspec.html">Firebind::Portspec</a>
|
138
|
+
|
139
|
+
<li><a href="../Firebind/Scan.html">Firebind::Scan</a>
|
140
|
+
|
141
|
+
<li><a href="../Firebind/ScanError.html">Firebind::ScanError</a>
|
142
|
+
|
143
|
+
<li><a href="../Firebind/ScanState.html">Firebind::ScanState</a>
|
144
|
+
|
145
|
+
<li><a href="../Firebind/SimpleProtocol.html">Firebind::SimpleProtocol</a>
|
146
|
+
|
147
|
+
<li><a href="../Firebind/TcpTransport.html">Firebind::TcpTransport</a>
|
148
|
+
|
149
|
+
<li><a href="../Firebind/Transport.html">Firebind::Transport</a>
|
150
|
+
|
151
|
+
<li><a href="../Firebind/UdpTransport.html">Firebind::UdpTransport</a>
|
152
|
+
|
153
|
+
<li><a href="../Runner.html">Runner</a>
|
154
|
+
|
155
|
+
<li><a href="../TestPortspec.html">TestPortspec</a>
|
156
|
+
|
157
|
+
<li><a href="../Tools.html">Tools</a>
|
158
|
+
|
159
|
+
</ul>
|
160
|
+
</nav>
|
161
|
+
|
162
|
+
</div>
|
163
|
+
</nav>
|
164
|
+
|
165
|
+
<div id="documentation">
|
166
|
+
<h1 class="class">class Firebind::Scan</h1>
|
167
|
+
|
168
|
+
<div id="description" class="description">
|
169
|
+
|
170
|
+
<p>This is the primary API object for performing scans. Simply supply the
|
171
|
+
necessary arguments to create a <a href="Scan.html">Scan</a> and call the
|
172
|
+
scan() method</p>
|
173
|
+
|
174
|
+
</div><!-- description -->
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<!-- Methods -->
|
189
|
+
|
190
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
191
|
+
<h3 class="section-header">Public Class Methods</h3>
|
192
|
+
|
193
|
+
|
194
|
+
<div id="method-c-new" class="method-detail ">
|
195
|
+
|
196
|
+
<div class="method-heading">
|
197
|
+
<span class="method-name">new</span><span
|
198
|
+
class="method-args">(command_server, ports, transport, timeout=5000, protocol=:SimpleProtocol, username=NIL, password=NIL)</span>
|
199
|
+
|
200
|
+
<span class="method-click-advice">click to toggle source</span>
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
|
205
|
+
<div class="method-description">
|
206
|
+
|
207
|
+
<p>Create a new <a href="Scan.html">Scan</a></p>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
<div class="method-source-code" id="new-source">
|
213
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan.rb, line 43</span>
|
214
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">command_server</span>, <span class="ruby-identifier">ports</span>, <span class="ruby-identifier">transport</span>, <span class="ruby-identifier">timeout</span>=<span class="ruby-value">5000</span>, <span class="ruby-identifier">protocol</span>=<span class="ruby-value">:SimpleProtocol</span>, <span class="ruby-identifier">username</span>=<span class="ruby-constant">NIL</span>, <span class="ruby-identifier">password</span>=<span class="ruby-constant">NIL</span>)
|
215
|
+
<span class="ruby-ivar">@command_server</span> = <span class="ruby-identifier">command_server</span>
|
216
|
+
<span class="ruby-ivar">@portspec</span> = <span class="ruby-constant">Firebind</span><span class="ruby-operator">::</span><span class="ruby-constant">Portspec</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ports</span>)
|
217
|
+
<span class="ruby-ivar">@timeout</span> = <span class="ruby-identifier">timeout</span>
|
218
|
+
<span class="ruby-ivar">@protocol</span> = <span class="ruby-identifier">protocol</span>
|
219
|
+
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
220
|
+
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
221
|
+
<span class="ruby-ivar">@transport</span> = <span class="ruby-identifier">transport</span>
|
222
|
+
<span class="ruby-ivar">@done</span> = <span class="ruby-keyword">false</span>
|
223
|
+
<span class="ruby-ivar">@state</span> = <span class="ruby-constant">ScanState</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">command_server</span>,<span class="ruby-identifier">protocol</span>,<span class="ruby-identifier">transport</span>,<span class="ruby-ivar">@portspec</span>,<span class="ruby-identifier">timeout</span>)
|
224
|
+
|
225
|
+
|
226
|
+
<span class="ruby-keyword">end</span></pre>
|
227
|
+
</div><!-- new-source -->
|
228
|
+
|
229
|
+
</div>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
</div><!-- new-method -->
|
235
|
+
|
236
|
+
|
237
|
+
</section><!-- public-class-method-details -->
|
238
|
+
|
239
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
240
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
241
|
+
|
242
|
+
|
243
|
+
<div id="method-i-scan" class="method-detail ">
|
244
|
+
|
245
|
+
|
246
|
+
<div class="method-heading">
|
247
|
+
<span class="method-callseq">
|
248
|
+
scan → ScanState
|
249
|
+
</span>
|
250
|
+
|
251
|
+
<span class="method-click-advice">click to toggle source</span>
|
252
|
+
|
253
|
+
</div>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
<div class="method-description">
|
258
|
+
|
259
|
+
<p>Perform the path scan</p>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
<div class="method-source-code" id="scan-source">
|
265
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan.rb, line 62</span>
|
266
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">scan</span>
|
267
|
+
|
268
|
+
<span class="ruby-identifier">api_start</span>
|
269
|
+
<span class="ruby-identifier">changed</span>
|
270
|
+
<span class="ruby-identifier">notify_observers</span>(<span class="ruby-ivar">@state</span>)
|
271
|
+
|
272
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@done</span>
|
273
|
+
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@state</span>
|
274
|
+
<span class="ruby-keyword">end</span>
|
275
|
+
|
276
|
+
<span class="ruby-keyword">case</span> <span class="ruby-ivar">@protocol</span>
|
277
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:SimpleProtocol</span>
|
278
|
+
<span class="ruby-identifier">scan_protocol</span> = <span class="ruby-constant">SimpleProtocol</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">guid</span>,<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">echo_server</span>,<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">transport</span>,<span class="ruby-ivar">@timeout</span>)
|
279
|
+
|
280
|
+
<span class="ruby-keyword">else</span>
|
281
|
+
<span class="ruby-identifier">scan_protocol</span> = <span class="ruby-constant">SimpleProtocol</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">guid</span>,<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">echo_server</span>,<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">transport</span>,<span class="ruby-ivar">@timeout</span>)
|
282
|
+
<span class="ruby-keyword">end</span>
|
283
|
+
|
284
|
+
|
285
|
+
<span class="ruby-ivar">@portspec</span>.<span class="ruby-identifier">ports</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">port</span><span class="ruby-operator">|</span>
|
286
|
+
<span class="ruby-keyword">break</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@done</span>
|
287
|
+
<span class="ruby-keyword">begin</span>
|
288
|
+
|
289
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@state</span>.<span class="ruby-identifier">ports_scanned</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
290
|
+
<span class="ruby-comment"># make sure we don't fry the routers</span>
|
291
|
+
<span class="ruby-identifier">debug</span>(<span class="ruby-node">"waiting #{@state.port_delay_seconds}s for next port echo"</span>)
|
292
|
+
<span class="ruby-constant">IO</span>.<span class="ruby-identifier">select</span>(<span class="ruby-keyword">nil</span>,<span class="ruby-keyword">nil</span>,<span class="ruby-keyword">nil</span>,<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">port_delay_seconds</span>)
|
293
|
+
<span class="ruby-keyword">end</span>
|
294
|
+
|
295
|
+
<span class="ruby-comment"># callback for port start</span>
|
296
|
+
<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">on_port_start</span>(<span class="ruby-identifier">port</span>)
|
297
|
+
<span class="ruby-identifier">changed</span>
|
298
|
+
<span class="ruby-identifier">notify_observers</span>(<span class="ruby-ivar">@state</span>)
|
299
|
+
|
300
|
+
<span class="ruby-comment"># perform the path echo send/receive</span>
|
301
|
+
<span class="ruby-identifier">scan_protocol</span>.<span class="ruby-identifier">echo</span>(<span class="ruby-identifier">port</span>)
|
302
|
+
<span class="ruby-identifier">port_result_code</span> = <span class="ruby-identifier">$result_codes</span>[<span class="ruby-value">:SUCCESS</span>]
|
303
|
+
|
304
|
+
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Firebind</span><span class="ruby-operator">::</span><span class="ruby-constant">ScanError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">error</span>
|
305
|
+
<span class="ruby-identifier">debug</span> <span class="ruby-node">"error on port #{port} #{error.to_s}"</span>
|
306
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">error</span>.<span class="ruby-identifier">status_code</span>
|
307
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:HANDSHAKE_CONNECTION_TIME_OUT</span>,
|
308
|
+
<span class="ruby-value">:HANDSHAKE_CONNECTION_INITIATION_FAILURE</span>,
|
309
|
+
<span class="ruby-value">:HANDSHAKE_CONNECTION_REFUSED</span>,
|
310
|
+
<span class="ruby-value">:HANDSHAKE_CONNECTION_COMPLETION_FAILURE</span>,
|
311
|
+
<span class="ruby-value">:PAYLOAD_REFUSED_ON_RECV</span>,
|
312
|
+
<span class="ruby-value">:PAYLOAD_TIMED_OUT_ON_RECV</span>,
|
313
|
+
<span class="ruby-value">:PAYLOAD_ERROR_ON_RECV</span>,
|
314
|
+
<span class="ruby-value">:PAYLOAD_MISMATCH_ON_RECV</span>,
|
315
|
+
<span class="ruby-value">:FAILURE_ON_PAYLOAD_SEND</span>
|
316
|
+
|
317
|
+
<span class="ruby-comment"># try skipping</span>
|
318
|
+
<span class="ruby-identifier">port_result_code</span> = <span class="ruby-identifier">$result_codes</span>[<span class="ruby-identifier">error</span>.<span class="ruby-identifier">status_code</span>]
|
319
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">api_skip</span> <span class="ruby-identifier">port</span>
|
320
|
+
|
321
|
+
<span class="ruby-keyword">else</span>
|
322
|
+
|
323
|
+
<span class="ruby-keyword">end</span>
|
324
|
+
|
325
|
+
<span class="ruby-keyword">else</span> <span class="ruby-comment"># status_code is not skippable</span>
|
326
|
+
<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">on_error</span>(<span class="ruby-identifier">error</span>.<span class="ruby-identifier">status_code</span>)
|
327
|
+
<span class="ruby-identifier">changed</span>
|
328
|
+
<span class="ruby-identifier">notify_observers</span>(<span class="ruby-ivar">@state</span>)
|
329
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">error</span>
|
330
|
+
|
331
|
+
|
332
|
+
<span class="ruby-keyword">end</span>
|
333
|
+
|
334
|
+
<span class="ruby-keyword">ensure</span>
|
335
|
+
<span class="ruby-comment"># callback for port complete - success/open</span>
|
336
|
+
<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">on_port_complete</span>(<span class="ruby-identifier">port</span>,<span class="ruby-identifier">port_result_code</span>)
|
337
|
+
<span class="ruby-identifier">changed</span>
|
338
|
+
<span class="ruby-identifier">notify_observers</span>(<span class="ruby-ivar">@state</span>)
|
339
|
+
<span class="ruby-keyword">end</span>
|
340
|
+
|
341
|
+
<span class="ruby-keyword">end</span>
|
342
|
+
|
343
|
+
<span class="ruby-identifier">api_update</span>
|
344
|
+
|
345
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@portspec</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@state</span>.<span class="ruby-identifier">ports_scanned</span>
|
346
|
+
<span class="ruby-ivar">@state</span>.<span class="ruby-identifier">on_scan_complete</span>(<span class="ruby-identifier">$client_scan_completed</span>)
|
347
|
+
<span class="ruby-identifier">changed</span>
|
348
|
+
<span class="ruby-identifier">notify_observers</span>(<span class="ruby-ivar">@state</span>)
|
349
|
+
<span class="ruby-keyword">end</span>
|
350
|
+
|
351
|
+
<span class="ruby-comment">#update</span>
|
352
|
+
<span class="ruby-ivar">@state</span>
|
353
|
+
<span class="ruby-keyword">end</span></pre>
|
354
|
+
</div><!-- scan-source -->
|
355
|
+
|
356
|
+
</div>
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
</div><!-- scan-method -->
|
362
|
+
|
363
|
+
|
364
|
+
<div id="method-i-stop" class="method-detail ">
|
365
|
+
|
366
|
+
<div class="method-heading">
|
367
|
+
<span class="method-name">stop</span><span
|
368
|
+
class="method-args">()</span>
|
369
|
+
|
370
|
+
<span class="method-click-advice">click to toggle source</span>
|
371
|
+
|
372
|
+
</div>
|
373
|
+
|
374
|
+
|
375
|
+
<div class="method-description">
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
<div class="method-source-code" id="stop-source">
|
383
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan.rb, line 151</span>
|
384
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">stop</span>
|
385
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">'setting flags'</span>
|
386
|
+
<span class="ruby-ivar">@stop_requested</span> = <span class="ruby-keyword">true</span>
|
387
|
+
<span class="ruby-ivar">@done</span> = <span class="ruby-keyword">true</span>
|
388
|
+
<span class="ruby-identifier">api_stop</span>
|
389
|
+
<span class="ruby-identifier">api_update</span>
|
390
|
+
<span class="ruby-keyword">end</span></pre>
|
391
|
+
</div><!-- stop-source -->
|
392
|
+
|
393
|
+
</div>
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
</div><!-- stop-method -->
|
399
|
+
|
400
|
+
|
401
|
+
</section><!-- public-instance-method-details -->
|
402
|
+
|
403
|
+
</section><!-- 5Buntitled-5D -->
|
404
|
+
|
405
|
+
</div><!-- documentation -->
|
406
|
+
|
407
|
+
|
408
|
+
<footer id="validator-badges">
|
409
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
410
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
|
411
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
412
|
+
</footer>
|
413
|
+
|