rumai 3.2.0 → 3.2.1

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 (181) hide show
  1. data/CREDITS +4 -3
  2. data/HISTORY +327 -0
  3. data/INSTALL +31 -0
  4. data/README +92 -0
  5. data/USAGE +297 -0
  6. data/bin/rumai +9 -22
  7. data/doc/api/IO.html +119 -0
  8. data/doc/api/Integer.html +171 -0
  9. data/doc/api/Rumai.html +1270 -0
  10. data/doc/api/Rumai/Area.html +1485 -0
  11. data/doc/api/Rumai/Chain.html +301 -0
  12. data/doc/api/Rumai/Client.html +2451 -0
  13. data/doc/api/Rumai/ClientContainer.html +301 -0
  14. data/doc/api/Rumai/ExportInstanceMethods.html +103 -0
  15. data/doc/api/Rumai/IXP.html +94 -0
  16. data/doc/api/Rumai/IXP/Agent.html +1625 -0
  17. data/doc/api/Rumai/IXP/Agent/FidStream.html +959 -0
  18. data/doc/api/Rumai/IXP/Agent/RangedPool.html +381 -0
  19. data/doc/api/Rumai/IXP/Error.html +110 -0
  20. data/doc/api/Rumai/IXP/Fcall.html +503 -0
  21. data/doc/api/Rumai/IXP/Qid.html +207 -0
  22. data/doc/api/Rumai/IXP/Rattach.html +148 -0
  23. data/doc/api/Rumai/IXP/Rauth.html +148 -0
  24. data/doc/api/Rumai/IXP/Rclunk.html +148 -0
  25. data/doc/api/Rumai/IXP/Rcreate.html +148 -0
  26. data/doc/api/Rumai/IXP/Rerror.html +148 -0
  27. data/doc/api/Rumai/IXP/Rflush.html +148 -0
  28. data/doc/api/Rumai/IXP/Ropen.html +148 -0
  29. data/doc/api/Rumai/IXP/Rread.html +148 -0
  30. data/doc/api/Rumai/IXP/Rremove.html +148 -0
  31. data/doc/api/Rumai/IXP/Rstat.html +148 -0
  32. data/doc/api/Rumai/IXP/Rversion.html +148 -0
  33. data/doc/api/Rumai/IXP/Rwalk.html +148 -0
  34. data/doc/api/Rumai/IXP/Rwrite.html +148 -0
  35. data/doc/api/Rumai/IXP/Rwstat.html +148 -0
  36. data/doc/api/Rumai/IXP/Stat.html +335 -0
  37. data/doc/api/Rumai/IXP/Stream.html +194 -0
  38. data/doc/api/Rumai/IXP/Struct.html +586 -0
  39. data/doc/api/Rumai/IXP/Struct/ClassField.html +242 -0
  40. data/doc/api/Rumai/IXP/Struct/Field.html +782 -0
  41. data/doc/api/Rumai/IXP/Struct/Field/CounteeField.html +227 -0
  42. data/doc/api/Rumai/IXP/Struct/Field/CounterField.html +153 -0
  43. data/doc/api/Rumai/IXP/Struct/Integer8Field.html +242 -0
  44. data/doc/api/Rumai/IXP/Struct/StringField.html +206 -0
  45. data/doc/api/Rumai/IXP/Tattach.html +148 -0
  46. data/doc/api/Rumai/IXP/Tauth.html +148 -0
  47. data/doc/api/Rumai/IXP/Tclunk.html +148 -0
  48. data/doc/api/Rumai/IXP/Tcreate.html +148 -0
  49. data/doc/api/Rumai/IXP/Terror.html +231 -0
  50. data/doc/api/Rumai/IXP/Tflush.html +148 -0
  51. data/doc/api/Rumai/IXP/Topen.html +240 -0
  52. data/doc/api/Rumai/IXP/Tread.html +148 -0
  53. data/doc/api/Rumai/IXP/Tremove.html +148 -0
  54. data/doc/api/Rumai/IXP/Tstat.html +148 -0
  55. data/doc/api/Rumai/IXP/Tversion.html +162 -0
  56. data/doc/api/Rumai/IXP/Twalk.html +148 -0
  57. data/doc/api/Rumai/IXP/Twrite.html +148 -0
  58. data/doc/api/Rumai/IXP/Twstat.html +148 -0
  59. data/doc/api/Rumai/Node.html +1406 -0
  60. data/doc/api/Rumai/View.html +1587 -0
  61. data/doc/api/Rumai/WidgetImpl.html +333 -0
  62. data/doc/api/Rumai/WidgetNode.html +246 -0
  63. data/doc/api/String.html +258 -0
  64. data/doc/api/StringIO.html +119 -0
  65. data/doc/api/Time.html +247 -0
  66. data/doc/api/_index.html +581 -0
  67. data/doc/api/class_list.html +36 -0
  68. data/doc/api/css/common.css +1 -0
  69. data/doc/api/css/full_list.css +50 -0
  70. data/doc/api/css/style.css +273 -0
  71. data/doc/api/file.LICENSE.html +73 -0
  72. data/doc/api/file_list.html +38 -0
  73. data/doc/api/frames.html +13 -0
  74. data/doc/api/index.html +72 -13
  75. data/doc/api/js/app.js +111 -0
  76. data/doc/api/js/full_list.js +117 -0
  77. data/doc/api/js/{jquery-1.3.2.min.js → jquery.js} +0 -0
  78. data/doc/api/method_list.html +1483 -0
  79. data/doc/api/top-level-namespace.html +89 -0
  80. data/doc/index.erb +18 -13
  81. data/doc/index.html +331 -386
  82. data/lib/rumai.rb +1 -18
  83. data/lib/rumai/fs.rb +11 -11
  84. data/lib/rumai/inochi.rb +48 -0
  85. data/lib/rumai/inochi.yaml +94 -0
  86. data/lib/rumai/ixp.rb +0 -4
  87. data/lib/rumai/ixp/message.rb +6 -17
  88. data/lib/rumai/ixp/transport.rb +39 -30
  89. data/lib/rumai/wm.rb +35 -37
  90. data/test/rumai/inochi_test.rb +17 -0
  91. data/test/rumai/ixp/message_test.rb +245 -0
  92. data/test/runner +25 -0
  93. data/test/test_helper.rb +1 -0
  94. metadata +107 -125
  95. data/doc/api/apple-touch-icon.png +0 -0
  96. data/doc/api/classes/IO.html +0 -72
  97. data/doc/api/classes/Integer.html +0 -110
  98. data/doc/api/classes/Object.html +0 -60
  99. data/doc/api/classes/Rumai.html +0 -837
  100. data/doc/api/classes/Rumai/Area.html +0 -909
  101. data/doc/api/classes/Rumai/Chain.html +0 -197
  102. data/doc/api/classes/Rumai/Client.html +0 -1526
  103. data/doc/api/classes/Rumai/ClientContainer.html +0 -191
  104. data/doc/api/classes/Rumai/ExportInstanceMethods.html +0 -69
  105. data/doc/api/classes/Rumai/IXP.html +0 -131
  106. data/doc/api/classes/Rumai/IXP/Agent.html +0 -941
  107. data/doc/api/classes/Rumai/IXP/Agent/FidStream.html +0 -456
  108. data/doc/api/classes/Rumai/IXP/Agent/MODES.html +0 -108
  109. data/doc/api/classes/Rumai/IXP/Agent/RangedPool.html +0 -241
  110. data/doc/api/classes/Rumai/IXP/Error.html +0 -67
  111. data/doc/api/classes/Rumai/IXP/Fcall.html +0 -323
  112. data/doc/api/classes/Rumai/IXP/Qid.html +0 -153
  113. data/doc/api/classes/Rumai/IXP/Rattach.html +0 -67
  114. data/doc/api/classes/Rumai/IXP/Rauth.html +0 -67
  115. data/doc/api/classes/Rumai/IXP/Rclunk.html +0 -67
  116. data/doc/api/classes/Rumai/IXP/Rcreate.html +0 -67
  117. data/doc/api/classes/Rumai/IXP/Rerror.html +0 -67
  118. data/doc/api/classes/Rumai/IXP/Rflush.html +0 -67
  119. data/doc/api/classes/Rumai/IXP/Ropen.html +0 -67
  120. data/doc/api/classes/Rumai/IXP/Rread.html +0 -67
  121. data/doc/api/classes/Rumai/IXP/Rremove.html +0 -67
  122. data/doc/api/classes/Rumai/IXP/Rstat.html +0 -67
  123. data/doc/api/classes/Rumai/IXP/Rversion.html +0 -67
  124. data/doc/api/classes/Rumai/IXP/Rwalk.html +0 -67
  125. data/doc/api/classes/Rumai/IXP/Rwrite.html +0 -67
  126. data/doc/api/classes/Rumai/IXP/Rwstat.html +0 -67
  127. data/doc/api/classes/Rumai/IXP/Stat.html +0 -252
  128. data/doc/api/classes/Rumai/IXP/Stream.html +0 -131
  129. data/doc/api/classes/Rumai/IXP/Struct.html +0 -311
  130. data/doc/api/classes/Rumai/IXP/Struct/Field.html +0 -415
  131. data/doc/api/classes/Rumai/IXP/Struct/Field/CounteeField.html +0 -153
  132. data/doc/api/classes/Rumai/IXP/Struct/Field/CounterField.html +0 -104
  133. data/doc/api/classes/Rumai/IXP/Tattach.html +0 -68
  134. data/doc/api/classes/Rumai/IXP/Tauth.html +0 -67
  135. data/doc/api/classes/Rumai/IXP/Tclunk.html +0 -67
  136. data/doc/api/classes/Rumai/IXP/Tcreate.html +0 -68
  137. data/doc/api/classes/Rumai/IXP/Terror.html +0 -110
  138. data/doc/api/classes/Rumai/IXP/Tflush.html +0 -67
  139. data/doc/api/classes/Rumai/IXP/Topen.html +0 -165
  140. data/doc/api/classes/Rumai/IXP/Tread.html +0 -67
  141. data/doc/api/classes/Rumai/IXP/Tremove.html +0 -67
  142. data/doc/api/classes/Rumai/IXP/Tstat.html +0 -67
  143. data/doc/api/classes/Rumai/IXP/Tversion.html +0 -86
  144. data/doc/api/classes/Rumai/IXP/Twalk.html +0 -68
  145. data/doc/api/classes/Rumai/IXP/Twrite.html +0 -68
  146. data/doc/api/classes/Rumai/IXP/Twstat.html +0 -67
  147. data/doc/api/classes/Rumai/Node.html +0 -821
  148. data/doc/api/classes/Rumai/View.html +0 -967
  149. data/doc/api/classes/Rumai/WidgetImpl.html +0 -65
  150. data/doc/api/classes/Rumai/WidgetNode.html +0 -68
  151. data/doc/api/classes/String.html +0 -163
  152. data/doc/api/classes/StringIO.html +0 -72
  153. data/doc/api/classes/Time.html +0 -156
  154. data/doc/api/created.rid +0 -1
  155. data/doc/api/css/main.css +0 -263
  156. data/doc/api/css/panel.css +0 -383
  157. data/doc/api/css/reset.css +0 -53
  158. data/doc/api/favicon.ico +0 -0
  159. data/doc/api/files/CREDITS.html +0 -67
  160. data/doc/api/files/LICENSE.html +0 -76
  161. data/doc/api/files/lib/rumai/fs_rb.html +0 -75
  162. data/doc/api/files/lib/rumai/ixp/message_rb.html +0 -91
  163. data/doc/api/files/lib/rumai/ixp/transport_rb.html +0 -75
  164. data/doc/api/files/lib/rumai/ixp_rb.html +0 -69
  165. data/doc/api/files/lib/rumai/wm_rb.html +0 -77
  166. data/doc/api/files/lib/rumai_rb.html +0 -65
  167. data/doc/api/i/arrows.png +0 -0
  168. data/doc/api/i/results_bg.png +0 -0
  169. data/doc/api/i/tree_bg.png +0 -0
  170. data/doc/api/js/jquery-effect.js +0 -593
  171. data/doc/api/js/main.js +0 -22
  172. data/doc/api/js/searchdoc.js +0 -628
  173. data/doc/api/panel/index.html +0 -71
  174. data/doc/api/panel/search_index.js +0 -1
  175. data/doc/api/panel/tree.js +0 -1
  176. data/doc/history.erb +0 -233
  177. data/doc/intro.erb +0 -70
  178. data/doc/setup.erb +0 -144
  179. data/doc/usage.erb +0 -308
  180. data/rakefile +0 -14
  181. data/test/rumai/ixp/message.rb +0 -237
