flotype-bridge 0.1.0.beta.2 → 0.2.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/LICENSE +19 -0
  2. data/README.md +27 -4
  3. data/doc/Bridge/Bridge.html +624 -0
  4. data/doc/Bridge.html +72 -903
  5. data/doc/created.rid +2 -1
  6. data/doc/images/add.png +0 -0
  7. data/doc/images/brick.png +0 -0
  8. data/doc/images/brick_link.png +0 -0
  9. data/doc/images/bug.png +0 -0
  10. data/doc/images/bullet_black.png +0 -0
  11. data/doc/images/bullet_toggle_minus.png +0 -0
  12. data/doc/images/bullet_toggle_plus.png +0 -0
  13. data/doc/images/date.png +0 -0
  14. data/doc/images/delete.png +0 -0
  15. data/doc/images/find.png +0 -0
  16. data/doc/images/loadingAnimation.gif +0 -0
  17. data/doc/images/macFFBgHack.png +0 -0
  18. data/doc/images/package.png +0 -0
  19. data/doc/images/page_green.png +0 -0
  20. data/doc/images/page_white_text.png +0 -0
  21. data/doc/images/page_white_width.png +0 -0
  22. data/doc/images/plugin.png +0 -0
  23. data/doc/images/ruby.png +0 -0
  24. data/doc/images/tag_blue.png +0 -0
  25. data/doc/images/tag_green.png +0 -0
  26. data/doc/images/transparent.png +0 -0
  27. data/doc/images/wrench.png +0 -0
  28. data/doc/images/wrench_orange.png +0 -0
  29. data/doc/images/zoom.png +0 -0
  30. data/doc/index.html +56 -56
  31. data/doc/js/darkfish.js +153 -0
  32. data/doc/js/jquery.js +5 -3
  33. data/doc/js/navigation.js +142 -0
  34. data/doc/js/search.js +94 -0
  35. data/doc/js/search_index.js +1 -0
  36. data/doc/js/searcher.js +228 -0
  37. data/doc/rdoc.css +543 -0
  38. data/doc/table_of_contents.html +70 -0
  39. data/examples/chat/chat_client.rb +15 -35
  40. data/examples/chat/chat_server.rb +21 -21
  41. data/examples/chat/public/css/style.css +4 -0
  42. data/examples/chat/public/js/all.js +5 -0
  43. data/examples/chat/public/js/bridge.min.js +2 -0
  44. data/examples/chat/public/js/index.js +14 -0
  45. data/examples/chat/views/index.erb +5 -0
  46. data/examples/chat/views/layout.erb +23 -0
  47. data/flotype-bridge.gemspec +1 -1
  48. data/lib/bridge.rb +253 -106
  49. data/lib/connection.rb +161 -0
  50. data/lib/reference.rb +49 -0
  51. data/lib/serializer.rb +97 -0
  52. data/lib/tcp.rb +61 -0
  53. data/lib/util.rb +101 -0
  54. data/lib/version.rb +3 -0
  55. data/test/regression/reconnect.rb +48 -0
  56. data/test/regression/rpc.rb +39 -0
  57. data/test/regression/test.rb +58 -0
  58. data/test/unit/bridge_dummy.rb +26 -0
  59. data/test/unit/connection_dummy.rb +21 -0
  60. data/test/unit/reference_dummy.rb +11 -0
  61. data/test/unit/tcp_dummy.rb +12 -0
  62. data/test/unit/test.rb +20 -0
  63. data/test/unit/test_reference.rb +30 -0
  64. data/test/unit/test_serializer.rb +109 -0
  65. data/test/unit/test_tcp.rb +51 -0
  66. data/test/unit/test_util.rb +59 -0
  67. metadata +106 -136
  68. data/doc/Bridge/Callback.html +0 -495
  69. data/doc/Bridge/CallbackRef.html +0 -343
  70. data/doc/Bridge/Conn.html +0 -409
  71. data/doc/Bridge/Core.html +0 -762
  72. data/doc/Bridge/LocalRef.html +0 -509
  73. data/doc/Bridge/Ref.html +0 -647
  74. data/doc/Bridge/Service.html +0 -135
  75. data/doc/Bridge/Sys.html +0 -278
  76. data/doc/Bridge/Util.html +0 -746
  77. data/doc/_index.html +0 -202
  78. data/doc/class_list.html +0 -47
  79. data/doc/classes/Bridge.html +0 -263
  80. data/doc/classes/Bridge.src/M000001.html +0 -24
  81. data/doc/classes/Bridge.src/M000002.html +0 -18
  82. data/doc/classes/Bridge.src/M000003.html +0 -18
  83. data/doc/classes/Bridge.src/M000004.html +0 -20
  84. data/doc/classes/Bridge.src/M000005.html +0 -26
  85. data/doc/classes/Bridge.src/M000006.html +0 -22
  86. data/doc/classes/Bridge.src/M000007.html +0 -18
  87. data/doc/classes/Bridge.src/M000008.html +0 -18
  88. data/doc/css/common.css +0 -1
  89. data/doc/css/full_list.css +0 -55
  90. data/doc/css/style.css +0 -322
  91. data/doc/file.README.html +0 -71
  92. data/doc/file_list.html +0 -49
  93. data/doc/files/lib/bridge_rb.html +0 -108
  94. data/doc/fr_class_index.html +0 -27
  95. data/doc/fr_file_index.html +0 -27
  96. data/doc/fr_method_index.html +0 -34
  97. data/doc/frames.html +0 -13
  98. data/doc/js/app.js +0 -205
  99. data/doc/js/full_list.js +0 -173
  100. data/doc/method_list.html +0 -510
  101. data/doc/rdoc-style.css +0 -208
  102. data/doc/top-level-namespace.html +0 -105
  103. data/lib/bb/callback.rb +0 -33
  104. data/lib/bb/conn.rb +0 -31
  105. data/lib/bb/core.rb +0 -109
  106. data/lib/bb/localref.rb +0 -37
  107. data/lib/bb/ref.rb +0 -49
  108. data/lib/bb/svc.rb +0 -7
  109. data/lib/bb/sys.rb +0 -17
  110. data/lib/bb/util.rb +0 -93
  111. data/lib/bb/version.rb +0 -3
  112. data/tests/bb_test_helper.rb +0 -3
  113. data/tests/test_serialize.rb +0 -4
