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.
Files changed (77) hide show
  1. data/LICENSE.txt +202 -0
  2. data/README.txt +37 -0
  3. data/USAGE.txt +43 -0
  4. data/VERSION.txt +4 -0
  5. data/bin/firescan +4 -0
  6. data/build +7 -0
  7. data/doc/Example.html +224 -0
  8. data/doc/Firebind.html +213 -0
  9. data/doc/Firebind/Client.html +750 -0
  10. data/doc/Firebind/Portspec.html +390 -0
  11. data/doc/Firebind/Scan.html +413 -0
  12. data/doc/Firebind/ScanError.html +277 -0
  13. data/doc/Firebind/ScanState.html +1015 -0
  14. data/doc/Firebind/SimpleProtocol.html +292 -0
  15. data/doc/Firebind/TcpTransport.html +481 -0
  16. data/doc/Firebind/Transport.html +275 -0
  17. data/doc/Firebind/UdpTransport.html +472 -0
  18. data/doc/LICENSE_txt.html +323 -0
  19. data/doc/README_txt.html +171 -0
  20. data/doc/Runner.html +166 -0
  21. data/doc/TestPortspec.html +289 -0
  22. data/doc/Tools.html +321 -0
  23. data/doc/USAGE_txt.html +184 -0
  24. data/doc/VERSION_txt.html +126 -0
  25. data/doc/build.html +125 -0
  26. data/doc/created.rid +22 -0
  27. data/doc/doc/created_rid.html +121 -0
  28. data/doc/firescan_gemspec.html +140 -0
  29. data/doc/images/add.png +0 -0
  30. data/doc/images/arrow_up.png +0 -0
  31. data/doc/images/brick.png +0 -0
  32. data/doc/images/brick_link.png +0 -0
  33. data/doc/images/bug.png +0 -0
  34. data/doc/images/bullet_black.png +0 -0
  35. data/doc/images/bullet_toggle_minus.png +0 -0
  36. data/doc/images/bullet_toggle_plus.png +0 -0
  37. data/doc/images/date.png +0 -0
  38. data/doc/images/delete.png +0 -0
  39. data/doc/images/find.png +0 -0
  40. data/doc/images/loadingAnimation.gif +0 -0
  41. data/doc/images/macFFBgHack.png +0 -0
  42. data/doc/images/package.png +0 -0
  43. data/doc/images/page_green.png +0 -0
  44. data/doc/images/page_white_text.png +0 -0
  45. data/doc/images/page_white_width.png +0 -0
  46. data/doc/images/plugin.png +0 -0
  47. data/doc/images/ruby.png +0 -0
  48. data/doc/images/tag_blue.png +0 -0
  49. data/doc/images/tag_green.png +0 -0
  50. data/doc/images/transparent.png +0 -0
  51. data/doc/images/wrench.png +0 -0
  52. data/doc/images/wrench_orange.png +0 -0
  53. data/doc/images/zoom.png +0 -0
  54. data/doc/index.html +118 -0
  55. data/doc/js/darkfish.js +155 -0
  56. data/doc/js/jquery.js +18 -0
  57. data/doc/js/navigation.js +142 -0
  58. data/doc/js/search.js +94 -0
  59. data/doc/js/search_index.js +1 -0
  60. data/doc/js/searcher.js +228 -0
  61. data/doc/rdoc.css +595 -0
  62. data/doc/table_of_contents.html +230 -0
  63. data/firescan.gemspec +18 -0
  64. data/lib/example.rb +20 -0
  65. data/lib/firebind/client.rb +308 -0
  66. data/lib/firebind/portspec.rb +107 -0
  67. data/lib/firebind/scan.rb +288 -0
  68. data/lib/firebind/scan_error.rb +32 -0
  69. data/lib/firebind/scan_state.rb +140 -0
  70. data/lib/firebind/simple_protocol.rb +59 -0
  71. data/lib/firebind/tcp_transport.rb +184 -0
  72. data/lib/firebind/tools.rb +107 -0
  73. data/lib/firebind/transport.rb +44 -0
  74. data/lib/firebind/udp_transport.rb +174 -0
  75. data/test/portspec_test.rb +53 -0
  76. data/test/runner.rb +7 -0
  77. metadata +136 -0
