passenger 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (275) hide show
  1. data/Rakefile +8 -5
  2. data/bin/passenger-install-apache2-module +6 -1
  3. data/doc/ApplicationPool algorithm.txt +23 -5
  4. data/doc/Architectural overview.html +778 -0
  5. data/doc/Security of user switching support.html +1 -1
  6. data/doc/Users guide.html +113 -31
  7. data/doc/Users guide.txt +104 -10
  8. data/doc/cxxapi/ApplicationPoolServer_8h-source.html +683 -0
  9. data/doc/cxxapi/ApplicationPool_8h-source.html +224 -0
  10. data/doc/cxxapi/Application_8h-source.html +448 -0
  11. data/doc/cxxapi/Bucket_8h-source.html +61 -0
  12. data/doc/cxxapi/Configuration_8h-source.html +195 -0
  13. data/doc/cxxapi/DummySpawnManager_8h-source.html +126 -0
  14. data/doc/cxxapi/Exceptions_8h-source.html +244 -0
  15. data/doc/cxxapi/Hooks_8h-source.html +63 -0
  16. data/doc/cxxapi/Logging_8h-source.html +136 -0
  17. data/doc/cxxapi/MessageChannel_8h-source.html +524 -0
  18. data/doc/cxxapi/SpawnManager_8h-source.html +593 -0
  19. data/doc/cxxapi/StandardApplicationPool_8h-source.html +732 -0
  20. data/doc/cxxapi/System_8h-source.html +251 -0
  21. data/doc/cxxapi/Utils_8h-source.html +283 -0
  22. data/doc/cxxapi/annotated.html +59 -0
  23. data/doc/cxxapi/classClient-members.html +35 -0
  24. data/doc/cxxapi/classClient.html +117 -0
  25. data/doc/cxxapi/classDirectoryMapper-members.html +38 -0
  26. data/doc/cxxapi/classDirectoryMapper.html +203 -0
  27. data/doc/cxxapi/classHooks-members.html +33 -0
  28. data/doc/cxxapi/classHooks.html +43 -0
  29. data/doc/cxxapi/classPassenger_1_1Application-members.html +38 -0
  30. data/doc/cxxapi/classPassenger_1_1Application.html +229 -0
  31. data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +41 -0
  32. data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +359 -0
  33. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +36 -0
  34. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +225 -0
  35. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +1 -0
  36. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +1 -0
  37. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
  38. data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +43 -0
  39. data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +329 -0
  40. data/doc/cxxapi/classPassenger_1_1BusyException-members.html +33 -0
  41. data/doc/cxxapi/classPassenger_1_1BusyException.html +47 -0
  42. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +33 -0
  43. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +44 -0
  44. data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +33 -0
  45. data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +51 -0
  46. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +33 -0
  47. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +51 -0
  48. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +1 -0
  49. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +1 -0
  50. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
  51. data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +38 -0
  52. data/doc/cxxapi/classPassenger_1_1FileSystemException.html +61 -0
  53. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +1 -0
  54. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +1 -0
  55. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
  56. data/doc/cxxapi/classPassenger_1_1IOException-members.html +33 -0
  57. data/doc/cxxapi/classPassenger_1_1IOException.html +54 -0
  58. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +1 -0
  59. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -0
  60. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
  61. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +47 -0
  62. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +591 -0
  63. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +35 -0
  64. data/doc/cxxapi/classPassenger_1_1SpawnException.html +77 -0
  65. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +37 -0
  66. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +255 -0
  67. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +43 -0
  68. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +400 -0
  69. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +1 -0
  70. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +1 -0
  71. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
  72. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +37 -0
  73. data/doc/cxxapi/classPassenger_1_1SystemException.html +154 -0
  74. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +1 -0
  75. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -0
  76. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
  77. data/doc/cxxapi/classPassenger_1_1TempFile-members.html +36 -0
  78. data/doc/cxxapi/classPassenger_1_1TempFile.html +128 -0
  79. data/doc/cxxapi/classPassenger_1_1Thread-members.html +35 -0
  80. data/doc/cxxapi/classPassenger_1_1Thread.html +100 -0
  81. data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption-members.html +33 -0
  82. data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption.html +46 -0
  83. data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption-members.html +33 -0
  84. data/doc/cxxapi/classboost_1_1this__thread_1_1enable__syscall__interruption.html +44 -0
  85. data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption-members.html +33 -0
  86. data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption.html +44 -0
  87. data/doc/cxxapi/definitions_8h-source.html +28 -0
  88. data/doc/cxxapi/doxygen.css +433 -0
  89. data/doc/cxxapi/doxygen.png +0 -0
  90. data/doc/cxxapi/files.html +42 -0
  91. data/doc/cxxapi/ftv2blank.png +0 -0
  92. data/doc/cxxapi/ftv2doc.png +0 -0
  93. data/doc/cxxapi/ftv2folderclosed.png +0 -0
  94. data/doc/cxxapi/ftv2folderopen.png +0 -0
  95. data/doc/cxxapi/ftv2lastnode.png +0 -0
  96. data/doc/cxxapi/ftv2link.png +0 -0
  97. data/doc/cxxapi/ftv2mlastnode.png +0 -0
  98. data/doc/cxxapi/ftv2mnode.png +0 -0
  99. data/doc/cxxapi/ftv2node.png +0 -0
  100. data/doc/cxxapi/ftv2plastnode.png +0 -0
  101. data/doc/cxxapi/ftv2pnode.png +0 -0
  102. data/doc/cxxapi/ftv2vertline.png +0 -0
  103. data/doc/cxxapi/functions.html +215 -0
  104. data/doc/cxxapi/functions_func.html +210 -0
  105. data/doc/cxxapi/functions_type.html +46 -0
  106. data/doc/cxxapi/functions_vars.html +48 -0
  107. data/doc/cxxapi/graph_legend.dot +22 -0
  108. data/doc/cxxapi/graph_legend.html +87 -0
  109. data/doc/cxxapi/graph_legend.png +0 -0
  110. data/doc/cxxapi/group__Configuration.html +236 -0
  111. data/doc/cxxapi/group__Configuration.png +0 -0
  112. data/doc/cxxapi/group__Core.html +51 -0
  113. data/doc/cxxapi/group__Core.png +0 -0
  114. data/doc/cxxapi/group__Exceptions.html +43 -0
  115. data/doc/cxxapi/group__Hooks.html +46 -0
  116. data/doc/cxxapi/group__Hooks.png +0 -0
  117. data/doc/cxxapi/group__Support.html +406 -0
  118. data/doc/cxxapi/hierarchy.html +67 -0
  119. data/doc/cxxapi/index.html +11 -0
  120. data/doc/cxxapi/inherit__graph__0.map +1 -0
  121. data/doc/cxxapi/inherit__graph__0.md5 +1 -0
  122. data/doc/cxxapi/inherit__graph__0.png +0 -0
  123. data/doc/cxxapi/inherit__graph__1.map +1 -0
  124. data/doc/cxxapi/inherit__graph__1.md5 +1 -0
  125. data/doc/cxxapi/inherit__graph__1.png +0 -0
  126. data/doc/cxxapi/inherit__graph__10.map +1 -0
  127. data/doc/cxxapi/inherit__graph__10.md5 +1 -0
  128. data/doc/cxxapi/inherit__graph__10.png +0 -0
  129. data/doc/cxxapi/inherit__graph__11.map +1 -0
  130. data/doc/cxxapi/inherit__graph__11.md5 +1 -0
  131. data/doc/cxxapi/inherit__graph__11.png +0 -0
  132. data/doc/cxxapi/inherit__graph__12.map +1 -0
  133. data/doc/cxxapi/inherit__graph__12.md5 +1 -0
  134. data/doc/cxxapi/inherit__graph__12.png +0 -0
  135. data/doc/cxxapi/inherit__graph__13.map +1 -0
  136. data/doc/cxxapi/inherit__graph__13.md5 +1 -0
  137. data/doc/cxxapi/inherit__graph__13.png +0 -0
  138. data/doc/cxxapi/inherit__graph__14.map +2 -0
  139. data/doc/cxxapi/inherit__graph__14.md5 +1 -0
  140. data/doc/cxxapi/inherit__graph__14.png +0 -0
  141. data/doc/cxxapi/inherit__graph__15.map +1 -0
  142. data/doc/cxxapi/inherit__graph__15.md5 +1 -0
  143. data/doc/cxxapi/inherit__graph__15.png +0 -0
  144. data/doc/cxxapi/inherit__graph__16.map +1 -0
  145. data/doc/cxxapi/inherit__graph__16.md5 +1 -0
  146. data/doc/cxxapi/inherit__graph__16.png +0 -0
  147. data/doc/cxxapi/inherit__graph__17.map +1 -0
  148. data/doc/cxxapi/inherit__graph__17.md5 +1 -0
  149. data/doc/cxxapi/inherit__graph__17.png +0 -0
  150. data/doc/cxxapi/inherit__graph__18.map +1 -0
  151. data/doc/cxxapi/inherit__graph__18.md5 +1 -0
  152. data/doc/cxxapi/inherit__graph__18.png +0 -0
  153. data/doc/cxxapi/inherit__graph__19.map +2 -0
  154. data/doc/cxxapi/inherit__graph__19.md5 +1 -0
  155. data/doc/cxxapi/inherit__graph__19.png +0 -0
  156. data/doc/cxxapi/inherit__graph__2.map +1 -0
  157. data/doc/cxxapi/inherit__graph__2.md5 +1 -0
  158. data/doc/cxxapi/inherit__graph__2.png +0 -0
  159. data/doc/cxxapi/inherit__graph__20.map +1 -0
  160. data/doc/cxxapi/inherit__graph__20.md5 +1 -0
  161. data/doc/cxxapi/inherit__graph__20.png +0 -0
  162. data/doc/cxxapi/inherit__graph__21.map +1 -0
  163. data/doc/cxxapi/inherit__graph__21.md5 +1 -0
  164. data/doc/cxxapi/inherit__graph__21.png +0 -0
  165. data/doc/cxxapi/inherit__graph__3.map +1 -0
  166. data/doc/cxxapi/inherit__graph__3.md5 +1 -0
  167. data/doc/cxxapi/inherit__graph__3.png +0 -0
  168. data/doc/cxxapi/inherit__graph__4.map +1 -0
  169. data/doc/cxxapi/inherit__graph__4.md5 +1 -0
  170. data/doc/cxxapi/inherit__graph__4.png +0 -0
  171. data/doc/cxxapi/inherit__graph__5.map +1 -0
  172. data/doc/cxxapi/inherit__graph__5.md5 +1 -0
  173. data/doc/cxxapi/inherit__graph__5.png +0 -0
  174. data/doc/cxxapi/inherit__graph__6.map +1 -0
  175. data/doc/cxxapi/inherit__graph__6.md5 +1 -0
  176. data/doc/cxxapi/inherit__graph__6.png +0 -0
  177. data/doc/cxxapi/inherit__graph__7.map +1 -0
  178. data/doc/cxxapi/inherit__graph__7.md5 +1 -0
  179. data/doc/cxxapi/inherit__graph__7.png +0 -0
  180. data/doc/cxxapi/inherit__graph__8.map +1 -0
  181. data/doc/cxxapi/inherit__graph__8.md5 +1 -0
  182. data/doc/cxxapi/inherit__graph__8.png +0 -0
  183. data/doc/cxxapi/inherit__graph__9.map +2 -0
  184. data/doc/cxxapi/inherit__graph__9.md5 +1 -0
  185. data/doc/cxxapi/inherit__graph__9.png +0 -0
  186. data/doc/cxxapi/inherits.html +102 -0
  187. data/doc/cxxapi/main.html +27 -0
  188. data/doc/cxxapi/modules.html +34 -0
  189. data/doc/cxxapi/namespacePassenger.html +208 -0
  190. data/doc/cxxapi/namespacePassenger_1_1InterruptableCalls.html +43 -0
  191. data/doc/cxxapi/namespacemembers.html +70 -0
  192. data/doc/cxxapi/namespacemembers_func.html +66 -0
  193. data/doc/cxxapi/namespacemembers_type.html +46 -0
  194. data/doc/cxxapi/namespaces.html +35 -0
  195. data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +33 -0
  196. data/doc/cxxapi/structPassenger_1_1AnythingToString.html +49 -0
  197. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +33 -0
  198. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +49 -0
  199. data/doc/cxxapi/tab_b.gif +0 -0
  200. data/doc/cxxapi/tab_l.gif +0 -0
  201. data/doc/cxxapi/tab_r.gif +0 -0
  202. data/doc/cxxapi/tabs.css +102 -0
  203. data/doc/cxxapi/tree.html +167 -0
  204. data/doc/rdoc/classes/ConditionVariable.html +160 -0
  205. data/doc/rdoc/classes/Exception.html +120 -0
  206. data/doc/rdoc/classes/GC.html +113 -0
  207. data/doc/rdoc/classes/IO.html +150 -0
  208. data/doc/rdoc/classes/Passenger.html +136 -0
  209. data/doc/rdoc/classes/Passenger/AbstractRequestHandler.html +402 -0
  210. data/doc/rdoc/classes/Passenger/AbstractServer.html +649 -0
  211. data/doc/rdoc/classes/Passenger/AbstractServer/ServerAlreadyStarted.html +97 -0
  212. data/doc/rdoc/classes/Passenger/AbstractServer/ServerError.html +96 -0
  213. data/doc/rdoc/classes/Passenger/AbstractServer/ServerNotStarted.html +97 -0
  214. data/doc/rdoc/classes/Passenger/AbstractServer/UnknownMessage.html +96 -0
  215. data/doc/rdoc/classes/Passenger/AppInitError.html +137 -0
  216. data/doc/rdoc/classes/Passenger/Application.html +298 -0
  217. data/doc/rdoc/classes/Passenger/ConsoleTextTemplate.html +172 -0
  218. data/doc/rdoc/classes/Passenger/FrameworkInitError.html +143 -0
  219. data/doc/rdoc/classes/Passenger/HTMLTemplate.html +175 -0
  220. data/doc/rdoc/classes/Passenger/InitializationError.html +141 -0
  221. data/doc/rdoc/classes/Passenger/MessageChannel.html +488 -0
  222. data/doc/rdoc/classes/Passenger/NativeSupport.html +320 -0
  223. data/doc/rdoc/classes/Passenger/SpawnManager.html +375 -0
  224. data/doc/rdoc/classes/Passenger/UnknownError.html +125 -0
  225. data/doc/rdoc/classes/Passenger/Utils.html +578 -0
  226. data/doc/rdoc/classes/Passenger/VersionNotFound.html +140 -0
  227. data/doc/rdoc/classes/PlatformInfo.html +302 -0
  228. data/doc/rdoc/classes/RakeExtensions.html +197 -0
  229. data/doc/rdoc/created.rid +1 -0
  230. data/doc/rdoc/files/DEVELOPERS_TXT.html +230 -0
  231. data/doc/rdoc/files/README.html +150 -0
  232. data/doc/rdoc/files/ext/passenger/native_support_c.html +92 -0
  233. data/doc/rdoc/files/lib/passenger/abstract_request_handler_rb.html +126 -0
  234. data/doc/rdoc/files/lib/passenger/abstract_server_rb.html +127 -0
  235. data/doc/rdoc/files/lib/passenger/application_rb.html +123 -0
  236. data/doc/rdoc/files/lib/passenger/console_text_template_rb.html +122 -0
  237. data/doc/rdoc/files/lib/passenger/constants_rb.html +114 -0
  238. data/doc/rdoc/files/lib/passenger/dependencies_rb.html +130 -0
  239. data/doc/rdoc/files/lib/passenger/exceptions_rb.html +118 -0
  240. data/doc/rdoc/files/lib/passenger/html_template_rb.html +122 -0
  241. data/doc/rdoc/files/lib/passenger/message_channel_rb.html +118 -0
  242. data/doc/rdoc/files/lib/passenger/platform_info_rb.html +122 -0
  243. data/doc/rdoc/files/lib/passenger/simple_benchmarking_rb.html +118 -0
  244. data/doc/rdoc/files/lib/passenger/spawn_manager_rb.html +139 -0
  245. data/doc/rdoc/files/lib/passenger/utils_rb.html +130 -0
  246. data/doc/rdoc/files/lib/rake/extensions_rb.html +122 -0
  247. data/doc/rdoc/fr_class_index.html +71 -0
  248. data/doc/rdoc/fr_file_index.html +63 -0
  249. data/doc/rdoc/fr_method_index.html +120 -0
  250. data/doc/rdoc/index.html +26 -0
  251. data/doc/rdoc/rdoc-style.css +187 -0
  252. data/ext/apache2/ApplicationPool.h +12 -0
  253. data/ext/apache2/ApplicationPoolServer.h +6 -0
  254. data/ext/apache2/ApplicationPoolServerExecutable.cpp +6 -0
  255. data/ext/apache2/Bucket.cpp +63 -69
  256. data/ext/apache2/Bucket.h +2 -0
  257. data/ext/apache2/Configuration.cpp +24 -0
  258. data/ext/apache2/Configuration.h +16 -1
  259. data/ext/apache2/Hooks.cpp +5 -3
  260. data/ext/apache2/StandardApplicationPool.h +30 -11
  261. data/lib/passenger/abstract_request_handler.rb +3 -0
  262. data/lib/passenger/abstract_server.rb +3 -3
  263. data/lib/passenger/application.rb +4 -2
  264. data/lib/passenger/dependencies.rb +10 -1
  265. data/lib/passenger/platform_info.rb +40 -1
  266. data/lib/passenger/rack/request_handler.rb +4 -2
  267. data/lib/passenger/railz/application_spawner.rb +7 -1
  268. data/lib/passenger/utils.rb +6 -8
  269. data/lib/rake/gempackagetask.rb +0 -6
  270. data/lib/rake/rdoctask.rb +84 -23
  271. data/test/ApplicationPoolTest.cpp +36 -0
  272. data/test/ruby/rails/minimal_spawner_spec.rb +8 -0
  273. data/test/ruby/utils_spec.rb +33 -0
  274. data/test/stub/rails_apps/foobar/config/environments/production.rb +0 -1
  275. metadata +262 -5