data/doc/_index.html DELETED
@@ -1,202 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Documentation by YARD 0.7.5
8
-
9
- </title>
10
-
11
- <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
12
-
13
- <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <script type="text/javascript" charset="utf-8">
16
- relpath = '';
17
- if (relpath != '') relpath += '/';
18
- </script>
19
-
20
- <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
23
-
24
-
25
- </head>
26
- <body>
27
- <script type="text/javascript" charset="utf-8">
28
- if (window.top.frames.main) document.body.className = 'frames';
29
- </script>
30
-
31
- <div id="header">
32
- <div id="menu">
33
-
34
-
35
- <span class="title"></span>
36
-
37
-
38
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
39
- </div>
40
-
41
- <div id="search">
42
-
43
- <a id="class_list_link" href="#">Class List</a>
44
-
45
- <a id="method_list_link" href="#">Method List</a>
46
-
47
- <a id="file_list_link" href="#">File List</a>
48
-
49
- </div>
50
- <div class="clear"></div>
51
- </div>
52
-
53
- <iframe id="search_frame"></iframe>
54
-
55
- <div id="content"><h1 class="noborder title">Documentation by YARD 0.7.5</h1>
56
- <div id="listing">
57
- <h1 class="alphaindex">Alphabetic Index</h1>
58
-
59
- <h2>File Listing</h2>
60
- <ul id="files">
61
-
62
-
63
- <li class="r1"><a href="index.html" title="README">README</a></li>
64
-
65
-
66
- </ul>
67
-
68
- <div class="clear"></div>
69
- <h2>Namespace Listing A-Z</h2>
70
-
71
-
72
-
73
-
74
- <table>
75
- <tr>
76
- <td valign='top' width="33%">
77
-
78
-
79
- <ul id="alpha_B" class="alpha">
80
- <li class="letter">B</li>
81
- <ul>
82
-
83
- <li>
84
- <span class='object_link'><a href="Bridge.html" title="Bridge (module)">Bridge</a></span>
85
-
86
- </li>
87
-
88
- </ul>
89
- </ul>
90
-
91
-
92
- <ul id="alpha_C" class="alpha">
93
- <li class="letter">C</li>
94
- <ul>
95
-
96
- <li>
97
- <span class='object_link'><a href="Bridge/Callback.html" title="Bridge::Callback (class)">Callback</a></span>
98
-
99
- <small>(Bridge)</small>
100
-
101
- </li>
102
-
103
- <li>
104
- <span class='object_link'><a href="Bridge/Conn.html" title="Bridge::Conn (module)">Conn</a></span>
105
-
106
- <small>(Bridge)</small>
107
-
108
- </li>
109
-
110
- <li>
111
- <span class='object_link'><a href="Bridge/Core.html" title="Bridge::Core (module)">Core</a></span>
112
-
113
- <small>(Bridge)</small>
114
-
115
- </li>
116
-
117
- </ul>
118
- </ul>
119
-
120
-
121
- <ul id="alpha_L" class="alpha">
122
- <li class="letter">L</li>
123
- <ul>
124
-
125
- <li>
126
- <span class='object_link'><a href="Bridge/LocalRef.html" title="Bridge::LocalRef (class)">LocalRef</a></span>
127
-
128
- <small>(Bridge)</small>
129
-
130
- </li>
131
-
132
- </ul>
133
- </ul>
134
-
135
-
136
- <ul id="alpha_R" class="alpha">
137
- <li class="letter">R</li>
138
- <ul>
139
-
140
- <li>
141
- <span class='object_link'><a href="Bridge/Ref.html" title="Bridge::Ref (class)">Ref</a></span>
142
-
143
- <small>(Bridge)</small>
144
-
145
- </li>
146
-
147
- </ul>
148
- </ul>
149
-
150
-
151
- <ul id="alpha_S" class="alpha">
152
- <li class="letter">S</li>
153
- <ul>
154
-
155
- <li>
156
- <span class='object_link'><a href="Bridge/Service.html" title="Bridge::Service (module)">Service</a></span>
157
-
158
- <small>(Bridge)</small>
159
-
160
- </li>
161
-
162
- <li>
163
- <span class='object_link'><a href="Bridge/Sys.html" title="Bridge::Sys (module)">Sys</a></span>
164
-
165
- <small>(Bridge)</small>
166
-
167
- </li>
168
-
169
- </ul>
170
- </ul>
171
-
172
-
173
- <ul id="alpha_U" class="alpha">
174
- <li class="letter">U</li>
175
- <ul>
176
-
177
- <li>
178
- <span class='object_link'><a href="Bridge/Util.html" title="Bridge::Util (module)">Util</a></span>
179
-
180
- <small>(Bridge)</small>
181
-
182
- </li>
183
-
184
- </ul>
185
- </ul>
186
-
187
- </td>
188
- </tr>
189
- </table>
190
-
191
- </div>
192
-
193
- </div>
194
-
195
- <div id="footer">
196
- Generated on Sun Mar 4 11:14:10 2012 by
197
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
198
- 0.7.5 (ruby-1.8.7).
199
- </div>
200
-
201
- </body>
202
- </html>
data/doc/class_list.html DELETED
@@ -1,47 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html>
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
-
7
- <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
-
9
- <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
-
11
-
12
-
13
- <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
-
15
- <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
-
17
-
18
- <base id="base_target" target="_parent" />
19
- </head>
20
- <body>
21
- <script type="text/javascript" charset="utf-8">
22
- if (window.top.frames.main) {
23
- document.getElementById('base_target').target = 'main';
24
- document.body.className = 'frames';
25
- }
26
- </script>
27
- <div id="content">
28
- <h1 id="full_list_header">Class List</h1>
29
- <div id="nav">
30
-
31
- <a target="_self" href="class_list.html">Classes</a>
32
-
33
- <a target="_self" href="method_list.html">Methods</a>
34
-
35
- <a target="_self" href="file_list.html">Files</a>
36
-
37
- </div>
38
- <div id="search">Search: <input type="text" /></div>
39
-
40
- <ul id="full_list" class="class">
41
- <li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li>
42
- <li><a class='toggle'></a> <span class='object_link'><a href="Bridge.html" title="Bridge (module)">Bridge</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="Bridge/Callback.html" title="Bridge::Callback (class)">Callback</a></span> &lt; Object<small class='search_info'>Bridge</small></li><li><span class='object_link'><a href="Bridge/Conn.html" title="Bridge::Conn (module)">Conn</a></span><small class='search_info'>Bridge</small></li><li><span class='object_link'><a href="Bridge/Core.html" title="Bridge::Core (module)">Core</a></span><small class='search_info'>Bridge</small></li><li><span class='object_link'><a href="Bridge/LocalRef.html" title="Bridge::LocalRef (class)">LocalRef</a></span> &lt; Ref<small class='search_info'>Bridge</small></li><li><span class='object_link'><a href="Bridge/Ref.html" title="Bridge::Ref (class)">Ref</a></span> &lt; Object<small class='search_info'>Bridge</small></li><li><span class='object_link'><a href="Bridge/Service.html" title="Bridge::Service (module)">Service</a></span><small class='search_info'>Bridge</small></li><li><span class='object_link'><a href="Bridge/Sys.html" title="Bridge::Sys (module)">Sys</a></span><small class='search_info'>Bridge</small></li><li><span class='object_link'><a href="Bridge/Util.html" title="Bridge::Util (module)">Util</a></span><small class='search_info'>Bridge</small></li></ul>
43
-
44
- </ul>
45
- </div>
46
- </body>
47
- </html>
@@ -1,263 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: Bridge</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Bridge</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/bridge_rb.html">
59
- lib/bridge.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
-
76
-
77
- </div>
78
-
79
- <div id="method-list">
80
- <h3 class="section-bar">Methods</h3>
81
-
82
- <div class="name-list">
83
- <a href="#M000008">get_channel</a>&nbsp;&nbsp;
84
- <a href="#M000007">get_service</a>&nbsp;&nbsp;
85
- <a href="#M000001">initialize</a>&nbsp;&nbsp;
86
- <a href="#M000006">join_channel</a>&nbsp;&nbsp;
87
- <a href="#M000002">options</a>&nbsp;&nbsp;
88
- <a href="#M000005">publish_service</a>&nbsp;&nbsp;
89
- <a href="#M000003">ready</a>&nbsp;&nbsp;
90
- <a href="#M000004">send</a>&nbsp;&nbsp;
91
- </div>
92
- </div>
93
-
94
- </div>
95
-
96
-
97
- <!-- if includes -->
98
-
99
- <div id="section">
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
- <!-- if method_list -->
109
- <div id="methods">
110
- <h3 class="section-bar">Public Class methods</h3>
111
-
112
- <div id="method-M000008" class="method-detail">
113
- <a name="M000008"></a>
114
-
115
- <div class="method-heading">
116
- <a href="Bridge.src/M000008.html" target="Code" class="method-signature"
117
- onclick="popupCode('Bridge.src/M000008.html');return false;">
118
- <span class="method-name">get_channel</span><span class="method-args">(channel)</span>
119
- </a>
120
- </div>
121
-
122
- <div class="method-description">
123
- <p>
124
- Returns a reference to the channel specified by `channel`.
125
- </p>
126
- </div>
127
- </div>
128
-
129
- <div id="method-M000007" class="method-detail">
130
- <a name="M000007"></a>
131
-
132
- <div class="method-heading">
133
- <a href="Bridge.src/M000007.html" target="Code" class="method-signature"
134
- onclick="popupCode('Bridge.src/M000007.html');return false;">
135
- <span class="method-name">get_service</span><span class="method-args">(svc)</span>
136
- </a>
137
- </div>
138
-
139
- <div class="method-description">
140
- <p>
141
- Returns a reference to the service specified by `svc`.
142
- </p>
143
- </div>
144
- </div>
145
-
146
- <div id="method-M000001" class="method-detail">
147
- <a name="M000001"></a>
148
-
149
- <div class="method-heading">
150
- <a href="Bridge.src/M000001.html" target="Code" class="method-signature"
151
- onclick="popupCode('Bridge.src/M000001.html');return false;">
152
- <span class="method-name">initialize</span><span class="method-args">(options = {})</span>
153
- </a>
154
- </div>
155
-
156
- <div class="method-description">
157
- <p>
158
- Usage: Bridge::initialize(opts). Expects to be called inside an
159
- EventMachine block.
160
- </p>
161
- </div>
162
- </div>
163
-
164
- <div id="method-M000006" class="method-detail">
165
- <a name="M000006"></a>
166
-
167
- <div class="method-heading">
168
- <a href="Bridge.src/M000006.html" target="Code" class="method-signature"
169
- onclick="popupCode('Bridge.src/M000006.html');return false;">
170
- <span class="method-name">join_channel</span><span class="method-args">(channel, handler, fun)</span>
171
- </a>
172
- </div>
173
-
174
- <div class="method-description">
175
- <p>
176
- Join the channel specified by `channel`. Messages from this channel will be
177
- passed in to a handler specified by `handler`. The callback `fun` is to be
178
- called to confirm successful joining of the channel.
179
- </p>
180
- </div>
181
- </div>
182
-
183
- <div id="method-M000002" class="method-detail">
184
- <a name="M000002"></a>
185
-
186
- <div class="method-heading">
187
- <a href="Bridge.src/M000002.html" target="Code" class="method-signature"
188
- onclick="popupCode('Bridge.src/M000002.html');return false;">
189
- <span class="method-name">options</span><span class="method-args">()</span>
190
- </a>
191
- </div>
192
-
193
- <div class="method-description">
194
- </div>
195
- </div>
196
-
197
- <div id="method-M000005" class="method-detail">
198
- <a name="M000005"></a>
199
-
200
- <div class="method-heading">
201
- <a href="Bridge.src/M000005.html" target="Code" class="method-signature"
202
- onclick="popupCode('Bridge.src/M000005.html');return false;">
203
- <span class="method-name">publish_service</span><span class="method-args">(svc, fun)</span>
204
- </a>
205
- </div>
206
-
207
- <div class="method-description">
208
- <p>
209
- Broadcasts the availability of certain functionality specified by a proc
210
- `fun` under the name of `svc`.
211
- </p>
212
- </div>
213
- </div>
214
-
215
- <div id="method-M000003" class="method-detail">
216
- <a name="M000003"></a>
217
-
218
- <div class="method-heading">
219
- <a href="Bridge.src/M000003.html" target="Code" class="method-signature"
220
- onclick="popupCode('Bridge.src/M000003.html');return false;">
221
- <span class="method-name">ready</span><span class="method-args">(fun)</span>
222
- </a>
223
- </div>
224
-
225
- <div class="method-description">
226
- <p>
227
- Similar to $(document).<a href="Bridge.html#M000003">ready</a> of jQuery as
228
- well as now.ready: takes callbacks that it will call when the connection
229
- handshake has been completed.
230
- </p>
231
- </div>
232
- </div>
233
-
234
- <div id="method-M000004" class="method-detail">
235
- <a name="M000004"></a>
236
-
237
- <div class="method-heading">
238
- <a href="Bridge.src/M000004.html" target="Code" class="method-signature"
239
- onclick="popupCode('Bridge.src/M000004.html');return false;">
240
- <span class="method-name">send</span><span class="method-args">(dest, args)</span>
241
- </a>
242
- </div>
243
-
244
- <div class="method-description">
245
- <p>
246
- Calls a remote function specified by `dest` with `args`.
247
- </p>
248
- </div>
249
- </div>
250
-
251
-
252
- </div>
253
-
254
-
255
- </div>
256
-
257
-
258
- <div id="validator-badges">
259
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
260
- </div>
261
-
262
- </body>
263
- </html>
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>initialize (Bridge)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/bridge.rb, line 14</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span> = {})
15
- <span class="ruby-ivar">@options</span> = {
16
- <span class="ruby-identifier">:host</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'127.0.0.1'</span>,
17
- <span class="ruby-identifier">:port</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">8080</span>,
18
- <span class="ruby-identifier">:api_key</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:null</span>,
19
- <span class="ruby-identifier">:reconnect</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>
20
- }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)
21
- <span class="ruby-constant">EventMachine</span><span class="ruby-operator">::</span><span class="ruby-identifier">connect</span>(<span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:host</span>], <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:port</span>], <span class="ruby-constant">Bridge</span><span class="ruby-operator">::</span><span class="ruby-constant">Conn</span>)
22
- <span class="ruby-keyword kw">end</span></pre>
23
- </body>
24
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>options (Bridge)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/bridge.rb, line 24</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">options</span>
15
- <span class="ruby-ivar">@options</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>ready (Bridge)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/bridge.rb, line 31</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ready</span> <span class="ruby-identifier">fun</span>
15
- <span class="ruby-constant">Core</span><span class="ruby-operator">::</span><span class="ruby-identifier">enqueue</span> <span class="ruby-identifier">fun</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>send (Bridge)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/bridge.rb, line 36</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">args</span>
15
- <span class="ruby-constant">Core</span><span class="ruby-operator">::</span><span class="ruby-identifier">command</span>(<span class="ruby-identifier">:SEND</span>,
16
- { <span class="ruby-identifier">:args</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-identifier">serialize</span>(<span class="ruby-identifier">args</span>),
17
- <span class="ruby-identifier">:destination</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">dest</span> })
18
- <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,26 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>publish_service (Bridge)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/bridge.rb, line 44</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">publish_service</span> <span class="ruby-identifier">svc</span>, <span class="ruby-identifier">fun</span>
15
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">svc</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'system'</span>
16
- <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-identifier">err</span>(<span class="ruby-value str">'Invalid service name: '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">svc</span>)
17
- <span class="ruby-keyword kw">else</span>
18
- <span class="ruby-constant">Core</span><span class="ruby-operator">::</span><span class="ruby-identifier">command</span>(<span class="ruby-identifier">:JOINWORKERPOOL</span>,
19
- { <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">svc</span>,
20
- <span class="ruby-identifier">:callback</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Core</span><span class="ruby-operator">::</span><span class="ruby-identifier">store</span>(<span class="ruby-identifier">fun</span>.<span class="ruby-identifier">hash</span>, <span class="ruby-constant">CallbackRef</span>(<span class="ruby-identifier">fun</span>))
21
- })
22
- <span class="ruby-keyword kw">end</span>
23
- <span class="ruby-constant">Core</span><span class="ruby-operator">::</span><span class="ruby-identifier">store</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">svc</span>)
24
- <span class="ruby-keyword kw">end</span></pre>
25
- </body>
26
- </html>
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>join_channel (Bridge)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/bridge.rb, line 59</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">join_channel</span> <span class="ruby-identifier">channel</span>, <span class="ruby-identifier">handler</span>, <span class="ruby-identifier">fun</span>
15
- <span class="ruby-constant">Core</span><span class="ruby-operator">::</span><span class="ruby-identifier">command</span>(<span class="ruby-identifier">:JOINCHANNEL</span>,
16
- { <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">channel</span>,
17
- <span class="ruby-identifier">:handler</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">handler</span>,
18
- <span class="ruby-identifier">:callback</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Core</span><span class="ruby-operator">::</span><span class="ruby-identifier">store</span>(<span class="ruby-identifier">fun</span>.<span class="ruby-identifier">hash</span>, <span class="ruby-constant">CallbackRef</span>(<span class="ruby-identifier">fun</span>))
19
- })
20
- <span class="ruby-keyword kw">end</span></pre>
21
- </body>
22
- </html>