@@ -0,0 +1,323 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>LICENSE - 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 class="file">
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="project-metadata">
49
+ <nav id="fileindex-section" class="section project-section">
50
+ <h3 class="section-header">Pages</h3>
51
+
52
+ <ul>
53
+
54
+ <li class="file"><a href="./LICENSE_txt.html">LICENSE</a>
55
+
56
+ <li class="file"><a href="./README_txt.html">README</a>
57
+
58
+ <li class="file"><a href="./USAGE_txt.html">USAGE</a>
59
+
60
+ <li class="file"><a href="./VERSION_txt.html">VERSION</a>
61
+
62
+ <li class="file"><a href="./build.html">build</a>
63
+
64
+ <li class="file"><a href="./doc/created_rid.html">created.rid</a>
65
+
66
+ <li class="file"><a href="./firescan_gemspec.html">firescan.gemspec</a>
67
+
68
+ </ul>
69
+ </nav>
70
+
71
+ <nav id="classindex-section" class="section project-section">
72
+ <h3 class="section-header">Class and Module Index</h3>
73
+
74
+ <ul class="link-list">
75
+
76
+ <li><a href="./Example.html">Example</a>
77
+
78
+ <li><a href="./Firebind.html">Firebind</a>
79
+
80
+ <li><a href="./Firebind/Client.html">Firebind::Client</a>
81
+
82
+ <li><a href="./Firebind/Portspec.html">Firebind::Portspec</a>
83
+
84
+ <li><a href="./Firebind/Scan.html">Firebind::Scan</a>
85
+
86
+ <li><a href="./Firebind/ScanError.html">Firebind::ScanError</a>
87
+
88
+ <li><a href="./Firebind/ScanState.html">Firebind::ScanState</a>
89
+
90
+ <li><a href="./Firebind/SimpleProtocol.html">Firebind::SimpleProtocol</a>
91
+
92
+ <li><a href="./Firebind/TcpTransport.html">Firebind::TcpTransport</a>
93
+
94
+ <li><a href="./Firebind/Transport.html">Firebind::Transport</a>
95
+
96
+ <li><a href="./Firebind/UdpTransport.html">Firebind::UdpTransport</a>
97
+
98
+ <li><a href="./Runner.html">Runner</a>
99
+
100
+ <li><a href="./TestPortspec.html">TestPortspec</a>
101
+
102
+ <li><a href="./Tools.html">Tools</a>
103
+
104
+ </ul>
105
+ </nav>
106
+
107
+ </div>
108
+ </nav>
109
+
110
+ <div id="documentation" class="description">
111
+
112
+ <pre> Apache License
113
+ Version 2.0, January 2004
114
+ http://www.apache.org/licenses/</pre>
115
+
116
+ <p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
117
+ <ol><li>
118
+ <p>Definitions.</p>
119
+
120
+ <p>“License” shall mean the terms and conditions for use, reproduction, and
121
+ distribution as defined by Sections 1 through 9 of this document.</p>
122
+
123
+ <p>“Licensor” shall mean the copyright owner or entity authorized by the
124
+ copyright owner that is granting the License.</p>
125
+
126
+ <p>“Legal Entity” shall mean the union of the acting entity and all other
127
+ entities that control, are controlled by, or are under common control with
128
+ that entity. For the purposes of this definition, “control” means (i) the
129
+ power, direct or indirect, to cause the direction or management of such
130
+ entity, whether by contract or otherwise, or (ii) ownership of fifty
131
+ percent (50%) or more of the outstanding shares, or (iii) beneficial
132
+ ownership of such entity.</p>
133
+
134
+ <p>“You” (or “Your”) shall mean an individual or Legal Entity exercising
135
+ permissions granted by this License.</p>
136
+
137
+ <p>“Source” form shall mean the preferred form for making modifications,
138
+ including but not limited to software source code, documentation source,
139
+ and configuration files.</p>
140
+
141
+ <p>“Object” form shall mean any form resulting from mechanical transformation
142
+ or translation of a Source form, including but not limited to compiled
143
+ object code, generated documentation, and conversions to other media types.</p>
144
+
145
+ <p>“Work” shall mean the work of authorship, whether in Source or Object form,
146
+ made available under the License, as indicated by a copyright notice that
147
+ is included in or attached to the work (an example is provided in the
148
+ Appendix below).</p>
149
+
150
+ <p>“Derivative Works” shall mean any work, whether in Source or Object form,
151
+ that is based on (or derived from) the Work and for which the editorial
152
+ revisions, annotations, elaborations, or other modifications represent, as
153
+ a whole, an original work of authorship. For the purposes of this License,
154
+ Derivative Works shall not include works that remain separable from, or
155
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
156
+ Works thereof.</p>
157
+
158
+ <p>“Contribution” shall mean any work of authorship, including the original
159
+ version of the Work and any modifications or additions to that Work or
160
+ Derivative Works thereof, that is intentionally submitted to Licensor for
161
+ inclusion in the Work by the copyright owner or by an individual or Legal
162
+ Entity authorized to submit on behalf of the copyright owner. For the
163
+ purposes of this definition, “submitted” means any form of electronic,
164
+ verbal, or written communication sent to the Licensor or its
165
+ representatives, including but not limited to communication on electronic
166
+ mailing lists, source code control systems, and issue tracking systems that
167
+ are managed by, or on behalf of, the Licensor for the purpose of discussing
168
+ and improving the Work, but excluding communication that is conspicuously
169
+ marked or otherwise designated in writing by the copyright owner as “Not a
170
+ Contribution.”</p>
171
+
172
+ <p>“Contributor” shall mean Licensor and any individual or Legal Entity on
173
+ behalf of whom a Contribution has been received by Licensor and
174
+ subsequently incorporated within the Work.</p>
175
+ </li><li>
176
+ <p>Grant of Copyright License. Subject to the terms and conditions of this
177
+ License, each Contributor hereby grants to You a perpetual, worldwide,
178
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
179
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
180
+ sublicense, and distribute the Work and such Derivative Works in Source or
181
+ Object form.</p>
182
+ </li><li>
183
+ <p>Grant of Patent License. Subject to the terms and conditions of this
184
+ License, each Contributor hereby grants to You a perpetual, worldwide,
185
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
186
+ this section) patent license to make, have made, use, offer to sell, sell,
187
+ import, and otherwise transfer the Work, where such license applies only to
188
+ those patent claims licensable by such Contributor that are necessarily
189
+ infringed by their Contribution(s) alone or by combination of their
190
+ Contribution(s) with the Work to which such Contribution(s) was submitted.
191
+ If You institute patent litigation against any entity (including a
192
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or a
193
+ Contribution incorporated within the Work constitutes direct or
194
+ contributory patent infringement, then any patent licenses granted to You
195
+ under this License for that Work shall terminate as of the date such
196
+ litigation is filed.</p>
197
+ </li><li>
198
+ <p>Redistribution. You may reproduce and distribute copies of the Work or
199
+ Derivative Works thereof in any medium, with or without modifications, and
200
+ in Source or Object form, provided that You meet the following conditions:</p>
201
+
202
+ <p>(a) You must give any other recipients of the Work or</p>
203
+
204
+ <pre>Derivative Works a copy of this License; and</pre>
205
+
206
+ <p>(b) You must cause any modified files to carry prominent notices</p>
207
+
208
+ <pre>stating that You changed the files; and</pre>
209
+
210
+ <p>© You must retain, in the Source form of any Derivative Works</p>
211
+
212
+ <pre>that You distribute, all copyright, patent, trademark, and
213
+ attribution notices from the Source form of the Work,
214
+ excluding those notices that do not pertain to any part of
215
+ the Derivative Works; and</pre>
216
+
217
+ <p>(d) If the Work includes a “NOTICE” text file as part of its</p>
218
+
219
+ <pre>distribution, then any Derivative Works that You distribute must
220
+ include a readable copy of the attribution notices contained
221
+ within such NOTICE file, excluding those notices that do not
222
+ pertain to any part of the Derivative Works, in at least one
223
+ of the following places: within a NOTICE text file distributed
224
+ as part of the Derivative Works; within the Source form or
225
+ documentation, if provided along with the Derivative Works; or,
226
+ within a display generated by the Derivative Works, if and
227
+ wherever such third-party notices normally appear. The contents
228
+ of the NOTICE file are for informational purposes only and
229
+ do not modify the License. You may add Your own attribution
230
+ notices within Derivative Works that You distribute, alongside
231
+ or as an addendum to the NOTICE text from the Work, provided
232
+ that such additional attribution notices cannot be construed
233
+ as modifying the License.</pre>
234
+
235
+ <p>You may add Your own copyright statement to Your modifications and may
236
+ provide additional or different license terms and conditions for use,
237
+ reproduction, or distribution of Your modifications, or for any such
238
+ Derivative Works as a whole, provided Your use, reproduction, and
239
+ distribution of the Work otherwise complies with the conditions stated in
240
+ this License.</p>
241
+ </li><li>
242
+ <p>Submission of Contributions. Unless You explicitly state otherwise, any
243
+ Contribution intentionally submitted for inclusion in the Work by You to
244
+ the Licensor shall be under the terms and conditions of this License,
245
+ without any additional terms or conditions. Notwithstanding the above,
246
+ nothing herein shall supersede or modify the terms of any separate license
247
+ agreement you may have executed with Licensor regarding such Contributions.</p>
248
+ </li><li>
249
+ <p>Trademarks. This License does not grant permission to use the trade names,
250
+ trademarks, service marks, or product names of the Licensor, except as
251
+ required for reasonable and customary use in describing the origin of the
252
+ Work and reproducing the content of the NOTICE file.</p>
253
+ </li><li>
254
+ <p>Disclaimer of Warranty. Unless required by applicable law or agreed to in
255
+ writing, Licensor provides the Work (and each Contributor provides its
256
+ Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
257
+ KIND, either express or implied, including, without limitation, any
258
+ warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
259
+ FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for
260
+ determining the appropriateness of using or redistributing the Work and
261
+ assume any risks associated with Your exercise of permissions under this
262
+ License.</p>
263
+ </li><li>
264
+ <p>Limitation of Liability. In no event and under no legal theory, whether in
265
+ tort (including negligence), contract, or otherwise, unless required by
266
+ applicable law (such as deliberate and grossly negligent acts) or agreed to
267
+ in writing, shall any Contributor be liable to You for damages, including
268
+ any direct, indirect, special, incidental, or consequential damages of any
269
+ character arising as a result of this License or out of the use or
270
+ inability to use the Work (including but not limited to damages for loss of
271
+ goodwill, work stoppage, computer failure or malfunction, or any and all
272
+ other commercial damages or losses), even if such Contributor has been
273
+ advised of the possibility of such damages.</p>
274
+ </li><li>
275
+ <p>Accepting Warranty or Additional Liability. While redistributing the Work
276
+ or Derivative Works thereof, You may choose to offer, and charge a fee for,
277
+ acceptance of support, warranty, indemnity, or other liability obligations
278
+ and/or rights consistent with this License. However, in accepting such
279
+ obligations, You may act only on Your own behalf and on Your sole
280
+ responsibility, not on behalf of any other Contributor, and only if You
281
+ agree to indemnify, defend, and hold each Contributor harmless for any
282
+ liability incurred by, or claims asserted against, such Contributor by
283
+ reason of your accepting any such warranty or additional liability.</p>
284
+ </li></ol>
285
+
286
+ <p>END OF TERMS AND CONDITIONS</p>
287
+
288
+ <p>APPENDIX: How to apply the Apache License to your work.</p>
289
+
290
+ <pre class="ruby"><span class="ruby-constant">To</span> <span class="ruby-identifier">apply</span> <span class="ruby-identifier">the</span> <span class="ruby-constant">Apache</span> <span class="ruby-constant">License</span> <span class="ruby-identifier">to</span> <span class="ruby-identifier">your</span> <span class="ruby-identifier">work</span>, <span class="ruby-identifier">attach</span> <span class="ruby-identifier">the</span> <span class="ruby-identifier">following</span>
291
+ <span class="ruby-identifier">boilerplate</span> <span class="ruby-identifier">notice</span>, <span class="ruby-identifier">with</span> <span class="ruby-identifier">the</span> <span class="ruby-identifier">fields</span> <span class="ruby-identifier">enclosed</span> <span class="ruby-identifier">by</span> <span class="ruby-identifier">brackets</span> <span class="ruby-string">&quot;[]&quot;</span>
292
+ <span class="ruby-identifier">replaced</span> <span class="ruby-identifier">with</span> <span class="ruby-identifier">your</span> <span class="ruby-identifier">own</span> <span class="ruby-identifier">identifying</span> <span class="ruby-identifier">information</span>. (<span class="ruby-constant">Don</span><span class="ruby-string">'t include
293
+ the brackets!) The text should be enclosed in the appropriate
294
+ comment syntax for the file format. We also recommend that a
295
+ file or class name and description of purpose be included on the
296
+ same &quot;printed page&quot; as the copyright notice for easier
297
+ identification within third-party archives.
298
+ </span></pre>
299
+
300
+ <p>Copyright 2013 <a href="Firebind.html">Firebind</a> Inc.</p>
301
+
302
+ <p>Licensed under the Apache License, Version 2.0 (the “License”); you may not
303
+ use this file except in compliance with the License. You may obtain a copy
304
+ of the License at</p>
305
+
306
+ <pre>http://www.apache.org/licenses/LICENSE-2.0</pre>
307
+
308
+ <p>Unless required by applicable law or agreed to in writing, software
309
+ distributed under the License is distributed on an “AS IS” BASIS, WITHOUT
310
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
311
+ License for the specific language governing permissions and limitations
312
+ under the License.</p>
313
+
314
+ </div>
315
+
316
+
317
+
318
+ <footer id="validator-badges">
319
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
320
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
321
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
322
+ </footer>
323
+
@@ -0,0 +1,171 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>README - 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 class="file">
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
+ <div id="table-of-contents">
48
+ <nav class="section">
49
+ <h3 class="section-header">Table of Contents</h3>
50
+ <ul>
51
+ <li><a href="#label-"></a>
52
+ <li><a href="#label-"></a>
53
+ </ul>
54
+ </nav>
55
+ </div>
56
+
57
+
58
+ <div id="project-metadata">
59
+ <nav id="fileindex-section" class="section project-section">
60
+ <h3 class="section-header">Pages</h3>
61
+
62
+ <ul>
63
+
64
+ <li class="file"><a href="./LICENSE_txt.html">LICENSE</a>
65
+
66
+ <li class="file"><a href="./README_txt.html">README</a>
67
+
68
+ <li class="file"><a href="./USAGE_txt.html">USAGE</a>
69
+
70
+ <li class="file"><a href="./VERSION_txt.html">VERSION</a>
71
+
72
+ <li class="file"><a href="./build.html">build</a>
73
+
74
+ <li class="file"><a href="./doc/created_rid.html">created.rid</a>
75
+
76
+ <li class="file"><a href="./firescan_gemspec.html">firescan.gemspec</a>
77
+
78
+ </ul>
79
+ </nav>
80
+
81
+ <nav id="classindex-section" class="section project-section">
82
+ <h3 class="section-header">Class and Module Index</h3>
83
+
84
+ <ul class="link-list">
85
+
86
+ <li><a href="./Example.html">Example</a>
87
+
88
+ <li><a href="./Firebind.html">Firebind</a>
89
+
90
+ <li><a href="./Firebind/Client.html">Firebind::Client</a>
91
+
92
+ <li><a href="./Firebind/Portspec.html">Firebind::Portspec</a>
93
+
94
+ <li><a href="./Firebind/Scan.html">Firebind::Scan</a>
95
+
96
+ <li><a href="./Firebind/ScanError.html">Firebind::ScanError</a>
97
+
98
+ <li><a href="./Firebind/ScanState.html">Firebind::ScanState</a>
99
+
100
+ <li><a href="./Firebind/SimpleProtocol.html">Firebind::SimpleProtocol</a>
101
+
102
+ <li><a href="./Firebind/TcpTransport.html">Firebind::TcpTransport</a>
103
+
104
+ <li><a href="./Firebind/Transport.html">Firebind::Transport</a>
105
+
106
+ <li><a href="./Firebind/UdpTransport.html">Firebind::UdpTransport</a>
107
+
108
+ <li><a href="./Runner.html">Runner</a>
109
+
110
+ <li><a href="./TestPortspec.html">TestPortspec</a>
111
+
112
+ <li><a href="./Tools.html">Tools</a>
113
+
114
+ </ul>
115
+ </nav>
116
+
117
+ </div>
118
+ </nav>
119
+
120
+ <div id="documentation" class="description">
121
+
122
+ <p>firescan-ruby</p>
123
+
124
+ <h6 id="label-"><span><a href="#label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
125
+
126
+ <p>Ruby reference implementation for the <a href="Firebind.html">Firebind</a>
127
+ Firescan path scan client This code has been tested to work with Ruby 1.9.3
128
+ and <a href="Firebind.html">Firebind</a> Reflector 1.0.</p>
129
+
130
+ <p>Integration</p>
131
+
132
+ <h6 id="label-"><span><a href="#label-">&para;</a> <a href="#documentation">&uarr;</a></span></h6>
133
+
134
+ <p>Integrating the Firescan library is straight forward. It uses a single
135
+ object ‘Scan’ and a simple callback mechanism using Ruby’s built-in
136
+ Observer feature. Create a Scan object, pass it your handler (something
137
+ that implements the Observer update method) and run the Scan. A handler
138
+ update method might look like this:</p>
139
+
140
+ <pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">state</span>)
141
+ <span class="ruby-keyword">case</span> <span class="ruby-identifier">state</span>.<span class="ruby-identifier">current_state</span>
142
+ <span class="ruby-keyword">when</span> :<span class="ruby-constant">PORT_COMPLETE</span>
143
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Port #{state.port} #{state.description(state.port_result_code)}&quot;</span>
144
+ <span class="ruby-keyword">when</span> :<span class="ruby-constant">PORT_START</span>
145
+ <span class="ruby-keyword">when</span> :<span class="ruby-constant">PORT_TICK</span>
146
+ <span class="ruby-keyword">when</span> :<span class="ruby-constant">SCAN_START</span>
147
+ <span class="ruby-keyword">when</span> :<span class="ruby-constant">START_FAILURE</span>
148
+ <span class="ruby-keyword">when</span> :<span class="ruby-constant">SCAN_COMPLETE</span>
149
+ <span class="ruby-keyword">else</span>
150
+ <span class="ruby-keyword">end</span>
151
+ <span class="ruby-keyword">end</span>
152
+ </pre>
153
+
154
+ <p>Then create and run a Scan object like this:</p>
155
+
156
+ <pre>scan = Firebind::Scan.new('scanme.firebind.com','1-10',:UDP)
157
+ scan.add_observer myHandler
158
+ state = scan.scan</pre>
159
+
160
+ <p>See the lib/example.rb script for a simple working example.</p>
161
+
162
+ </div>
163
+
164
+
165
+
166
+ <footer id="validator-badges">
167
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
168
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
169
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
170
+ </footer>
171
+