@@ -1,191 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <title>Rumai::ClientContainer</title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
- <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
9
- <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
10
- <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
11
- <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
13
- </head>
14
-
15
- <body>
16
- <div class="banner">
17
- <h1>
18
- <span class="type">Module</span>
19
- Rumai::ClientContainer
20
-
21
- </h1>
22
- <ul class="files">
23
-
24
- <li><a href="../../files/lib/rumai/wm_rb.html">lib/rumai/wm.rb</a></li>
25
-
26
- </ul>
27
- </div>
28
- <div id="bodyContent">
29
- <div id="content">
30
-
31
- <div class="description">
32
- <p>
33
- NOTE: Inheritors should override the &#8216;<a
34
- href="ClientContainer.html#M000068">client_ids</a>&#8217; method.
35
- </p>
36
-
37
- </div>
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
- <div class="sectiontitle">Methods</div>
48
- <dl class="methods">
49
-
50
- <dt>C</dt>
51
- <dd>
52
- <ul>
53
-
54
- <li><a href="#M000068">client_ids</a>,</li>
55
-
56
- <li><a href="#M000069">clients</a></li>
57
-
58
- </ul>
59
- </dd>
60
-
61
- <dt>G</dt>
62
- <dd>
63
- <ul>
64
-
65
- <li><a href="#M000071">grouping</a></li>
66
-
67
- </ul>
68
- </dd>
69
-
70
- </dl>
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
- <div class="sectiontitle">Instance Public methods</div>
85
-
86
- <div class="method">
87
- <div class="title" id="M000068">
88
-
89
- <a name="M000068"></a><b>client_ids</b>()
90
-
91
- </div>
92
-
93
- <div class="description">
94
- <p>
95
- Returns the IDs of the clients in this container.
96
- </p>
97
-
98
- </div>
99
-
100
-
101
-
102
-
103
- <div class="sourcecode">
104
- <p class="source-link">
105
- Source: <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show</a>
106
-
107
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/wm.rb#L458" target="_blank" class="github_url">on GitHub</a>
108
-
109
- </p>
110
- <div id="M000068_source" class="dyn-source">
111
- <pre><span class="ruby-comment cmt"># File lib/rumai/wm.rb, line 458</span>
112
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client_ids</span>
113
- []
114
- <span class="ruby-keyword kw">end</span></pre>
115
- </div>
116
- </div>
117
-
118
- </div>
119
-
120
- <div class="method">
121
- <div class="title" id="M000069">
122
-
123
- <a name="M000069"></a><b>clients</b>()
124
-
125
- </div>
126
-
127
- <div class="description">
128
- <p>
129
- Returns the clients contained in this container.
130
- </p>
131
-
132
- </div>
133
-
134
-
135
-
136
-
137
- <div class="sourcecode">
138
- <p class="source-link">
139
- Source: <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show</a>
140
-
141
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/wm.rb#L465" target="_blank" class="github_url">on GitHub</a>
142
-
143
- </p>
144
- <div id="M000069_source" class="dyn-source">
145
- <pre><span class="ruby-comment cmt"># File lib/rumai/wm.rb, line 465</span>
146
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clients</span>
147
- <span class="ruby-identifier">client_ids</span>.<span class="ruby-identifier">map!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">i</span> }
148
- <span class="ruby-keyword kw">end</span></pre>
149
- </div>
150
- </div>
151
-
152
- </div>
153
-
154
- <div class="method">
155
- <div class="title" id="M000071">
156
-
157
- <a name="M000071"></a><b>grouping</b>()
158
-
159
- </div>
160
-
161
- <div class="description">
162
- <p>
163
- Returns all grouped clients in this container.
164
- </p>
165
-
166
- </div>
167
-
168
-
169
-
170
-
171
- <div class="sourcecode">
172
- <p class="source-link">
173
- Source: <a href="javascript:toggleSource('M000071_source')" id="l_M000071_source">show</a>
174
-
175
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/wm.rb#L481" target="_blank" class="github_url">on GitHub</a>
176
-
177
- </p>
178
- <div id="M000071_source" class="dyn-source">
179
- <pre><span class="ruby-comment cmt"># File lib/rumai/wm.rb, line 481</span>
180
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">grouping</span>
181
- <span class="ruby-identifier">clients</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">group?</span> }
182
- <span class="ruby-keyword kw">end</span></pre>
183
- </div>
184
- </div>
185
-
186
- </div>
187
-
188
- </div>
189
- </div>
190
- </body>
191
- </html>
@@ -1,69 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <title>Rumai::ExportInstanceMethods</title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
- <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
9
- <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
10
- <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
11
- <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
13
- </head>
14
-
15
- <body>
16
- <div class="banner">
17
- <h1>
18
- <span class="type">Module</span>
19
- Rumai::ExportInstanceMethods
20
-
21
- </h1>
22
- <ul class="files">
23
-
24
- <li><a href="../../files/lib/rumai/fs_rb.html">lib/rumai/fs.rb</a></li>
25
-
26
- </ul>
27
- </div>
28
- <div id="bodyContent">
29
- <div id="content">
30
-
31
- <div class="description">
32
- <p>
33
- Makes instance methods accessible through class methods. This is done to
34
- emulate the File class:
35
- </p>
36
- <pre>
37
- File.exist? &quot;foo&quot;
38
- File.new(&quot;foo&quot;).exist?
39
- </pre>
40
- <p>
41
- Both of the above expressions are equivalent.
42
- </p>
43
-
44
- </div>
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
- </div>
67
- </div>
68
- </body>
69
- </html>
@@ -1,131 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <title>Rumai::IXP</title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
- <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
9
- <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
10
- <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
11
- <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
13
- </head>
14
-
15
- <body>
16
- <div class="banner">
17
- <h1>
18
- <span class="type">Module</span>
19
- Rumai::IXP
20
-
21
- </h1>
22
- <ul class="files">
23
-
24
- <li><a href="../../files/lib/rumai/ixp/transport_rb.html">lib/rumai/ixp/transport.rb</a></li>
25
-
26
- <li><a href="../../files/lib/rumai/ixp/message_rb.html">lib/rumai/ixp/message.rb</a></li>
27
-
28
- </ul>
29
- </div>
30
- <div id="bodyContent">
31
- <div id="content">
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
- <div class="sectiontitle">Classes and Modules</div>
48
- <ul>
49
-
50
- <li><span class="type">MODULE</span> <a href="IXP/Stream.html">Rumai::IXP::Stream</a></li>
51
-
52
- <li><span class="type">MODULE</span> <a href="IXP/Struct.html">Rumai::IXP::Struct</a></li>
53
-
54
- <li><span class="type">CLASS</span> <a href="IXP/Agent.html">Rumai::IXP::Agent</a></li>
55
-
56
- <li><span class="type">CLASS</span> <a href="IXP/Error.html">Rumai::IXP::Error</a></li>
57
-
58
- <li><span class="type">CLASS</span> <a href="IXP/Fcall.html">Rumai::IXP::Fcall</a></li>
59
-
60
- <li><span class="type">CLASS</span> <a href="IXP/Qid.html">Rumai::IXP::Qid</a></li>
61
-
62
- <li><span class="type">CLASS</span> <a href="IXP/Rattach.html">Rumai::IXP::Rattach</a></li>
63
-
64
- <li><span class="type">CLASS</span> <a href="IXP/Rauth.html">Rumai::IXP::Rauth</a></li>
65
-
66
- <li><span class="type">CLASS</span> <a href="IXP/Rclunk.html">Rumai::IXP::Rclunk</a></li>
67
-
68
- <li><span class="type">CLASS</span> <a href="IXP/Rcreate.html">Rumai::IXP::Rcreate</a></li>
69
-
70
- <li><span class="type">CLASS</span> <a href="IXP/Rerror.html">Rumai::IXP::Rerror</a></li>
71
-
72
- <li><span class="type">CLASS</span> <a href="IXP/Rflush.html">Rumai::IXP::Rflush</a></li>
73
-
74
- <li><span class="type">CLASS</span> <a href="IXP/Ropen.html">Rumai::IXP::Ropen</a></li>
75
-
76
- <li><span class="type">CLASS</span> <a href="IXP/Rread.html">Rumai::IXP::Rread</a></li>
77
-
78
- <li><span class="type">CLASS</span> <a href="IXP/Rremove.html">Rumai::IXP::Rremove</a></li>
79
-
80
- <li><span class="type">CLASS</span> <a href="IXP/Rstat.html">Rumai::IXP::Rstat</a></li>
81
-
82
- <li><span class="type">CLASS</span> <a href="IXP/Rversion.html">Rumai::IXP::Rversion</a></li>
83
-
84
- <li><span class="type">CLASS</span> <a href="IXP/Rwalk.html">Rumai::IXP::Rwalk</a></li>
85
-
86
- <li><span class="type">CLASS</span> <a href="IXP/Rwrite.html">Rumai::IXP::Rwrite</a></li>
87
-
88
- <li><span class="type">CLASS</span> <a href="IXP/Rwstat.html">Rumai::IXP::Rwstat</a></li>
89
-
90
- <li><span class="type">CLASS</span> <a href="IXP/Stat.html">Rumai::IXP::Stat</a></li>
91
-
92
- <li><span class="type">CLASS</span> <a href="IXP/Tattach.html">Rumai::IXP::Tattach</a></li>
93
-
94
- <li><span class="type">CLASS</span> <a href="IXP/Tauth.html">Rumai::IXP::Tauth</a></li>
95
-
96
- <li><span class="type">CLASS</span> <a href="IXP/Tclunk.html">Rumai::IXP::Tclunk</a></li>
97
-
98
- <li><span class="type">CLASS</span> <a href="IXP/Tcreate.html">Rumai::IXP::Tcreate</a></li>
99
-
100
- <li><span class="type">CLASS</span> <a href="IXP/Terror.html">Rumai::IXP::Terror</a></li>
101
-
102
- <li><span class="type">CLASS</span> <a href="IXP/Tflush.html">Rumai::IXP::Tflush</a></li>
103
-
104
- <li><span class="type">CLASS</span> <a href="IXP/Topen.html">Rumai::IXP::Topen</a></li>
105
-
106
- <li><span class="type">CLASS</span> <a href="IXP/Tread.html">Rumai::IXP::Tread</a></li>
107
-
108
- <li><span class="type">CLASS</span> <a href="IXP/Tremove.html">Rumai::IXP::Tremove</a></li>
109
-
110
- <li><span class="type">CLASS</span> <a href="IXP/Tstat.html">Rumai::IXP::Tstat</a></li>
111
-
112
- <li><span class="type">CLASS</span> <a href="IXP/Tversion.html">Rumai::IXP::Tversion</a></li>
113
-
114
- <li><span class="type">CLASS</span> <a href="IXP/Twalk.html">Rumai::IXP::Twalk</a></li>
115
-
116
- <li><span class="type">CLASS</span> <a href="IXP/Twrite.html">Rumai::IXP::Twrite</a></li>
117
-
118
- <li><span class="type">CLASS</span> <a href="IXP/Twstat.html">Rumai::IXP::Twstat</a></li>
119
-
120
- </ul>
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
- </div>
129
- </div>
130
- </body>
131
- </html>
@@ -1,941 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <title>Rumai::IXP::Agent</title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
- <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" />
9
- <link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" />
10
- <script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
11
- <script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script>
13
- </head>
14
-
15
- <body>
16
- <div class="banner">
17
- <h1>
18
- <span class="type">Class</span>
19
- Rumai::IXP::Agent
20
-
21
- <span class="parent">&lt;
22
-
23
- <a href="../../Object.html">Object</a>
24
-
25
- </span>
26
-
27
- </h1>
28
- <ul class="files">
29
-
30
- <li><a href="../../../files/lib/rumai/ixp/transport_rb.html">lib/rumai/ixp/transport.rb</a></li>
31
-
32
- </ul>
33
- </div>
34
- <div id="bodyContent">
35
- <div id="content">
36
-
37
- <div class="description">
38
- <p>
39
- A thread-safe channel that multiplexes many threads onto a single 9P2000
40
- connection.
41
- </p>
42
- <p>
43
- The send/recv implementation is based on the XCB cookie approach: <a
44
- href="http://www.x.org/releases/X11R7.5/doc/libxcb/tutorial/#requestsreplies">www.x.org/releases/X11R7.5/doc/libxcb/tutorial/#requestsreplies</a>
45
- </p>
46
-
47
- </div>
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
- <div class="sectiontitle">Methods</div>
58
- <dl class="methods">
59
-
60
- <dt>A</dt>
61
- <dd>
62
- <ul>
63
-
64
- <li><a href="#M000105">attach</a></li>
65
-
66
- </ul>
67
- </dd>
68
-
69
- <dt>C</dt>
70
- <dd>
71
- <ul>
72
-
73
- <li><a href="#M000108">clunk</a>,</li>
74
-
75
- <li><a href="#M000089">create</a></li>
76
-
77
- </ul>
78
- </dd>
79
-
80
- <dt>E</dt>
81
- <dd>
82
- <ul>
83
-
84
- <li><a href="#M000084">entries</a></li>
85
-
86
- </ul>
87
- </dd>
88
-
89
- <dt>N</dt>
90
- <dd>
91
- <ul>
92
-
93
- <li><a href="#M000038">new</a></li>
94
-
95
- </ul>
96
- </dd>
97
-
98
- <dt>O</dt>
99
- <dd>
100
- <ul>
101
-
102
- <li><a href="#M000064">open</a></li>
103
-
104
- </ul>
105
- </dd>
106
-
107
- <dt>R</dt>
108
- <dd>
109
- <ul>
110
-
111
- <li><a href="#M000083">read</a>,</li>
112
-
113
- <li><a href="#M000055">recv</a>,</li>
114
-
115
- <li><a href="#M000093">remove</a>,</li>
116
-
117
- <li><a href="#M000096">remove_fid</a></li>
118
-
119
- </ul>
120
- </dd>
121
-
122
- <dt>S</dt>
123
- <dd>
124
- <ul>
125
-
126
- <li><a href="#M000054">send</a>,</li>
127
-
128
- <li><a href="#M000097">stat</a>,</li>
129
-
130
- <li><a href="#M000098">stat_fid</a></li>
131
-
132
- </ul>
133
- </dd>
134
-
135
- <dt>T</dt>
136
- <dd>
137
- <ul>
138
-
139
- <li><a href="#M000057">talk</a></li>
140
-
141
- </ul>
142
- </dd>
143
-
144
- <dt>W</dt>
145
- <dd>
146
- <ul>
147
-
148
- <li><a href="#M000101">walk</a>,</li>
149
-
150
- <li><a href="#M000102">walk_fid</a>,</li>
151
-
152
- <li><a href="#M000085">write</a></li>
153
-
154
- </ul>
155
- </dd>
156
-
157
- </dl>
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
- <div class="sectiontitle">Classes and Modules</div>
166
- <ul>
167
-
168
- <li><span class="type">MODULE</span> <a href="Agent/MODES.html">Rumai::IXP::Agent::MODES</a></li>
169
-
170
- <li><span class="type">CLASS</span> <a href="Agent/FidStream.html">Rumai::IXP::Agent::FidStream</a></li>
171
-
172
- <li><span class="type">CLASS</span> <a href="Agent/RangedPool.html">Rumai::IXP::Agent::RangedPool</a></li>
173
-
174
- </ul>
175
-
176
-
177
-
178
- <div class="sectiontitle">Constants</div>
179
- <table border='0' cellpadding='5'>
180
-
181
- <tr valign='top'>
182
- <td class="attr-name">MODES</td>
183
- <td>=</td>
184
- <td class="attr-value">{ 'r' =&gt; Topen::OREAD, 'w' =&gt; Topen::OWRITE, 't' =&gt; Topen::ORCLOSE, '+' =&gt; Topen::ORDWR, }</td>
185
- </tr>
186
-
187
-
188
- </table>
189
-
190
-
191
-
192
- <div class="sectiontitle">Attributes</div>
193
- <table border='0' cellpadding='5'>
194
-
195
- <tr valign='top'>
196
- <td class='attr-rw'>
197
- [R]
198
- </td>
199
- <td class='attr-name'>msize</td>
200
- <td class='attr-desc'></td>
201
- </tr>
202
-
203
- </table>
204
-
205
-
206
-
207
- <div class="sectiontitle">Class Public methods</div>
208
-
209
- <div class="method">
210
- <div class="title" id="M000038">
211
-
212
- <a name="M000038"></a><b>new</b>(stream)
213
-
214
- </div>
215
-
216
- <div class="description">
217
- <dl>
218
- <dt>stream</dt><dd>I/O stream on which a 9P2000 server is listening.
219
-
220
- </dd>
221
- </dl>
222
-
223
- </div>
224
-
225
-
226
-
227
-
228
- <div class="sourcecode">
229
- <p class="source-link">
230
- Source: <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show</a>
231
-
232
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L26" target="_blank" class="github_url">on GitHub</a>
233
-
234
- </p>
235
- <div id="M000038_source" class="dyn-source">
236
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 26</span>
237
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">stream</span>
238
- <span class="ruby-ivar">@stream</span> = <span class="ruby-identifier">stream</span>
239
-
240
- <span class="ruby-ivar">@recv_buf</span> = {} <span class="ruby-comment cmt"># tag =&gt; message</span>
241
- <span class="ruby-ivar">@recv_lock</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>
242
-
243
- <span class="ruby-ivar">@tag_pool</span> = <span class="ruby-constant">RangedPool</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">BYTE2_MASK</span>)
244
- <span class="ruby-ivar">@fid_pool</span> = <span class="ruby-constant">RangedPool</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-constant">BYTE4_MASK</span>)
245
-
246
- <span class="ruby-comment cmt"># establish connection with 9P2000 server</span>
247
- <span class="ruby-identifier">req</span> = <span class="ruby-constant">Tversion</span>.<span class="ruby-identifier">new</span>(
248
- <span class="ruby-identifier">:tag</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Fcall</span><span class="ruby-operator">::</span><span class="ruby-constant">NOTAG</span>,
249
- <span class="ruby-identifier">:msize</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Tversion</span><span class="ruby-operator">::</span><span class="ruby-constant">MSIZE</span>,
250
- <span class="ruby-identifier">:version</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Tversion</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
251
- )
252
- <span class="ruby-identifier">rsp</span> = <span class="ruby-identifier">talk</span>(<span class="ruby-identifier">req</span>)
253
-
254
- <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">req</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">rsp</span>.<span class="ruby-identifier">version</span>
255
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-node">&quot;protocol mismatch: self=#{req.version.inspect} server=#{rsp.version.inspect}&quot;</span>
256
- <span class="ruby-keyword kw">end</span>
257
-
258
- <span class="ruby-ivar">@msize</span> = <span class="ruby-identifier">rsp</span>.<span class="ruby-identifier">msize</span>
259
-
260
- <span class="ruby-comment cmt"># authenticate the connection (not necessary for wmii)</span>
261
- <span class="ruby-ivar">@auth_fid</span> = <span class="ruby-constant">Fcall</span><span class="ruby-operator">::</span><span class="ruby-constant">NOFID</span>
262
-
263
- <span class="ruby-comment cmt"># attach to filesystem root</span>
264
- <span class="ruby-ivar">@root_fid</span> = <span class="ruby-ivar">@fid_pool</span>.<span class="ruby-identifier">obtain</span>
265
- <span class="ruby-identifier">attach</span> <span class="ruby-ivar">@root_fid</span>, <span class="ruby-ivar">@auth_fid</span>
266
- <span class="ruby-keyword kw">end</span></pre>
267
- </div>
268
- </div>
269
-
270
- </div>
271
-
272
- <div class="sectiontitle">Instance Public methods</div>
273
-
274
- <div class="method">
275
- <div class="title" id="M000105">
276
-
277
- <a name="M000105"></a><b>attach</b>(root_fid, auth_fid = Fcall::NOFID, auth_name = ENV['USER'])
278
-
279
- </div>
280
-
281
- <div class="description">
282
- <p>
283
- Associates the given FID with the FS root.
284
- </p>
285
-
286
- </div>
287
-
288
-
289
-
290
-
291
- <div class="sourcecode">
292
- <p class="source-link">
293
- Source: <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">show</a>
294
-
295
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L459" target="_blank" class="github_url">on GitHub</a>
296
-
297
- </p>
298
- <div id="M000105_source" class="dyn-source">
299
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 459</span>
300
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attach</span> <span class="ruby-identifier">root_fid</span>, <span class="ruby-identifier">auth_fid</span> = <span class="ruby-constant">Fcall</span><span class="ruby-operator">::</span><span class="ruby-constant">NOFID</span>, <span class="ruby-identifier">auth_name</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'USER'</span>]
301
- <span class="ruby-identifier">talk</span> <span class="ruby-constant">Tattach</span>.<span class="ruby-identifier">new</span>(
302
- <span class="ruby-identifier">:fid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">root_fid</span>,
303
- <span class="ruby-identifier">:afid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">auth_fid</span>,
304
- <span class="ruby-identifier">:uname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'USER'</span>],
305
- <span class="ruby-identifier">:aname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">auth_name</span>
306
- )
307
- <span class="ruby-keyword kw">end</span></pre>
308
- </div>
309
- </div>
310
-
311
- </div>
312
-
313
- <div class="method">
314
- <div class="title" id="M000108">
315
-
316
- <a name="M000108"></a><b>clunk</b>(fid)
317
-
318
- </div>
319
-
320
- <div class="description">
321
- <p>
322
- Retires the given FID from use.
323
- </p>
324
-
325
- </div>
326
-
327
-
328
-
329
-
330
- <div class="sourcecode">
331
- <p class="source-link">
332
- Source: <a href="javascript:toggleSource('M000108_source')" id="l_M000108_source">show</a>
333
-
334
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L471" target="_blank" class="github_url">on GitHub</a>
335
-
336
- </p>
337
- <div id="M000108_source" class="dyn-source">
338
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 471</span>
339
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clunk</span> <span class="ruby-identifier">fid</span>
340
- <span class="ruby-identifier">talk</span> <span class="ruby-constant">Tclunk</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:fid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">fid</span>)
341
- <span class="ruby-ivar">@fid_pool</span>.<span class="ruby-identifier">release</span> <span class="ruby-identifier">fid</span>
342
- <span class="ruby-keyword kw">end</span></pre>
343
- </div>
344
- </div>
345
-
346
- </div>
347
-
348
- <div class="method">
349
- <div class="title" id="M000089">
350
-
351
- <a name="M000089"></a><b>create</b>(path, mode = 'rw', perm = 0644)
352
-
353
- </div>
354
-
355
- <div class="description">
356
- <p>
357
- Creates a new file at the given path that is accessible using the given
358
- modes for a user having the given permission bits.
359
- </p>
360
-
361
- </div>
362
-
363
-
364
-
365
-
366
- <div class="sourcecode">
367
- <p class="source-link">
368
- Source: <a href="javascript:toggleSource('M000089_source')" id="l_M000089_source">show</a>
369
-
370
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L382" target="_blank" class="github_url">on GitHub</a>
371
-
372
- </p>
373
- <div id="M000089_source" class="dyn-source">
374
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 382</span>
375
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span> <span class="ruby-identifier">path</span>, <span class="ruby-identifier">mode</span> = <span class="ruby-value str">'rw'</span>, <span class="ruby-identifier">perm</span> = <span class="ruby-value">0644</span>
376
- <span class="ruby-identifier">prefix</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">path</span>)
377
- <span class="ruby-identifier">target</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">path</span>)
378
-
379
- <span class="ruby-identifier">mode</span> = <span class="ruby-constant">MODES</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">mode</span>)
380
-
381
- <span class="ruby-identifier">with_fid</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">prefix_fid</span><span class="ruby-operator">|</span>
382
- <span class="ruby-identifier">walk_fid</span> <span class="ruby-identifier">prefix_fid</span>, <span class="ruby-identifier">prefix</span>
383
-
384
- <span class="ruby-comment cmt"># create the file</span>
385
- <span class="ruby-identifier">talk</span> <span class="ruby-constant">Tcreate</span>.<span class="ruby-identifier">new</span>(
386
- <span class="ruby-identifier">:fid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">prefix_fid</span>,
387
- <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">target</span>,
388
- <span class="ruby-identifier">:perm</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">perm</span>,
389
- <span class="ruby-identifier">:mode</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">mode</span>
390
- )
391
- <span class="ruby-keyword kw">end</span>
392
- <span class="ruby-keyword kw">end</span></pre>
393
- </div>
394
- </div>
395
-
396
- </div>
397
-
398
- <div class="method">
399
- <div class="title" id="M000084">
400
-
401
- <a name="M000084"></a><b>entries</b>(path)
402
-
403
- </div>
404
-
405
- <div class="description">
406
- <p>
407
- Returns the basenames of all files inside the directory at the given path.
408
- </p>
409
- <p>
410
- See Dir::entries in the Ruby documentation.
411
- </p>
412
-
413
- </div>
414
-
415
-
416
-
417
-
418
- <div class="sourcecode">
419
- <p class="source-link">
420
- Source: <a href="javascript:toggleSource('M000084_source')" id="l_M000084_source">show</a>
421
-
422
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L360" target="_blank" class="github_url">on GitHub</a>
423
-
424
- </p>
425
- <div id="M000084_source" class="dyn-source">
426
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 360</span>
427
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entries</span> <span class="ruby-identifier">path</span>
428
- <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">stat</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">directory?</span>
429
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;#{path.inspect} is not a directory&quot;</span>
430
- <span class="ruby-keyword kw">end</span>
431
-
432
- <span class="ruby-identifier">read</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">map!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">name</span>}
433
- <span class="ruby-keyword kw">end</span></pre>
434
- </div>
435
- </div>
436
-
437
- </div>
438
-
439
- <div class="method">
440
- <div class="title" id="M000064">
441
-
442
- <a name="M000064"></a><b>open</b>(path, mode = 'r')
443
-
444
- </div>
445
-
446
- <div class="description">
447
- <p>
448
- Opens the given path for I/O access through a <a
449
- href="Agent/FidStream.html">FidStream</a> object. If a block is given, it
450
- is invoked with a <a href="Agent/FidStream.html">FidStream</a> object and
451
- the stream is closed afterwards.
452
- </p>
453
- <p>
454
- See File::open in the Ruby documentation.
455
- </p>
456
-
457
- </div>
458
-
459
-
460
-
461
-
462
- <div class="sourcecode">
463
- <p class="source-link">
464
- Source: <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show</a>
465
-
466
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L199" target="_blank" class="github_url">on GitHub</a>
467
-
468
- </p>
469
- <div id="M000064_source" class="dyn-source">
470
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 199</span>
471
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span> <span class="ruby-identifier">path</span>, <span class="ruby-identifier">mode</span> = <span class="ruby-value str">'r'</span> <span class="ruby-comment cmt"># :yields: FidStream</span>
472
- <span class="ruby-identifier">mode</span> = <span class="ruby-constant">MODES</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">mode</span>)
473
-
474
- <span class="ruby-comment cmt"># open the file</span>
475
- <span class="ruby-identifier">path_fid</span> = <span class="ruby-identifier">walk</span>(<span class="ruby-identifier">path</span>)
476
-
477
- <span class="ruby-identifier">talk</span> <span class="ruby-constant">Topen</span>.<span class="ruby-identifier">new</span>(
478
- <span class="ruby-identifier">:fid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">path_fid</span>,
479
- <span class="ruby-identifier">:mode</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">mode</span>
480
- )
481
-
482
- <span class="ruby-identifier">stream</span> = <span class="ruby-constant">FidStream</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">path_fid</span>, <span class="ruby-ivar">@msize</span>)
483
-
484
- <span class="ruby-comment cmt"># return the file stream</span>
485
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
486
- <span class="ruby-keyword kw">begin</span>
487
- <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">stream</span>
488
- <span class="ruby-keyword kw">ensure</span>
489
- <span class="ruby-identifier">stream</span>.<span class="ruby-identifier">close</span>
490
- <span class="ruby-keyword kw">end</span>
491
- <span class="ruby-keyword kw">else</span>
492
- <span class="ruby-identifier">stream</span>
493
- <span class="ruby-keyword kw">end</span>
494
- <span class="ruby-keyword kw">end</span></pre>
495
- </div>
496
- </div>
497
-
498
- </div>
499
-
500
- <div class="method">
501
- <div class="title" id="M000083">
502
-
503
- <a name="M000083"></a><b>read</b>(path, *args)
504
-
505
- </div>
506
-
507
- <div class="description">
508
- <p>
509
- Returns the content of the file/directory at the given path.
510
- </p>
511
-
512
- </div>
513
-
514
-
515
-
516
-
517
- <div class="sourcecode">
518
- <p class="source-link">
519
- Source: <a href="javascript:toggleSource('M000083_source')" id="l_M000083_source">show</a>
520
-
521
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L348" target="_blank" class="github_url">on GitHub</a>
522
-
523
- </p>
524
- <div id="M000083_source" class="dyn-source">
525
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 348</span>
526
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span> <span class="ruby-identifier">path</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
527
- <span class="ruby-identifier">open</span> <span class="ruby-identifier">path</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
528
- <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
529
- <span class="ruby-keyword kw">end</span>
530
- <span class="ruby-keyword kw">end</span></pre>
531
- </div>
532
- </div>
533
-
534
- </div>
535
-
536
- <div class="method">
537
- <div class="title" id="M000055">
538
-
539
- <a name="M000055"></a><b>recv</b>(tag)
540
-
541
- </div>
542
-
543
- <div class="description">
544
- <p>
545
- Returns the reply for the given ticket, which was previously given to you
546
- when you sent the corresponding request (<a
547
- href="Fcall.html">Rumai::IXP::Fcall</a>).
548
- </p>
549
-
550
- </div>
551
-
552
-
553
-
554
-
555
- <div class="sourcecode">
556
- <p class="source-link">
557
- Source: <a href="javascript:toggleSource('M000055_source')" id="l_M000055_source">show</a>
558
-
559
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L124" target="_blank" class="github_url">on GitHub</a>
560
-
561
- </p>
562
- <div id="M000055_source" class="dyn-source">
563
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 124</span>
564
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recv</span> <span class="ruby-identifier">tag</span>
565
- <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
566
- <span class="ruby-identifier">reply</span> = <span class="ruby-ivar">@recv_lock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
567
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@recv_buf</span>.<span class="ruby-identifier">key?</span> <span class="ruby-identifier">tag</span>
568
- <span class="ruby-ivar">@recv_buf</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">tag</span>
569
- <span class="ruby-keyword kw">else</span>
570
- <span class="ruby-comment cmt"># reply was not in the receive buffer, so wait</span>
571
- <span class="ruby-comment cmt"># for the next reply... hoping that it is ours</span>
572
- <span class="ruby-identifier">msg</span> = <span class="ruby-constant">Fcall</span>.<span class="ruby-identifier">from_9p</span>(<span class="ruby-ivar">@stream</span>)
573
-
574
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">tag</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">tag</span>
575
- <span class="ruby-identifier">msg</span>
576
- <span class="ruby-keyword kw">else</span>
577
- <span class="ruby-comment cmt"># we got someone else's reply, so buffer</span>
578
- <span class="ruby-comment cmt"># it (for them to receive) and try again</span>
579
- <span class="ruby-ivar">@recv_buf</span>[<span class="ruby-identifier">msg</span>.<span class="ruby-identifier">tag</span>] = <span class="ruby-identifier">msg</span>
580
- <span class="ruby-keyword kw">nil</span>
581
- <span class="ruby-keyword kw">end</span>
582
- <span class="ruby-keyword kw">end</span>
583
- <span class="ruby-keyword kw">end</span>
584
-
585
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">reply</span>
586
- <span class="ruby-ivar">@tag_pool</span>.<span class="ruby-identifier">release</span> <span class="ruby-identifier">tag</span>
587
-
588
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">reply</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Rerror</span>
589
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-identifier">reply</span>.<span class="ruby-identifier">ename</span>
590
- <span class="ruby-keyword kw">end</span>
591
-
592
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">reply</span>
593
- <span class="ruby-keyword kw">else</span>
594
- <span class="ruby-comment cmt"># give other threads a chance to receive</span>
595
- <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">pass</span>
596
- <span class="ruby-keyword kw">end</span>
597
- <span class="ruby-keyword kw">end</span>
598
- <span class="ruby-keyword kw">end</span></pre>
599
- </div>
600
- </div>
601
-
602
- </div>
603
-
604
- <div class="method">
605
- <div class="title" id="M000093">
606
-
607
- <a name="M000093"></a><b>remove</b>(path)
608
-
609
- </div>
610
-
611
- <div class="description">
612
- <p>
613
- Deletes the file at the given path.
614
- </p>
615
-
616
- </div>
617
-
618
-
619
-
620
-
621
- <div class="sourcecode">
622
- <p class="source-link">
623
- Source: <a href="javascript:toggleSource('M000093_source')" id="l_M000093_source">show</a>
624
-
625
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L404" target="_blank" class="github_url">on GitHub</a>
626
-
627
- </p>
628
- <div id="M000093_source" class="dyn-source">
629
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 404</span>
630
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span> <span class="ruby-identifier">path</span>
631
- <span class="ruby-identifier">path_fid</span> = <span class="ruby-identifier">walk</span>(<span class="ruby-identifier">path</span>)
632
- <span class="ruby-identifier">remove_fid</span> <span class="ruby-identifier">path_fid</span> <span class="ruby-comment cmt"># remove also does clunk</span>
633
- <span class="ruby-keyword kw">end</span></pre>
634
- </div>
635
- </div>
636
-
637
- </div>
638
-
639
- <div class="method">
640
- <div class="title" id="M000096">
641
-
642
- <a name="M000096"></a><b>remove_fid</b>(path_fid)
643
-
644
- </div>
645
-
646
- <div class="description">
647
- <p>
648
- Deletes the file corresponding to the given FID and clunks the given FID.
649
- </p>
650
-
651
- </div>
652
-
653
-
654
-
655
-
656
- <div class="sourcecode">
657
- <p class="source-link">
658
- Source: <a href="javascript:toggleSource('M000096_source')" id="l_M000096_source">show</a>
659
-
660
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L413" target="_blank" class="github_url">on GitHub</a>
661
-
662
- </p>
663
- <div id="M000096_source" class="dyn-source">
664
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 413</span>
665
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_fid</span> <span class="ruby-identifier">path_fid</span>
666
- <span class="ruby-identifier">talk</span> <span class="ruby-constant">Tremove</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:fid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">path_fid</span>)
667
- <span class="ruby-keyword kw">end</span></pre>
668
- </div>
669
- </div>
670
-
671
- </div>
672
-
673
- <div class="method">
674
- <div class="title" id="M000054">
675
-
676
- <a name="M000054"></a><b>send</b>(request)
677
-
678
- </div>
679
-
680
- <div class="description">
681
- <p>
682
- Sends the given request (<a href="Fcall.html">Rumai::IXP::Fcall</a>) and
683
- returns a ticket that you can use later to receive the reply.
684
- </p>
685
-
686
- </div>
687
-
688
-
689
-
690
-
691
- <div class="sourcecode">
692
- <p class="source-link">
693
- Source: <a href="javascript:toggleSource('M000054_source')" id="l_M000054_source">show</a>
694
-
695
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L111" target="_blank" class="github_url">on GitHub</a>
696
-
697
- </p>
698
- <div id="M000054_source" class="dyn-source">
699
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 111</span>
700
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send</span> <span class="ruby-identifier">request</span>
701
- <span class="ruby-identifier">tag</span> = <span class="ruby-ivar">@tag_pool</span>.<span class="ruby-identifier">obtain</span>
702
-
703
- <span class="ruby-identifier">request</span>.<span class="ruby-identifier">tag</span> = <span class="ruby-identifier">tag</span>
704
- <span class="ruby-ivar">@stream</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">to_9p</span>
705
-
706
- <span class="ruby-identifier">tag</span>
707
- <span class="ruby-keyword kw">end</span></pre>
708
- </div>
709
- </div>
710
-
711
- </div>
712
-
713
- <div class="method">
714
- <div class="title" id="M000097">
715
-
716
- <a name="M000097"></a><b>stat</b>(path)
717
-
718
- </div>
719
-
720
- <div class="description">
721
- <p>
722
- Returns information about the file at the given path.
723
- </p>
724
-
725
- </div>
726
-
727
-
728
-
729
-
730
- <div class="sourcecode">
731
- <p class="source-link">
732
- Source: <a href="javascript:toggleSource('M000097_source')" id="l_M000097_source">show</a>
733
-
734
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L420" target="_blank" class="github_url">on GitHub</a>
735
-
736
- </p>
737
- <div id="M000097_source" class="dyn-source">
738
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 420</span>
739
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stat</span> <span class="ruby-identifier">path</span>
740
- <span class="ruby-identifier">with_fid</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path_fid</span><span class="ruby-operator">|</span>
741
- <span class="ruby-identifier">walk_fid</span> <span class="ruby-identifier">path_fid</span>, <span class="ruby-identifier">path</span>
742
- <span class="ruby-identifier">stat_fid</span> <span class="ruby-identifier">path_fid</span>
743
- <span class="ruby-keyword kw">end</span>
744
- <span class="ruby-keyword kw">end</span></pre>
745
- </div>
746
- </div>
747
-
748
- </div>
749
-
750
- <div class="method">
751
- <div class="title" id="M000098">
752
-
753
- <a name="M000098"></a><b>stat_fid</b>(path_fid)
754
-
755
- </div>
756
-
757
- <div class="description">
758
- <p>
759
- Returns information about the file referenced by the given FID.
760
- </p>
761
-
762
- </div>
763
-
764
-
765
-
766
-
767
- <div class="sourcecode">
768
- <p class="source-link">
769
- Source: <a href="javascript:toggleSource('M000098_source')" id="l_M000098_source">show</a>
770
-
771
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L430" target="_blank" class="github_url">on GitHub</a>
772
-
773
- </p>
774
- <div id="M000098_source" class="dyn-source">
775
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 430</span>
776
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stat_fid</span> <span class="ruby-identifier">path_fid</span>
777
- <span class="ruby-identifier">req</span> = <span class="ruby-constant">Tstat</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:fid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">path_fid</span>)
778
- <span class="ruby-identifier">rsp</span> = <span class="ruby-identifier">talk</span>(<span class="ruby-identifier">req</span>)
779
- <span class="ruby-identifier">rsp</span>.<span class="ruby-identifier">stat</span>
780
- <span class="ruby-keyword kw">end</span></pre>
781
- </div>
782
- </div>
783
-
784
- </div>
785
-
786
- <div class="method">
787
- <div class="title" id="M000057">
788
-
789
- <a name="M000057"></a><b>talk</b>(request)
790
-
791
- </div>
792
-
793
- <div class="description">
794
- <p>
795
- Sends the given request (<a href="Fcall.html">Rumai::IXP::Fcall</a>) and
796
- returns its reply.
797
- </p>
798
-
799
- </div>
800
-
801
-
802
-
803
-
804
- <div class="sourcecode">
805
- <p class="source-link">
806
- Source: <a href="javascript:toggleSource('M000057_source')" id="l_M000057_source">show</a>
807
-
808
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L163" target="_blank" class="github_url">on GitHub</a>
809
-
810
- </p>
811
- <div id="M000057_source" class="dyn-source">
812
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 163</span>
813
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">talk</span> <span class="ruby-identifier">request</span>
814
- <span class="ruby-identifier">tag</span> = <span class="ruby-identifier">send</span>(<span class="ruby-identifier">request</span>)
815
-
816
- <span class="ruby-keyword kw">begin</span>
817
- <span class="ruby-identifier">recv</span> <span class="ruby-identifier">tag</span>
818
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Error</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
819
- <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; -- in reply to #{request.inspect}&quot;</span>
820
- <span class="ruby-identifier">raise</span>
821
- <span class="ruby-keyword kw">end</span>
822
- <span class="ruby-keyword kw">end</span></pre>
823
- </div>
824
- </div>
825
-
826
- </div>
827
-
828
- <div class="method">
829
- <div class="title" id="M000101">
830
-
831
- <a name="M000101"></a><b>walk</b>(path)
832
-
833
- </div>
834
-
835
- <div class="description">
836
- <p>
837
- Returns an FID corresponding to the given path.
838
- </p>
839
-
840
- </div>
841
-
842
-
843
-
844
-
845
- <div class="sourcecode">
846
- <p class="source-link">
847
- Source: <a href="javascript:toggleSource('M000101_source')" id="l_M000101_source">show</a>
848
-
849
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L439" target="_blank" class="github_url">on GitHub</a>
850
-
851
- </p>
852
- <div id="M000101_source" class="dyn-source">
853
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 439</span>
854
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">walk</span> <span class="ruby-identifier">path</span>
855
- <span class="ruby-identifier">fid</span> = <span class="ruby-ivar">@fid_pool</span>.<span class="ruby-identifier">obtain</span>
856
- <span class="ruby-identifier">walk_fid</span> <span class="ruby-identifier">fid</span>, <span class="ruby-identifier">path</span>
857
- <span class="ruby-identifier">fid</span>
858
- <span class="ruby-keyword kw">end</span></pre>
859
- </div>
860
- </div>
861
-
862
- </div>
863
-
864
- <div class="method">
865
- <div class="title" id="M000102">
866
-
867
- <a name="M000102"></a><b>walk_fid</b>(path_fid, path)
868
-
869
- </div>
870
-
871
- <div class="description">
872
- <p>
873
- Associates the given FID to the given path.
874
- </p>
875
-
876
- </div>
877
-
878
-
879
-
880
-
881
- <div class="sourcecode">
882
- <p class="source-link">
883
- Source: <a href="javascript:toggleSource('M000102_source')" id="l_M000102_source">show</a>
884
-
885
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L448" target="_blank" class="github_url">on GitHub</a>
886
-
887
- </p>
888
- <div id="M000102_source" class="dyn-source">
889
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 448</span>
890
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">walk_fid</span> <span class="ruby-identifier">path_fid</span>, <span class="ruby-identifier">path</span>
891
- <span class="ruby-identifier">talk</span> <span class="ruby-constant">Twalk</span>.<span class="ruby-identifier">new</span>(
892
- <span class="ruby-identifier">:fid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@root_fid</span>,
893
- <span class="ruby-identifier">:newfid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">path_fid</span>,
894
- <span class="ruby-identifier">:wname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">%r{/+}</span>).<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">empty?</span> }
895
- )
896
- <span class="ruby-keyword kw">end</span></pre>
897
- </div>
898
- </div>
899
-
900
- </div>
901
-
902
- <div class="method">
903
- <div class="title" id="M000085">
904
-
905
- <a name="M000085"></a><b>write</b>(path, content)
906
-
907
- </div>
908
-
909
- <div class="description">
910
- <p>
911
- Writes the given content to the file at the given path.
912
- </p>
913
-
914
- </div>
915
-
916
-
917
-
918
-
919
- <div class="sourcecode">
920
- <p class="source-link">
921
- Source: <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">show</a>
922
-
923
- | <a href="http://github.com/sunaku/rumai/blob/947d8ffb1e3c2bd1aebfca5fae4e7ebb7913607f/lib/rumai/ixp/transport.rb#L372" target="_blank" class="github_url">on GitHub</a>
924
-
925
- </p>
926
- <div id="M000085_source" class="dyn-source">
927
- <pre><span class="ruby-comment cmt"># File lib/rumai/ixp/transport.rb, line 372</span>
928
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span> <span class="ruby-identifier">path</span>, <span class="ruby-identifier">content</span>
929
- <span class="ruby-identifier">open</span> <span class="ruby-identifier">path</span>, <span class="ruby-value str">'w'</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
930
- <span class="ruby-identifier">f</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">content</span>
931
- <span class="ruby-keyword kw">end</span>
932
- <span class="ruby-keyword kw">end</span></pre>
933
- </div>
934
- </div>
935
-
936
- </div>
937
-
938
- </div>
939
- </div>
940
- </body>
941
- </html>