@@ -0,0 +1,488 @@
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
+ <html>
6
+ <head>
7
+ <title>Class: Passenger::MessageChannel</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
10
+
11
+ <script language="JavaScript" type="text/javascript">
12
+ // <![CDATA[
13
+
14
+ function toggleSource( id )
15
+ {
16
+ var elem
17
+ var link
18
+
19
+ if( document.getElementById )
20
+ {
21
+ elem = document.getElementById( id )
22
+ link = document.getElementById( "l_" + id )
23
+ }
24
+ else if ( document.all )
25
+ {
26
+ elem = eval( "document.all." + id )
27
+ link = eval( "document.all.l_" + id )
28
+ }
29
+ else
30
+ return false;
31
+
32
+ if( elem.style.display == "block" )
33
+ {
34
+ elem.style.display = "none"
35
+ link.innerHTML = "show source"
36
+ }
37
+ else
38
+ {
39
+ elem.style.display = "block"
40
+ link.innerHTML = "hide source"
41
+ }
42
+ }
43
+
44
+ function openCode( url )
45
+ {
46
+ window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
47
+ }
48
+ // ]]>
49
+ </script>
50
+ </head>
51
+
52
+ <body>
53
+ <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
+ <td class="file-title"><span class="file-title-prefix">Class</span><br />Passenger::MessageChannel</td>
55
+ <td align="right">
56
+ <table cellspacing="0" cellpadding="2">
57
+ <tr valign="top">
58
+ <td>In:</td>
59
+ <td>
60
+ <a href="../../files/lib/passenger/message_channel_rb.html">lib/passenger/message_channel.rb</a>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>Parent:</td>
65
+ <td>
66
+ Object
67
+ </td>
68
+ </tr>
69
+ </table>
70
+ </td>
71
+ </tr>
72
+ </table>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+ <div id="content">
77
+
78
+ <div class="description"><p>
79
+ This class provides convenience methods for:
80
+ </p>
81
+ <ul>
82
+ <li>sending and receiving raw data over an <a href="../IO.html">IO</a> channel.
83
+
84
+ </li>
85
+ <li>sending and receiving messages over an <a href="../IO.html">IO</a> channel.
86
+
87
+ </li>
88
+ <li>file descriptor (<a href="../IO.html">IO</a> object) passing over a Unix
89
+ socket.
90
+
91
+ </li>
92
+ </ul>
93
+ <p>
94
+ All of these methods use exceptions for error reporting.
95
+ </p>
96
+ <p>
97
+ There are two kinds of messages:
98
+ </p>
99
+ <dl>
100
+ <dt> Array messages </dt><dd>These are just a list of strings, and the message itself has a specific
101
+ length. The contained strings may not contain NUL characters
102
+ (<tt>&#8217;\0&#8216;</tt>). Note that an array message must have at least
103
+ one element.
104
+
105
+ </dd>
106
+ <dt> Scalar messages </dt><dd>These are byte strings which may contain arbitrary binary data. Scalar
107
+ messages also have a specific length.
108
+
109
+ </dd>
110
+ </dl>
111
+ <p>
112
+ The protocol is designed to be low overhead, easy to implement and easy to
113
+ parse.
114
+ </p>
115
+ <p>
116
+ <a href="MessageChannel.html">MessageChannel</a> is to be wrapped around an
117
+ <a href="../IO.html">IO</a> object. For example:
118
+ </p>
119
+ <pre>
120
+ a, b = IO.pipe
121
+ channel1 = MessageChannel.new(a)
122
+ channel2 = MessageChannel.new(b)
123
+
124
+ # Send an array message.
125
+ channel2.write(&quot;hello&quot;, &quot;world !!&quot;)
126
+ channel1.read # =&gt; [&quot;hello&quot;, &quot;world !!&quot;]
127
+
128
+ # Send a scalar message.
129
+ channel2.write_scalar(&quot;some long string which can contain arbitrary binary data&quot;)
130
+ channel1.read_scalar
131
+ </pre>
132
+ <p>
133
+ The life time of a <a href="MessageChannel.html">MessageChannel</a> is
134
+ independent from that of the wrapped <a href="../IO.html">IO</a> object. If
135
+ a <a href="MessageChannel.html">MessageChannel</a> object is destroyed, the
136
+ underlying <a href="../IO.html">IO</a> object is not automatically closed.
137
+ Call <a href="MessageChannel.html#M000074">close</a>() if you want to <a
138
+ href="MessageChannel.html#M000074">close</a> the underlying <a
139
+ href="../IO.html">IO</a> object.
140
+ </p>
141
+ <p>
142
+ Note: Be careful with mixing the sending/receiving of array messages,
143
+ scalar messages and <a href="../IO.html">IO</a> objects. If you send a
144
+ collection of any of these in a specific order, then the receiving side
145
+ must receive them in the exact some order. So suppose you first send a
146
+ message, then an <a href="../IO.html">IO</a> object, then a scalar, then
147
+ the receiving side must first receive a message, then an <a
148
+ href="../IO.html">IO</a> object, then a scalar. If the receiving side does
149
+ things in the wrong order then bad things will happen.
150
+ </p>
151
+ </div>
152
+
153
+
154
+
155
+ <div class="sectiontitle">Methods</div>
156
+ <ul>
157
+ <li><a href="#M000074">close</a></li>
158
+ <li><a href="#M000073">fileno</a></li>
159
+ <li><a href="#M000066">new</a></li>
160
+ <li><a href="#M000067">read</a></li>
161
+ <li><a href="#M000068">read_scalar</a></li>
162
+ <li><a href="#M000071">recv_io</a></li>
163
+ <li><a href="#M000072">send_io</a></li>
164
+ <li><a href="#M000069">write</a></li>
165
+ <li><a href="#M000070">write_scalar</a></li>
166
+ </ul>
167
+
168
+
169
+
170
+
171
+
172
+ <div class="sectiontitle">Attributes</div>
173
+ <table border='0' cellpadding='5'>
174
+ <tr valign='top'>
175
+ <td class='attr-rw'>
176
+ [R]
177
+ </td>
178
+ <td class='attr-name'>io</td>
179
+ <td class='attr-desc'>
180
+ The wrapped <a href="../IO.html">IO</a> object.
181
+
182
+ </td>
183
+ </tr>
184
+ </table>
185
+
186
+ <div class="sectiontitle">Public Class methods</div>
187
+ <div class="method">
188
+ <div class="title">
189
+ <a name="M000066"></a><b>new</b>(io)
190
+ </div>
191
+ <div class="description">
192
+ <p>
193
+ Create a <a href="MessageChannel.html#M000066">new</a> <a
194
+ href="MessageChannel.html">MessageChannel</a> by wrapping the given <a
195
+ href="../IO.html">IO</a> object.
196
+ </p>
197
+ </div>
198
+ <div class="sourcecode">
199
+ <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p>
200
+ <div id="M000066_source" class="dyn-source">
201
+ <pre>
202
+ <span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 77</span>
203
+ 77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">io</span>)
204
+ 78: <span class="ruby-ivar">@io</span> = <span class="ruby-identifier">io</span>
205
+ 79: <span class="ruby-keyword kw">end</span>
206
+ </pre>
207
+ </div>
208
+ </div>
209
+ </div>
210
+ <div class="sectiontitle">Public Instance methods</div>
211
+ <div class="method">
212
+ <div class="title">
213
+ <a name="M000074"></a><b>close</b>()
214
+ </div>
215
+ <div class="description">
216
+ <p>
217
+ Close the underlying <a href="../IO.html">IO</a> stream. Might raise
218
+ SystemCallError or IOError when something goes wrong.
219
+ </p>
220
+ </div>
221
+ <div class="sourcecode">
222
+ <p class="source-link">[ <a href="javascript:toggleSource('M000074_source')" id="l_M000074_source">show source</a> ]</p>
223
+ <div id="M000074_source" class="dyn-source">
224
+ <pre>
225
+ <span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 210</span>
226
+ 210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
227
+ 211: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">close</span>
228
+ 212: <span class="ruby-keyword kw">end</span>
229
+ </pre>
230
+ </div>
231
+ </div>
232
+ </div>
233
+ <div class="method">
234
+ <div class="title">
235
+ <a name="M000073"></a><b>fileno</b>()
236
+ </div>
237
+ <div class="description">
238
+ <p>
239
+ Return the file descriptor of the underlying <a href="../IO.html">IO</a>
240
+ object.
241
+ </p>
242
+ </div>
243
+ <div class="sourcecode">
244
+ <p class="source-link">[ <a href="javascript:toggleSource('M000073_source')" id="l_M000073_source">show source</a> ]</p>
245
+ <div id="M000073_source" class="dyn-source">
246
+ <pre>
247
+ <span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 204</span>
248
+ 204: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fileno</span>
249
+ 205: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">fileno</span>
250
+ 206: <span class="ruby-keyword kw">end</span>
251
+ </pre>
252
+ </div>
253
+ </div>
254
+ </div>
255
+ <div class="method">
256
+ <div class="title">
257
+ <a name="M000067"></a><b>read</b>()
258
+ </div>
259
+ <div class="description">
260
+ <p>
261
+ Read an array message from the underlying file descriptor. Returns the
262
+ array message as an array, or nil when end-of-stream has been reached.
263
+ </p>
264
+ <p>
265
+ Might raise SystemCallError, IOError or SocketError when something goes
266
+ wrong.
267
+ </p>
268
+ </div>
269
+ <div class="sourcecode">
270
+ <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p>
271
+ <div id="M000067_source" class="dyn-source">
272
+ <pre>
273
+ <span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 87</span>
274
+ 87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span>
275
+ 88: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
276
+ 89: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">HEADER_SIZE</span>
277
+ 90: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-constant">HEADER_SIZE</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
278
+ 91: <span class="ruby-keyword kw">end</span>
279
+ 92:
280
+ 93: <span class="ruby-identifier">chunk_size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'n'</span>)[<span class="ruby-value">0</span>]
281
+ 94: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
282
+ 95: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">chunk_size</span>
283
+ 96: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">chunk_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
284
+ 97: <span class="ruby-keyword kw">end</span>
285
+ 98:
286
+ 99: <span class="ruby-identifier">message</span> = []
287
+ 100: <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>
288
+ 101: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
289
+ 102: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">delimiter_pos</span>.<span class="ruby-identifier">nil?</span>
290
+ 103: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
291
+ 104: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&quot;</span>
292
+ 105: <span class="ruby-keyword kw">else</span>
293
+ 106: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">offset</span> <span class="ruby-operator">..</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
294
+ 107: <span class="ruby-keyword kw">end</span>
295
+ 108: <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
296
+ 109: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
297
+ 110: <span class="ruby-keyword kw">end</span>
298
+ 111: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">message</span>
299
+ 112: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
300
+ 113: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
301
+ 114: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
302
+ 115: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
303
+ 116: <span class="ruby-keyword kw">end</span>
304
+ </pre>
305
+ </div>
306
+ </div>
307
+ </div>
308
+ <div class="method">
309
+ <div class="title">
310
+ <a name="M000068"></a><b>read_scalar</b>(max_size = nil)
311
+ </div>
312
+ <div class="description">
313
+ <p>
314
+ Read a scalar message from the underlying <a href="../IO.html">IO</a>
315
+ object. Returns the <a href="MessageChannel.html#M000067">read</a> message,
316
+ or nil on end-of-stream.
317
+ </p>
318
+ <p>
319
+ Might raise SystemCallError, IOError or SocketError when something goes
320
+ wrong.
321
+ </p>
322
+ <p>
323
+ The <tt>max_size</tt> argument allows one to specify the maximum allowed
324
+ size for the scalar message. If the received scalar message&#8216;s size is
325
+ larger than <tt>max_size</tt>, then a SecurityError will be raised.
326
+ </p>
327
+ </div>
328
+ <div class="sourcecode">
329
+ <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p>
330
+ <div id="M000068_source" class="dyn-source">
331
+ <pre>
332
+ <span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 127</span>
333
+ 127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_scalar</span>(<span class="ruby-identifier">max_size</span> = <span class="ruby-keyword kw">nil</span>)
334
+ 128: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
335
+ 129: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span>
336
+ 130: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">4</span>
337
+ 131: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">4</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
338
+ 132: <span class="ruby-keyword kw">end</span>
339
+ 133: <span class="ruby-identifier">size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'N'</span>)[<span class="ruby-value">0</span>]
340
+ 134: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
341
+ 135: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">''</span>
342
+ 136: <span class="ruby-keyword kw">else</span>
343
+ 137: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">max_size</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">max_size</span>
344
+ 138: <span class="ruby-identifier">raise</span> <span class="ruby-constant">SecurityError</span>, <span class="ruby-node">&quot;Scalar message size (#{size}) &quot;</span> <span class="ruby-operator">&lt;&lt;</span>
345
+ 139: <span class="ruby-node">&quot;exceeds maximum allowed size (#{max_size}).&quot;</span>
346
+ 140: <span class="ruby-keyword kw">end</span>
347
+ 141: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
348
+ 142: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">size</span>
349
+ 143: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
350
+ 144: <span class="ruby-keyword kw">end</span>
351
+ 145: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">buffer</span>
352
+ 146: <span class="ruby-keyword kw">end</span>
353
+ 147: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
354
+ 148: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
355
+ 149: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
356
+ 150: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
357
+ 151: <span class="ruby-keyword kw">end</span>
358
+ </pre>
359
+ </div>
360
+ </div>
361
+ </div>
362
+ <div class="method">
363
+ <div class="title">
364
+ <a name="M000071"></a><b>recv_io</b>()
365
+ </div>
366
+ <div class="description">
367
+ <p>
368
+ Receive an <a href="../IO.html">IO</a> object (a file descriptor) from the
369
+ channel. The other side must have sent an <a href="../IO.html">IO</a>
370
+ object by calling <a href="MessageChannel.html#M000072">send_io</a>(). Note
371
+ that this only works on Unix sockets.
372
+ </p>
373
+ <p>
374
+ Might raise SystemCallError, IOError or SocketError when something goes
375
+ wrong.
376
+ </p>
377
+ </div>
378
+ <div class="sourcecode">
379
+ <p class="source-link">[ <a href="javascript:toggleSource('M000071_source')" id="l_M000071_source">show source</a> ]</p>
380
+ <div id="M000071_source" class="dyn-source">
381
+ <pre>
382
+ <span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 189</span>
383
+ 189: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recv_io</span>
384
+ 190: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">recv_io</span>
385
+ 191: <span class="ruby-keyword kw">end</span>
386
+ </pre>
387
+ </div>
388
+ </div>
389
+ </div>
390
+ <div class="method">
391
+ <div class="title">
392
+ <a name="M000072"></a><b>send_io</b>(io)
393
+ </div>
394
+ <div class="description">
395
+ <p>
396
+ Send an <a href="../IO.html">IO</a> object (a file descriptor) over the
397
+ channel. The other side must receive the <a href="../IO.html">IO</a> object
398
+ by calling <a href="MessageChannel.html#M000071">recv_io</a>(). Note that
399
+ this only works on Unix sockets.
400
+ </p>
401
+ <p>
402
+ Might raise SystemCallError, IOError or SocketError when something goes
403
+ wrong.
404
+ </p>
405
+ </div>
406
+ <div class="sourcecode">
407
+ <p class="source-link">[ <a href="javascript:toggleSource('M000072_source')" id="l_M000072_source">show source</a> ]</p>
408
+ <div id="M000072_source" class="dyn-source">
409
+ <pre>
410
+ <span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 199</span>
411
+ 199: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
412
+ 200: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
413
+ 201: <span class="ruby-keyword kw">end</span>
414
+ </pre>
415
+ </div>
416
+ </div>
417
+ </div>
418
+ <div class="method">
419
+ <div class="title">
420
+ <a name="M000069"></a><b>write</b>(name, *args)
421
+ </div>
422
+ <div class="description">
423
+ <p>
424
+ Send an array message, which consists of the given elements, over the
425
+ underlying file descriptor. <em>name</em> is the first element in the
426
+ message, and <em>args</em> are the other elements. These arguments will
427
+ internally be converted to strings by calling to_s().
428
+ </p>
429
+ <p>
430
+ Might raise SystemCallError, IOError or SocketError when something goes
431
+ wrong.
432
+ </p>
433
+ </div>
434
+ <div class="sourcecode">
435
+ <p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p>
436
+ <div id="M000069_source" class="dyn-source">
437
+ <pre>
438
+ <span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 160</span>
439
+ 160: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
440
+ 161: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">name</span>)
441
+ 162: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
442
+ 163: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">arg</span>)
443
+ 164: <span class="ruby-keyword kw">end</span>
444
+ 165:
445
+ 166: <span class="ruby-identifier">message</span> = <span class="ruby-node">&quot;#{name}#{DELIMITER}&quot;</span>
446
+ 167: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
447
+ 168: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">DELIMITER</span>
448
+ 169: <span class="ruby-keyword kw">end</span>
449
+ 170: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">message</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'n'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">message</span>)
450
+ 171: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
451
+ 172: <span class="ruby-keyword kw">end</span>
452
+ </pre>
453
+ </div>
454
+ </div>
455
+ </div>
456
+ <div class="method">
457
+ <div class="title">
458
+ <a name="M000070"></a><b>write_scalar</b>(data)
459
+ </div>
460
+ <div class="description">
461
+ <p>
462
+ Send a scalar message over the underlying <a href="../IO.html">IO</a>
463
+ object.
464
+ </p>
465
+ <p>
466
+ Might raise SystemCallError, IOError or SocketError when something goes
467
+ wrong.
468
+ </p>
469
+ </div>
470
+ <div class="sourcecode">
471
+ <p class="source-link">[ <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show source</a> ]</p>
472
+ <div id="M000070_source" class="dyn-source">
473
+ <pre>
474
+ <span class="ruby-comment cmt"># File lib/passenger/message_channel.rb, line 178</span>
475
+ 178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_scalar</span>(<span class="ruby-identifier">data</span>)
476
+ 179: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">data</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'N'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">data</span>)
477
+ 180: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
478
+ 181: <span class="ruby-keyword kw">end</span>
479
+ </pre>
480
+ </div>
481
+ </div>
482
+ </div>
483
+ </div>
484
+
485
+ </div>
486
+
487
+ </body>
488
+ </html>