passenger 2.2.9 → 2.2.10

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 (435) hide show
  1. data/NEWS +10 -0
  2. data/doc/Architectural overview.html +202 -65
  3. data/doc/Security of user switching support.html +200 -63
  4. data/doc/Users guide Apache.html +266 -129
  5. data/doc/Users guide Nginx.html +234 -97
  6. data/doc/cxxapi/AbstractSpawnManager_8h-source.html +138 -0
  7. data/doc/cxxapi/Account_8h-source.html +202 -0
  8. data/doc/cxxapi/AccountsDatabase_8h-source.html +158 -0
  9. data/doc/cxxapi/AgentsStarter_8h-source.html +79 -0
  10. data/doc/cxxapi/BCrypt_8h-source.html +101 -0
  11. data/doc/cxxapi/BacktracesServer_8h-source.html +87 -0
  12. data/doc/cxxapi/Base64_8h-source.html +85 -0
  13. data/doc/cxxapi/Blowfish_8h-source.html +131 -0
  14. data/doc/cxxapi/Bucket_8h-source.html +1 -1
  15. data/doc/cxxapi/CachedFileStat_8h-source.html +49 -157
  16. data/doc/cxxapi/Configuration_8h-source.html +1 -1
  17. data/doc/cxxapi/Constants_8h-source.html +71 -0
  18. data/doc/cxxapi/ContentHandler_8h-source.html +92 -0
  19. data/doc/cxxapi/DirectoryMapper_8h-source.html +1 -1
  20. data/doc/cxxapi/Exceptions_8h-source.html +332 -236
  21. data/doc/cxxapi/FileChangeChecker_8h-source.html +237 -0
  22. data/doc/cxxapi/FileDescriptor_8h-source.html +206 -0
  23. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  24. data/doc/cxxapi/HttpStatusExtractor_8h-source.html +378 -0
  25. data/doc/cxxapi/LoggingServer_8h-source.html +165 -0
  26. data/doc/cxxapi/Logging_8h-source.html +580 -112
  27. data/doc/cxxapi/MessageChannel_8h-source.html +789 -599
  28. data/doc/cxxapi/MessageClient_8h-source.html +297 -0
  29. data/doc/cxxapi/MessageServer_8h-source.html +607 -0
  30. data/doc/cxxapi/PoolOptions_8h-source.html +471 -278
  31. data/doc/cxxapi/Process_8h-source.html +272 -0
  32. data/doc/cxxapi/RandomGenerator_8h-source.html +156 -0
  33. data/doc/cxxapi/ResourceLocator_8h-source.html +104 -0
  34. data/doc/cxxapi/ScgiRequestParser_8h-source.html +399 -0
  35. data/doc/cxxapi/ServerInstanceDir_8h-source.html +356 -0
  36. data/doc/cxxapi/Session_8h-source.html +483 -0
  37. data/doc/cxxapi/SpawnManager_8h-source.html +590 -546
  38. data/doc/cxxapi/StaticContentHandler_8h-source.html +65 -0
  39. data/doc/cxxapi/StaticString_8h-source.html +214 -0
  40. data/doc/cxxapi/StringListCreator_8h-source.html +111 -0
  41. data/doc/cxxapi/SystemTime_8h-source.html +191 -78
  42. data/doc/cxxapi/Timer_8h-source.html +157 -0
  43. data/doc/cxxapi/Utils_8h-source.html +621 -434
  44. data/doc/cxxapi/Version_8h-source.html +59 -0
  45. data/doc/cxxapi/annotated.html +1 -1
  46. data/doc/cxxapi/apache2_2Configuration_8h-source.html +79 -0
  47. data/doc/cxxapi/classAgentWatcher-members.html +50 -0
  48. data/doc/cxxapi/classAgentWatcher.html +445 -0
  49. data/doc/cxxapi/classClient-members.html +4 -3
  50. data/doc/cxxapi/classClient.html +50 -46
  51. data/doc/cxxapi/classHooks-members.html +1 -1
  52. data/doc/cxxapi/classHooks.html +1 -1
  53. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager-members.html +37 -0
  54. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager.html +191 -0
  55. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.map +1 -0
  56. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.md5 +1 -0
  57. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.png +0 -0
  58. data/doc/cxxapi/{classPassenger_1_1DummySpawnManager-members.html → classPassenger_1_1ArgumentException-members.html} +3 -2
  59. data/doc/cxxapi/classPassenger_1_1ArgumentException.html +52 -0
  60. data/doc/cxxapi/classPassenger_1_1BacktracesServer-members.html +36 -0
  61. data/doc/cxxapi/classPassenger_1_1BacktracesServer.html +107 -0
  62. data/doc/cxxapi/classPassenger_1_1BacktracesServer__inherit__graph.map +1 -0
  63. data/doc/cxxapi/classPassenger_1_1BacktracesServer__inherit__graph.md5 +1 -0
  64. data/doc/cxxapi/classPassenger_1_1BacktracesServer__inherit__graph.png +0 -0
  65. data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +3 -3
  66. data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +18 -34
  67. data/doc/cxxapi/classPassenger_1_1BusyException-members.html +2 -1
  68. data/doc/cxxapi/classPassenger_1_1BusyException.html +3 -2
  69. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +2 -1
  70. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +3 -2
  71. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +1 -1
  72. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +1 -1
  73. data/doc/cxxapi/{classPassenger_1_1FileChecker-members.html → classPassenger_1_1EOFException-members.html} +3 -4
  74. data/doc/cxxapi/classPassenger_1_1EOFException.html +57 -0
  75. data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.map +1 -0
  76. data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.md5 +1 -0
  77. data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.png +0 -0
  78. data/doc/cxxapi/classPassenger_1_1EventFd-members.html +33 -0
  79. data/doc/cxxapi/classPassenger_1_1EventFd.html +49 -0
  80. data/doc/cxxapi/classPassenger_1_1FileChangeChecker-members.html +37 -0
  81. data/doc/cxxapi/classPassenger_1_1FileChangeChecker.html +166 -0
  82. data/doc/cxxapi/classPassenger_1_1FileDescriptor-members.html +37 -0
  83. data/doc/cxxapi/classPassenger_1_1FileDescriptor.html +159 -0
  84. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +2 -1
  85. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +3 -2
  86. data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +2 -1
  87. data/doc/cxxapi/classPassenger_1_1FileSystemException.html +3 -2
  88. data/doc/cxxapi/{classPassenger_1_1ApplicationPoolServer-members.html → classPassenger_1_1HttpStatusExtractor-members.html} +6 -5
  89. data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor.html +128 -0
  90. data/doc/cxxapi/classPassenger_1_1IOException-members.html +2 -1
  91. data/doc/cxxapi/classPassenger_1_1IOException.html +4 -3
  92. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +2 -1
  93. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -1
  94. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
  95. data/doc/cxxapi/classPassenger_1_1MemZeroGuard-members.html +36 -0
  96. data/doc/cxxapi/classPassenger_1_1MemZeroGuard.html +147 -0
  97. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +12 -5
  98. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +267 -34
  99. data/doc/cxxapi/classPassenger_1_1MessageServer-members.html +46 -0
  100. data/doc/cxxapi/classPassenger_1_1MessageServer.html +438 -0
  101. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext-members.html +33 -0
  102. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext.html +56 -0
  103. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.map +1 -0
  104. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.md5 +1 -0
  105. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.png +0 -0
  106. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext-members.html +38 -0
  107. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext.html +175 -0
  108. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.map +1 -0
  109. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.md5 +1 -0
  110. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.png +0 -0
  111. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler-members.html +36 -0
  112. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler.html +176 -0
  113. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler__inherit__graph.map +1 -0
  114. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler__inherit__graph.md5 +1 -0
  115. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler__inherit__graph.png +0 -0
  116. data/doc/cxxapi/classPassenger_1_1Process-members.html +40 -0
  117. data/doc/cxxapi/classPassenger_1_1Process.html +266 -0
  118. data/doc/cxxapi/classPassenger_1_1RandomGenerator-members.html +33 -0
  119. data/doc/cxxapi/classPassenger_1_1RandomGenerator.html +51 -0
  120. data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +2 -1
  121. data/doc/cxxapi/classPassenger_1_1RuntimeException.html +3 -2
  122. data/doc/cxxapi/classPassenger_1_1ScgiRequestParser-members.html +47 -0
  123. data/doc/cxxapi/classPassenger_1_1ScgiRequestParser.html +302 -0
  124. data/doc/cxxapi/classPassenger_1_1SecurityException-members.html +33 -0
  125. data/doc/cxxapi/classPassenger_1_1SecurityException.html +52 -0
  126. data/doc/cxxapi/classPassenger_1_1Session-members.html +50 -0
  127. data/doc/cxxapi/classPassenger_1_1Session.html +577 -0
  128. data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.map +1 -0
  129. data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.md5 +1 -0
  130. data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.png +0 -0
  131. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +2 -1
  132. data/doc/cxxapi/classPassenger_1_1SpawnException.html +5 -4
  133. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +8 -5
  134. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +127 -45
  135. data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.map +1 -0
  136. data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.md5 +1 -0
  137. data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.png +0 -0
  138. data/doc/cxxapi/classPassenger_1_1StandardSession-members.html +51 -0
  139. data/doc/cxxapi/classPassenger_1_1StandardSession.html +415 -0
  140. data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.map +1 -0
  141. data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.md5 +1 -0
  142. data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.png +0 -0
  143. data/doc/cxxapi/classPassenger_1_1StaticString-members.html +33 -0
  144. data/doc/cxxapi/classPassenger_1_1StaticString.html +54 -0
  145. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +2 -1
  146. data/doc/cxxapi/classPassenger_1_1SystemException.html +4 -3
  147. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +1 -0
  148. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -1
  149. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
  150. data/doc/cxxapi/classPassenger_1_1SystemTime-members.html +9 -1
  151. data/doc/cxxapi/classPassenger_1_1SystemTime.html +92 -8
  152. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException-members.html +37 -0
  153. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException.html +57 -0
  154. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.map +1 -0
  155. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.md5 +1 -0
  156. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.png +0 -0
  157. data/doc/cxxapi/classPassenger_1_1TimeoutException-members.html +33 -0
  158. data/doc/cxxapi/classPassenger_1_1TimeoutException.html +50 -0
  159. data/doc/cxxapi/{classPassenger_1_1Application-members.html → classPassenger_1_1Timer-members.html} +8 -7
  160. data/doc/cxxapi/classPassenger_1_1Timer.html +163 -0
  161. data/doc/cxxapi/classServer-members.html +33 -0
  162. data/doc/cxxapi/classServer.html +46 -0
  163. data/doc/cxxapi/classServerInstanceDirToucher-members.html +33 -0
  164. data/doc/cxxapi/classServerInstanceDirToucher.html +43 -0
  165. data/doc/cxxapi/classes.html +1 -1
  166. data/doc/cxxapi/definitions_8h-source.html +1 -1
  167. data/doc/cxxapi/files.html +1 -1
  168. data/doc/cxxapi/functions.html +1 -1
  169. data/doc/cxxapi/{functions_type.html → functions_enum.html} +7 -5
  170. data/doc/cxxapi/functions_eval.html +55 -0
  171. data/doc/cxxapi/functions_func.html +1 -1
  172. data/doc/cxxapi/functions_vars.html +106 -9
  173. data/doc/cxxapi/graph_legend.html +1 -1
  174. data/doc/cxxapi/group__Configuration.html +1 -1
  175. data/doc/cxxapi/group__Core.html +1 -1
  176. data/doc/cxxapi/group__Exceptions.html +17 -1
  177. data/doc/cxxapi/group__Hooks.html +1 -1
  178. data/doc/cxxapi/group__Support.html +1 -1
  179. data/doc/cxxapi/hierarchy.html +34 -12
  180. data/doc/cxxapi/inherit__graph__0.map +1 -1
  181. data/doc/cxxapi/inherit__graph__0.md5 +1 -1
  182. data/doc/cxxapi/inherit__graph__0.png +0 -0
  183. data/doc/cxxapi/inherit__graph__1.map +1 -1
  184. data/doc/cxxapi/inherit__graph__1.md5 +1 -1
  185. data/doc/cxxapi/inherit__graph__1.png +0 -0
  186. data/doc/cxxapi/inherit__graph__10.map +1 -1
  187. data/doc/cxxapi/inherit__graph__10.md5 +1 -1
  188. data/doc/cxxapi/inherit__graph__10.png +0 -0
  189. data/doc/cxxapi/inherit__graph__11.map +1 -1
  190. data/doc/cxxapi/inherit__graph__11.md5 +1 -1
  191. data/doc/cxxapi/inherit__graph__11.png +0 -0
  192. data/doc/cxxapi/inherit__graph__12.map +1 -1
  193. data/doc/cxxapi/inherit__graph__12.md5 +1 -1
  194. data/doc/cxxapi/inherit__graph__12.png +0 -0
  195. data/doc/cxxapi/inherit__graph__13.map +1 -1
  196. data/doc/cxxapi/inherit__graph__13.md5 +1 -1
  197. data/doc/cxxapi/inherit__graph__13.png +0 -0
  198. data/doc/cxxapi/inherit__graph__14.map +3 -2
  199. data/doc/cxxapi/inherit__graph__14.md5 +1 -1
  200. data/doc/cxxapi/inherit__graph__14.png +0 -0
  201. data/doc/cxxapi/inherit__graph__15.map +1 -1
  202. data/doc/cxxapi/inherit__graph__15.md5 +1 -1
  203. data/doc/cxxapi/inherit__graph__15.png +0 -0
  204. data/doc/cxxapi/inherit__graph__16.map +1 -1
  205. data/doc/cxxapi/inherit__graph__16.md5 +1 -1
  206. data/doc/cxxapi/inherit__graph__16.png +0 -0
  207. data/doc/cxxapi/inherit__graph__17.map +1 -1
  208. data/doc/cxxapi/inherit__graph__17.md5 +1 -1
  209. data/doc/cxxapi/inherit__graph__17.png +0 -0
  210. data/doc/cxxapi/inherit__graph__18.map +2 -1
  211. data/doc/cxxapi/inherit__graph__18.md5 +1 -1
  212. data/doc/cxxapi/inherit__graph__18.png +0 -0
  213. data/doc/cxxapi/inherit__graph__19.map +1 -1
  214. data/doc/cxxapi/inherit__graph__19.md5 +1 -1
  215. data/doc/cxxapi/inherit__graph__19.png +0 -0
  216. data/doc/cxxapi/inherit__graph__2.map +1 -1
  217. data/doc/cxxapi/inherit__graph__2.md5 +1 -1
  218. data/doc/cxxapi/inherit__graph__2.png +0 -0
  219. data/doc/cxxapi/inherit__graph__20.map +1 -2
  220. data/doc/cxxapi/inherit__graph__20.md5 +1 -1
  221. data/doc/cxxapi/inherit__graph__20.png +0 -0
  222. data/doc/cxxapi/inherit__graph__21.map +1 -1
  223. data/doc/cxxapi/inherit__graph__21.md5 +1 -1
  224. data/doc/cxxapi/inherit__graph__21.png +0 -0
  225. data/doc/cxxapi/inherit__graph__22.map +1 -0
  226. data/doc/cxxapi/inherit__graph__22.md5 +1 -0
  227. data/doc/cxxapi/inherit__graph__22.png +0 -0
  228. data/doc/cxxapi/inherit__graph__23.map +1 -0
  229. data/doc/cxxapi/inherit__graph__23.md5 +1 -0
  230. data/doc/cxxapi/inherit__graph__23.png +0 -0
  231. data/doc/cxxapi/inherit__graph__24.map +1 -0
  232. data/doc/cxxapi/inherit__graph__24.md5 +1 -0
  233. data/doc/cxxapi/inherit__graph__24.png +0 -0
  234. data/doc/cxxapi/inherit__graph__25.map +1 -0
  235. data/doc/cxxapi/inherit__graph__25.md5 +1 -0
  236. data/doc/cxxapi/inherit__graph__25.png +0 -0
  237. data/doc/cxxapi/inherit__graph__26.map +1 -0
  238. data/doc/cxxapi/inherit__graph__26.md5 +1 -0
  239. data/doc/cxxapi/inherit__graph__26.png +0 -0
  240. data/doc/cxxapi/inherit__graph__27.map +2 -0
  241. data/doc/cxxapi/inherit__graph__27.md5 +1 -0
  242. data/doc/cxxapi/inherit__graph__27.png +0 -0
  243. data/doc/cxxapi/inherit__graph__28.map +1 -0
  244. data/doc/cxxapi/inherit__graph__28.md5 +1 -0
  245. data/doc/cxxapi/inherit__graph__28.png +0 -0
  246. data/doc/cxxapi/inherit__graph__29.map +1 -0
  247. data/doc/cxxapi/inherit__graph__29.md5 +1 -0
  248. data/doc/cxxapi/inherit__graph__29.png +0 -0
  249. data/doc/cxxapi/inherit__graph__3.map +2 -1
  250. data/doc/cxxapi/inherit__graph__3.md5 +1 -1
  251. data/doc/cxxapi/inherit__graph__3.png +0 -0
  252. data/doc/cxxapi/inherit__graph__30.map +1 -0
  253. data/doc/cxxapi/inherit__graph__30.md5 +1 -0
  254. data/doc/cxxapi/inherit__graph__30.png +0 -0
  255. data/doc/cxxapi/inherit__graph__31.map +3 -0
  256. data/doc/cxxapi/inherit__graph__31.md5 +1 -0
  257. data/doc/cxxapi/inherit__graph__31.png +0 -0
  258. data/doc/cxxapi/inherit__graph__32.map +1 -0
  259. data/doc/cxxapi/inherit__graph__32.md5 +1 -0
  260. data/doc/cxxapi/inherit__graph__32.png +0 -0
  261. data/doc/cxxapi/inherit__graph__33.map +1 -0
  262. data/doc/cxxapi/inherit__graph__33.md5 +1 -0
  263. data/doc/cxxapi/inherit__graph__33.png +0 -0
  264. data/doc/cxxapi/inherit__graph__34.map +1 -0
  265. data/doc/cxxapi/inherit__graph__34.md5 +1 -0
  266. data/doc/cxxapi/inherit__graph__34.png +0 -0
  267. data/doc/cxxapi/inherit__graph__35.map +1 -0
  268. data/doc/cxxapi/inherit__graph__35.md5 +1 -0
  269. data/doc/cxxapi/inherit__graph__35.png +0 -0
  270. data/doc/cxxapi/inherit__graph__36.map +1 -0
  271. data/doc/cxxapi/inherit__graph__36.md5 +1 -0
  272. data/doc/cxxapi/inherit__graph__36.png +0 -0
  273. data/doc/cxxapi/inherit__graph__4.map +1 -1
  274. data/doc/cxxapi/inherit__graph__4.md5 +1 -1
  275. data/doc/cxxapi/inherit__graph__4.png +0 -0
  276. data/doc/cxxapi/inherit__graph__5.map +1 -1
  277. data/doc/cxxapi/inherit__graph__5.md5 +1 -1
  278. data/doc/cxxapi/inherit__graph__5.png +0 -0
  279. data/doc/cxxapi/inherit__graph__6.map +1 -2
  280. data/doc/cxxapi/inherit__graph__6.md5 +1 -1
  281. data/doc/cxxapi/inherit__graph__6.png +0 -0
  282. data/doc/cxxapi/inherit__graph__7.map +1 -1
  283. data/doc/cxxapi/inherit__graph__7.md5 +1 -1
  284. data/doc/cxxapi/inherit__graph__7.png +0 -0
  285. data/doc/cxxapi/inherit__graph__8.map +1 -1
  286. data/doc/cxxapi/inherit__graph__8.md5 +1 -1
  287. data/doc/cxxapi/inherit__graph__8.png +0 -0
  288. data/doc/cxxapi/inherit__graph__9.map +1 -1
  289. data/doc/cxxapi/inherit__graph__9.md5 +1 -1
  290. data/doc/cxxapi/inherit__graph__9.png +0 -0
  291. data/doc/cxxapi/inherits.html +81 -41
  292. data/doc/cxxapi/main.html +1 -1
  293. data/doc/cxxapi/md5_8h-source.html +121 -0
  294. data/doc/cxxapi/modules.html +1 -1
  295. data/doc/cxxapi/namespacePassenger.html +651 -0
  296. data/doc/cxxapi/namespacemembers.html +155 -0
  297. data/doc/cxxapi/namespacemembers_enum.html +46 -0
  298. data/doc/cxxapi/namespacemembers_eval.html +52 -0
  299. data/doc/cxxapi/namespacemembers_func.html +139 -0
  300. data/doc/cxxapi/namespacemembers_type.html +50 -0
  301. data/doc/cxxapi/namespaces.html +34 -0
  302. data/doc/cxxapi/nginx_2Configuration_8h-source.html +114 -0
  303. data/doc/cxxapi/ngx__http__passenger__module_8h-source.html +91 -0
  304. data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +2 -1
  305. data/doc/cxxapi/structPassenger_1_1AnythingToString.html +3 -2
  306. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +2 -1
  307. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +3 -2
  308. data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard-members.html +33 -0
  309. data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard.html +49 -0
  310. data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +19 -7
  311. data/doc/cxxapi/structPassenger_1_1PoolOptions.html +323 -53
  312. data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash-members.html +33 -0
  313. data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash.html +49 -0
  314. data/ext/common/MessageChannel.h +48 -4
  315. data/ext/common/Version.h +1 -1
  316. data/ext/nginx/HttpStatusExtractor.h +1 -0
  317. data/ext/nginx/ScgiRequestParser.h +1 -0
  318. data/ext/phusion_passenger/native_support.c +5 -1
  319. data/lib/phusion_passenger/constants.rb +1 -1
  320. data/lib/phusion_passenger/message_channel.rb +45 -3
  321. data/lib/phusion_passenger/rack/application_spawner.rb +4 -0
  322. data/lib/phusion_passenger/railz/application_spawner.rb +19 -1
  323. data/lib/phusion_passenger/utils.rb +3 -3
  324. data/lib/phusion_passenger/utils/rewindable_input.rb +5 -0
  325. data/test/MessageChannelTest.cpp +9 -1
  326. data/test/stub/message_channel.rb +1 -1
  327. data/test/stub/message_channel_2.rb +1 -1
  328. data/test/stub/message_channel_3.rb +2 -2
  329. metadata +173 -113
  330. data/doc/cxxapi/ApplicationPoolServer_8h-source.html +0 -833
  331. data/doc/cxxapi/ApplicationPool_8h-source.html +0 -226
  332. data/doc/cxxapi/Application_8h-source.html +0 -553
  333. data/doc/cxxapi/DummySpawnManager_8h-source.html +0 -130
  334. data/doc/cxxapi/FileChecker_8h-source.html +0 -134
  335. data/doc/cxxapi/StandardApplicationPool_8h-source.html +0 -842
  336. data/doc/cxxapi/classPassenger_1_1Application.html +0 -231
  337. data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +0 -41
  338. data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +0 -323
  339. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +0 -227
  340. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +0 -1
  341. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +0 -1
  342. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
  343. data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +0 -44
  344. data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +0 -403
  345. data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +0 -53
  346. data/doc/cxxapi/classPassenger_1_1FileChecker.html +0 -124
  347. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +0 -44
  348. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +0 -342
  349. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +0 -1
  350. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +0 -1
  351. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
  352. data/doc/rdoc/classes/ConditionVariable.html +0 -194
  353. data/doc/rdoc/classes/Exception.html +0 -120
  354. data/doc/rdoc/classes/GC.html +0 -113
  355. data/doc/rdoc/classes/IO.html +0 -169
  356. data/doc/rdoc/classes/PhusionPassenger.html +0 -239
  357. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +0 -153
  358. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +0 -517
  359. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +0 -719
  360. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +0 -97
  361. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +0 -96
  362. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +0 -97
  363. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +0 -96
  364. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +0 -598
  365. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +0 -140
  366. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +0 -317
  367. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html +0 -138
  368. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +0 -154
  369. data/doc/rdoc/classes/PhusionPassenger/Application.html +0 -283
  370. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +0 -172
  371. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +0 -145
  372. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +0 -175
  373. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +0 -141
  374. data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +0 -92
  375. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +0 -489
  376. data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +0 -350
  377. data/doc/rdoc/classes/PhusionPassenger/Rack.html +0 -91
  378. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +0 -188
  379. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +0 -199
  380. data/doc/rdoc/classes/PhusionPassenger/Railz.html +0 -95
  381. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +0 -438
  382. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html +0 -98
  383. data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +0 -200
  384. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +0 -436
  385. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html +0 -98
  386. data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +0 -155
  387. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +0 -402
  388. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +0 -125
  389. data/doc/rdoc/classes/PhusionPassenger/Utils.html +0 -805
  390. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +0 -169
  391. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +0 -247
  392. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +0 -120
  393. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +0 -140
  394. data/doc/rdoc/classes/PhusionPassenger/WSGI.html +0 -89
  395. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +0 -188
  396. data/doc/rdoc/classes/PlatformInfo.html +0 -866
  397. data/doc/rdoc/classes/RakeExtensions.html +0 -197
  398. data/doc/rdoc/classes/Signal.html +0 -139
  399. data/doc/rdoc/created.rid +0 -1
  400. data/doc/rdoc/files/DEVELOPERS_TXT.html +0 -255
  401. data/doc/rdoc/files/README.html +0 -157
  402. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +0 -92
  403. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +0 -129
  404. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +0 -129
  405. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +0 -126
  406. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +0 -128
  407. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +0 -130
  408. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +0 -122
  409. data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +0 -127
  410. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +0 -126
  411. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +0 -122
  412. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +0 -134
  413. data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +0 -122
  414. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +0 -122
  415. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +0 -126
  416. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +0 -120
  417. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +0 -122
  418. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +0 -127
  419. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +0 -133
  420. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +0 -125
  421. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +0 -140
  422. data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +0 -126
  423. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +0 -145
  424. data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +0 -125
  425. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +0 -122
  426. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +0 -159
  427. data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +0 -100
  428. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +0 -174
  429. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +0 -129
  430. data/doc/rdoc/files/misc/rake/extensions_rb.html +0 -130
  431. data/doc/rdoc/fr_class_index.html +0 -93
  432. data/doc/rdoc/fr_file_index.html +0 -77
  433. data/doc/rdoc/fr_method_index.html +0 -212
  434. data/doc/rdoc/index.html +0 -26
  435. data/doc/rdoc/rdoc-style.css +0 -187
@@ -1,719 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html>
6
- <head>
7
- <title>Class: PhusionPassenger::AbstractServer</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 />PhusionPassenger::AbstractServer</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/phusion_passenger/abstract_server_rb.html">lib/phusion_passenger/abstract_server.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
- An abstract base class for a <a
80
- href="AbstractServer.html#M000137">server</a>, with the following
81
- properties:
82
- </p>
83
- <ul>
84
- <li>The <a href="AbstractServer.html#M000137">server</a> has exactly one <a
85
- href="AbstractServer.html#M000138">client</a>, and is connected to that <a
86
- href="AbstractServer.html#M000138">client</a> at all times. The <a
87
- href="AbstractServer.html#M000137">server</a> will quit when the connection
88
- closes.
89
-
90
- </li>
91
- <li>The <a href="AbstractServer.html#M000137">server</a>&#8216;s main loop may
92
- be run in a child process (and so is asynchronous from the main process).
93
-
94
- </li>
95
- <li>One can communicate with the <a
96
- href="AbstractServer.html#M000137">server</a> through discrete messages (as
97
- opposed to byte streams).
98
-
99
- </li>
100
- <li>The <a href="AbstractServer.html#M000137">server</a> can pass file
101
- descriptors (<a href="../IO.html">IO</a> objects) back to the <a
102
- href="AbstractServer.html#M000138">client</a>.
103
-
104
- </li>
105
- </ul>
106
- <p>
107
- A message is just an ordered list of strings. The first element in the
108
- message is the _message name_.
109
- </p>
110
- <p>
111
- The <a href="AbstractServer.html#M000137">server</a> will also reset all
112
- signal handlers (in the child process). That is, it will respond to all
113
- signals in the default manner. The only exception is SIGHUP, which is
114
- ignored. One may define additional signal handlers using <a
115
- href="AbstractServer.html#M000136">define_signal_handler</a>().
116
- </p>
117
- <p>
118
- Before an <a href="AbstractServer.html">AbstractServer</a> can be used, it
119
- must first be started by calling <a
120
- href="AbstractServer.html#M000127">start</a>(). When it is no longer
121
- needed, <a href="AbstractServer.html#M000129">stop</a>() should be called.
122
- </p>
123
- <p>
124
- Here&#8216;s an example on using <a
125
- href="AbstractServer.html">AbstractServer</a>:
126
- </p>
127
- <pre>
128
- class MyServer &lt; PhusionPassenger::AbstractServer
129
- def initialize
130
- super()
131
- define_message_handler(:hello, :handle_hello)
132
- end
133
-
134
- def hello(first_name, last_name)
135
- send_to_server('hello', first_name, last_name)
136
- reply, pointless_number = recv_from_server
137
- puts &quot;The server said: #{reply}&quot;
138
- puts &quot;In addition, it sent this pointless number: #{pointless_number}&quot;
139
- end
140
-
141
- private
142
- def handle_hello(first_name, last_name)
143
- send_to_client(&quot;Hello #{first_name} #{last_name}, how are you?&quot;, 1234)
144
- end
145
- end
146
-
147
- server = MyServer.new
148
- server.start
149
- server.hello(&quot;Joe&quot;, &quot;Dalton&quot;)
150
- server.stop
151
- </pre>
152
- </div>
153
-
154
-
155
-
156
- <div class="sectiontitle">Methods</div>
157
- <ul>
158
- <li><a href="#M000132">before_fork</a></li>
159
- <li><a href="#M000138">client</a></li>
160
- <li><a href="#M000135">define_message_handler</a></li>
161
- <li><a href="#M000136">define_signal_handler</a></li>
162
- <li><a href="#M000140">fileno_of</a></li>
163
- <li><a href="#M000134">finalize_server</a></li>
164
- <li><a href="#M000133">initialize_server</a></li>
165
- <li><a href="#M000126">new</a></li>
166
- <li><a href="#M000139">quit_main</a></li>
167
- <li><a href="#M000137">server</a></li>
168
- <li><a href="#M000131">server_pid</a></li>
169
- <li><a href="#M000127">start</a></li>
170
- <li><a href="#M000128">start_synchronously</a></li>
171
- <li><a href="#M000130">started?</a></li>
172
- <li><a href="#M000129">stop</a></li>
173
- </ul>
174
-
175
- <div class="sectiontitle">Included Modules</div>
176
- <ul>
177
- <li><a href="Utils.html">Utils</a></li>
178
- </ul>
179
-
180
-
181
- <div class="sectiontitle">Classes and Modules</div>
182
- Class <a href="AbstractServer/ServerAlreadyStarted.html" class="link">PhusionPassenger::AbstractServer::ServerAlreadyStarted</a><br />
183
- Class <a href="AbstractServer/ServerError.html" class="link">PhusionPassenger::AbstractServer::ServerError</a><br />
184
- Class <a href="AbstractServer/ServerNotStarted.html" class="link">PhusionPassenger::AbstractServer::ServerNotStarted</a><br />
185
- Class <a href="AbstractServer/UnknownMessage.html" class="link">PhusionPassenger::AbstractServer::UnknownMessage</a><br />
186
-
187
-
188
- <div class="sectiontitle">Constants</div>
189
- <table border='0' cellpadding='5'>
190
- <tr valign='top'>
191
- <td class="attr-name">SERVER_TERMINATION_SIGNAL</td>
192
- <td>=</td>
193
- <td class="attr-value">&quot;SIGTERM&quot;</td>
194
- </tr>
195
- </table>
196
-
197
- <div class="sectiontitle">Attributes</div>
198
- <table border='0' cellpadding='5'>
199
- <tr valign='top'>
200
- <td class='attr-rw'>
201
- [RW]
202
- </td>
203
- <td class='attr-name'>last_activity_time</td>
204
- <td class='attr-desc'>
205
- The last time when this <a href="AbstractServer.html">AbstractServer</a>
206
- had processed a message.
207
-
208
- </td>
209
- </tr>
210
- <tr valign='top'>
211
- <td class='attr-rw'>
212
- [RW]
213
- </td>
214
- <td class='attr-name'>max_idle_time</td>
215
- <td class='attr-desc'>
216
- The maximum time that this <a href="AbstractServer.html">AbstractServer</a>
217
- may be idle. Used by <a
218
- href="AbstractServerCollection.html">AbstractServerCollection</a> to
219
- determine when this object should be cleaned up. nil or 0 indicate that
220
- this object should never be idle cleaned.
221
-
222
- </td>
223
- </tr>
224
- <tr valign='top'>
225
- <td class='attr-rw'>
226
- [RW]
227
- </td>
228
- <td class='attr-name'>next_cleaning_time</td>
229
- <td class='attr-desc'>
230
- Used by <a
231
- href="AbstractServerCollection.html">AbstractServerCollection</a> to
232
- remember when this <a href="AbstractServer.html">AbstractServer</a> should
233
- be idle cleaned.
234
-
235
- </td>
236
- </tr>
237
- </table>
238
-
239
- <div class="sectiontitle">Public Class methods</div>
240
- <div class="method">
241
- <div class="title">
242
- <a name="M000126"></a><b>new</b>()
243
- </div>
244
- <div class="sourcecode">
245
- <p class="source-link">[ <a href="javascript:toggleSource('M000126_source')" id="l_M000126_source">show source</a> ]</p>
246
- <div id="M000126_source" class="dyn-source">
247
- <pre>
248
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 109</span>
249
- 109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
250
- 110: <span class="ruby-ivar">@done</span> = <span class="ruby-keyword kw">false</span>
251
- 111: <span class="ruby-ivar">@message_handlers</span> = {}
252
- 112: <span class="ruby-ivar">@signal_handlers</span> = {}
253
- 113: <span class="ruby-ivar">@orig_signal_handlers</span> = {}
254
- 114: <span class="ruby-ivar">@last_activity_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
255
- 115: <span class="ruby-keyword kw">end</span>
256
- </pre>
257
- </div>
258
- </div>
259
- </div>
260
- <div class="sectiontitle">Public Instance methods</div>
261
- <div class="method">
262
- <div class="title">
263
- <a name="M000131"></a><b>server_pid</b>()
264
- </div>
265
- <div class="description">
266
- <p>
267
- Return the PID of the started <a
268
- href="AbstractServer.html#M000137">server</a>. This is only valid if <a
269
- href="AbstractServer.html#M000127">start</a>() has been called.
270
- </p>
271
- </div>
272
- <div class="sourcecode">
273
- <p class="source-link">[ <a href="javascript:toggleSource('M000131_source')" id="l_M000131_source">show source</a> ]</p>
274
- <div id="M000131_source" class="dyn-source">
275
- <pre>
276
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 244</span>
277
- 244: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">server_pid</span>
278
- 245: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@pid</span>
279
- 246: <span class="ruby-keyword kw">end</span>
280
- </pre>
281
- </div>
282
- </div>
283
- </div>
284
- <div class="method">
285
- <div class="title">
286
- <a name="M000127"></a><b>start</b>()
287
- </div>
288
- <div class="description">
289
- <p>
290
- Start the <a href="AbstractServer.html#M000137">server</a>. This method
291
- does not block since the <a href="AbstractServer.html#M000137">server</a>
292
- runs asynchronously from the current process.
293
- </p>
294
- <p>
295
- You may only call this method if the <a
296
- href="AbstractServer.html#M000137">server</a> is not already started.
297
- Otherwise, a <a
298
- href="AbstractServer/ServerAlreadyStarted.html">ServerAlreadyStarted</a>
299
- will be raised.
300
- </p>
301
- <p>
302
- Derived classes may raise additional exceptions.
303
- </p>
304
- </div>
305
- <div class="sourcecode">
306
- <p class="source-link">[ <a href="javascript:toggleSource('M000127_source')" id="l_M000127_source">show source</a> ]</p>
307
- <div id="M000127_source" class="dyn-source">
308
- <pre>
309
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 124</span>
310
- 124: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
311
- 125: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">started?</span>
312
- 126: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ServerAlreadyStarted</span>, <span class="ruby-value str">&quot;Server is already started&quot;</span>
313
- 127: <span class="ruby-keyword kw">end</span>
314
- 128:
315
- 129: <span class="ruby-ivar">@parent_socket</span>, <span class="ruby-ivar">@child_socket</span> = <span class="ruby-constant">UNIXSocket</span>.<span class="ruby-identifier">pair</span>
316
- 130: <span class="ruby-identifier">before_fork</span>
317
- 131: <span class="ruby-ivar">@pid</span> = <span class="ruby-identifier">fork</span>
318
- 132: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@pid</span>.<span class="ruby-identifier">nil?</span>
319
- 133: <span class="ruby-keyword kw">begin</span>
320
- 134: <span class="ruby-constant">STDOUT</span>.<span class="ruby-identifier">sync</span> = <span class="ruby-keyword kw">true</span>
321
- 135: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">sync</span> = <span class="ruby-keyword kw">true</span>
322
- 136: <span class="ruby-ivar">@parent_socket</span>.<span class="ruby-identifier">close</span>
323
- 137:
324
- 138: <span class="ruby-comment cmt"># During Passenger's early days, we used to close file descriptors based</span>
325
- 139: <span class="ruby-comment cmt"># on a white list of file descriptors. That proved to be way too fragile:</span>
326
- 140: <span class="ruby-comment cmt"># too many file descriptors are being left open even though they shouldn't</span>
327
- 141: <span class="ruby-comment cmt"># be. So now we close file descriptors based on a black list.</span>
328
- 142: <span class="ruby-comment cmt">#</span>
329
- 143: <span class="ruby-comment cmt"># Note that STDIN, STDOUT and STDERR may be temporarily set to</span>
330
- 144: <span class="ruby-comment cmt"># different file descriptors than 0, 1 and 2, e.g. in unit tests.</span>
331
- 145: <span class="ruby-comment cmt"># We don't want to close these either.</span>
332
- 146: <span class="ruby-identifier">file_descriptors_to_leave_open</span> = [<span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-ivar">@child_socket</span>.<span class="ruby-identifier">fileno</span>,
333
- 147: <span class="ruby-identifier">fileno_of</span>(<span class="ruby-constant">STDIN</span>), <span class="ruby-identifier">fileno_of</span>(<span class="ruby-constant">STDOUT</span>), <span class="ruby-identifier">fileno_of</span>(<span class="ruby-constant">STDERR</span>)].<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">uniq</span>
334
- 148: <span class="ruby-constant">NativeSupport</span>.<span class="ruby-identifier">close_all_file_descriptors</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
335
- 149: <span class="ruby-comment cmt"># In addition to closing the file descriptors, one must also close</span>
336
- 150: <span class="ruby-comment cmt"># the associated IO objects. This is to prevent IO.close from</span>
337
- 151: <span class="ruby-comment cmt"># double-closing already closed file descriptors.</span>
338
- 152: <span class="ruby-identifier">close_all_io_objects_for_fds</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
339
- 153:
340
- 154: <span class="ruby-comment cmt"># At this point, RubyGems might have open file handles for which</span>
341
- 155: <span class="ruby-comment cmt"># the associated file descriptors have just been closed. This can</span>
342
- 156: <span class="ruby-comment cmt"># result in mysterious 'EBADFD' errors. So we force RubyGems to</span>
343
- 157: <span class="ruby-comment cmt"># clear all open file handles.</span>
344
- 158: <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">clear_paths</span>
345
- 159:
346
- 160: <span class="ruby-comment cmt"># Reseed pseudo-random number generator for security reasons.</span>
347
- 161: <span class="ruby-identifier">srand</span>
348
- 162:
349
- 163: <span class="ruby-identifier">start_synchronously</span>(<span class="ruby-ivar">@child_socket</span>)
350
- 164: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Interrupt</span>
351
- 165: <span class="ruby-comment cmt"># Do nothing.</span>
352
- 166: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SignalException</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">signal</span>
353
- 167: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">signal</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">==</span> <span class="ruby-constant">SERVER_TERMINATION_SIGNAL</span>
354
- 168: <span class="ruby-comment cmt"># Do nothing.</span>
355
- 169: <span class="ruby-keyword kw">else</span>
356
- 170: <span class="ruby-identifier">print_exception</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">signal</span>)
357
- 171: <span class="ruby-keyword kw">end</span>
358
- 172: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
359
- 173: <span class="ruby-identifier">print_exception</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">e</span>)
360
- 174: <span class="ruby-keyword kw">ensure</span>
361
- 175: <span class="ruby-identifier">exit!</span>
362
- 176: <span class="ruby-keyword kw">end</span>
363
- 177: <span class="ruby-keyword kw">end</span>
364
- 178: <span class="ruby-ivar">@child_socket</span>.<span class="ruby-identifier">close</span>
365
- 179: <span class="ruby-ivar">@parent_channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@parent_socket</span>)
366
- 180: <span class="ruby-keyword kw">end</span>
367
- </pre>
368
- </div>
369
- </div>
370
- </div>
371
- <div class="method">
372
- <div class="title">
373
- <a name="M000128"></a><b>start_synchronously</b>(socket)
374
- </div>
375
- <div class="description">
376
- <p>
377
- Start the <a href="AbstractServer.html#M000137">server</a>, but in the
378
- current process instead of in a child process. This method blocks until the
379
- <a href="AbstractServer.html#M000137">server</a>&#8216;s main loop has
380
- ended.
381
- </p>
382
- <p>
383
- <em>socket</em> is the socket that the <a
384
- href="AbstractServer.html#M000137">server</a> should listen on. The <a
385
- href="AbstractServer.html#M000137">server</a> main loop will end if the
386
- socket has been closed.
387
- </p>
388
- <p>
389
- All hooks will be called, except <a
390
- href="AbstractServer.html#M000132">before_fork</a>().
391
- </p>
392
- </div>
393
- <div class="sourcecode">
394
- <p class="source-link">[ <a href="javascript:toggleSource('M000128_source')" id="l_M000128_source">show source</a> ]</p>
395
- <div id="M000128_source" class="dyn-source">
396
- <pre>
397
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 189</span>
398
- 189: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_synchronously</span>(<span class="ruby-identifier">socket</span>)
399
- 190: <span class="ruby-ivar">@child_socket</span> = <span class="ruby-identifier">socket</span>
400
- 191: <span class="ruby-ivar">@child_channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">socket</span>)
401
- 192: <span class="ruby-keyword kw">begin</span>
402
- 193: <span class="ruby-identifier">reset_signal_handlers</span>
403
- 194: <span class="ruby-identifier">initialize_server</span>
404
- 195: <span class="ruby-keyword kw">begin</span>
405
- 196: <span class="ruby-identifier">main_loop</span>
406
- 197: <span class="ruby-keyword kw">ensure</span>
407
- 198: <span class="ruby-identifier">finalize_server</span>
408
- 199: <span class="ruby-keyword kw">end</span>
409
- 200: <span class="ruby-keyword kw">ensure</span>
410
- 201: <span class="ruby-identifier">revert_signal_handlers</span>
411
- 202: <span class="ruby-keyword kw">end</span>
412
- 203: <span class="ruby-keyword kw">end</span>
413
- </pre>
414
- </div>
415
- </div>
416
- </div>
417
- <div class="method">
418
- <div class="title">
419
- <a name="M000130"></a><b>started?</b>()
420
- </div>
421
- <div class="description">
422
- <p>
423
- Return whether the <a href="AbstractServer.html#M000137">server</a> has
424
- been started.
425
- </p>
426
- </div>
427
- <div class="sourcecode">
428
- <p class="source-link">[ <a href="javascript:toggleSource('M000130_source')" id="l_M000130_source">show source</a> ]</p>
429
- <div id="M000130_source" class="dyn-source">
430
- <pre>
431
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 239</span>
432
- 239: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">started?</span>
433
- 240: <span class="ruby-keyword kw">return</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@parent_channel</span>.<span class="ruby-identifier">nil?</span>
434
- 241: <span class="ruby-keyword kw">end</span>
435
- </pre>
436
- </div>
437
- </div>
438
- </div>
439
- <div class="method">
440
- <div class="title">
441
- <a name="M000129"></a><b>stop</b>()
442
- </div>
443
- <div class="description">
444
- <p>
445
- Stop the <a href="AbstractServer.html#M000137">server</a>. The <a
446
- href="AbstractServer.html#M000137">server</a> will quit as soon as
447
- possible. This method waits until the <a
448
- href="AbstractServer.html#M000137">server</a> has been stopped.
449
- </p>
450
- <p>
451
- When calling this method, the <a
452
- href="AbstractServer.html#M000137">server</a> must already be started. If
453
- not, a <a href="AbstractServer/ServerNotStarted.html">ServerNotStarted</a>
454
- will be raised.
455
- </p>
456
- </div>
457
- <div class="sourcecode">
458
- <p class="source-link">[ <a href="javascript:toggleSource('M000129_source')" id="l_M000129_source">show source</a> ]</p>
459
- <div id="M000129_source" class="dyn-source">
460
- <pre>
461
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 210</span>
462
- 210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>
463
- 211: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">started?</span>
464
- 212: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ServerNotStarted</span>, <span class="ruby-value str">&quot;Server is not started&quot;</span>
465
- 213: <span class="ruby-keyword kw">end</span>
466
- 214:
467
- 215: <span class="ruby-ivar">@parent_socket</span>.<span class="ruby-identifier">close</span>
468
- 216: <span class="ruby-ivar">@parent_channel</span> = <span class="ruby-keyword kw">nil</span>
469
- 217:
470
- 218: <span class="ruby-comment cmt"># Wait at most 3 seconds for server to exit. If it doesn't do that,</span>
471
- 219: <span class="ruby-comment cmt"># we kill it. If that doesn't work either, we kill it forcefully with</span>
472
- 220: <span class="ruby-comment cmt"># SIGKILL.</span>
473
- 221: <span class="ruby-keyword kw">begin</span>
474
- 222: <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-identifier">timeout</span>(<span class="ruby-value">3</span>) <span class="ruby-keyword kw">do</span>
475
- 223: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">waitpid</span>(<span class="ruby-ivar">@pid</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
476
- 224: <span class="ruby-keyword kw">end</span>
477
- 225: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>
478
- 226: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">kill</span>(<span class="ruby-constant">SERVER_TERMINATION_SIGNAL</span>, <span class="ruby-ivar">@pid</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
479
- 227: <span class="ruby-keyword kw">begin</span>
480
- 228: <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-identifier">timeout</span>(<span class="ruby-value">3</span>) <span class="ruby-keyword kw">do</span>
481
- 229: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">waitpid</span>(<span class="ruby-ivar">@pid</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
482
- 230: <span class="ruby-keyword kw">end</span>
483
- 231: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>
484
- 232: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">kill</span>(<span class="ruby-value str">'SIGKILL'</span>, <span class="ruby-ivar">@pid</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
485
- 233: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">waitpid</span>(<span class="ruby-ivar">@pid</span>, <span class="ruby-constant">Process</span><span class="ruby-operator">::</span><span class="ruby-constant">WNOHANG</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
486
- 234: <span class="ruby-keyword kw">end</span>
487
- 235: <span class="ruby-keyword kw">end</span>
488
- 236: <span class="ruby-keyword kw">end</span>
489
- </pre>
490
- </div>
491
- </div>
492
- </div>
493
- <div class="sectiontitle">Protected Instance methods</div>
494
- <div class="method">
495
- <div class="title">
496
- <a name="M000132"></a><b>before_fork</b>()
497
- </div>
498
- <div class="description">
499
- <p>
500
- A hook which is called when the <a
501
- href="AbstractServer.html#M000137">server</a> is being started, just before
502
- forking a <a href="AbstractServer.html#M000126">new</a> process. The
503
- default implementation does nothing, this method is supposed to be
504
- overrided by child classes.
505
- </p>
506
- </div>
507
- <div class="sourcecode">
508
- <p class="source-link">[ <a href="javascript:toggleSource('M000132_source')" id="l_M000132_source">show source</a> ]</p>
509
- <div id="M000132_source" class="dyn-source">
510
- <pre>
511
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 251</span>
512
- 251: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">before_fork</span>
513
- 252: <span class="ruby-keyword kw">end</span>
514
- </pre>
515
- </div>
516
- </div>
517
- </div>
518
- <div class="method">
519
- <div class="title">
520
- <a name="M000138"></a><b>client</b>()
521
- </div>
522
- <div class="description">
523
- <p>
524
- Return the communication channel with the <a
525
- href="AbstractServer.html#M000138">client</a> (i.e. the parent process that
526
- started the <a href="AbstractServer.html#M000137">server</a>). This is a <a
527
- href="MessageChannel.html">MessageChannel</a> object.
528
- </p>
529
- </div>
530
- <div class="sourcecode">
531
- <p class="source-link">[ <a href="javascript:toggleSource('M000138_source')" id="l_M000138_source">show source</a> ]</p>
532
- <div id="M000138_source" class="dyn-source">
533
- <pre>
534
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 296</span>
535
- 296: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client</span>
536
- 297: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@child_channel</span>
537
- 298: <span class="ruby-keyword kw">end</span>
538
- </pre>
539
- </div>
540
- </div>
541
- </div>
542
- <div class="method">
543
- <div class="title">
544
- <a name="M000135"></a><b>define_message_handler</b>(message_name, handler)
545
- </div>
546
- <div class="description">
547
- <p>
548
- Define a handler for a message. <em>message_name</em> is the name of the
549
- message to handle, and <em>handler</em> is the name of a method to be
550
- called (this may either be a String or a Symbol).
551
- </p>
552
- <p>
553
- A message is just a list of strings, and so <em>handler</em> will be called
554
- with the message as its arguments, excluding the first element. See also
555
- the example in the class description.
556
- </p>
557
- </div>
558
- <div class="sourcecode">
559
- <p class="source-link">[ <a href="javascript:toggleSource('M000135_source')" id="l_M000135_source">show source</a> ]</p>
560
- <div id="M000135_source" class="dyn-source">
561
- <pre>
562
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 271</span>
563
- 271: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">define_message_handler</span>(<span class="ruby-identifier">message_name</span>, <span class="ruby-identifier">handler</span>)
564
- 272: <span class="ruby-ivar">@message_handlers</span>[<span class="ruby-identifier">message_name</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">handler</span>
565
- 273: <span class="ruby-keyword kw">end</span>
566
- </pre>
567
- </div>
568
- </div>
569
- </div>
570
- <div class="method">
571
- <div class="title">
572
- <a name="M000136"></a><b>define_signal_handler</b>(signal, handler)
573
- </div>
574
- <div class="description">
575
- <p>
576
- Define a handler for a signal.
577
- </p>
578
- </div>
579
- <div class="sourcecode">
580
- <p class="source-link">[ <a href="javascript:toggleSource('M000136_source')" id="l_M000136_source">show source</a> ]</p>
581
- <div id="M000136_source" class="dyn-source">
582
- <pre>
583
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 276</span>
584
- 276: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">define_signal_handler</span>(<span class="ruby-identifier">signal</span>, <span class="ruby-identifier">handler</span>)
585
- 277: <span class="ruby-ivar">@signal_handlers</span>[<span class="ruby-identifier">signal</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">handler</span>
586
- 278: <span class="ruby-keyword kw">end</span>
587
- </pre>
588
- </div>
589
- </div>
590
- </div>
591
- <div class="method">
592
- <div class="title">
593
- <a name="M000140"></a><b>fileno_of</b>(io)
594
- </div>
595
- <div class="sourcecode">
596
- <p class="source-link">[ <a href="javascript:toggleSource('M000140_source')" id="l_M000140_source">show source</a> ]</p>
597
- <div id="M000140_source" class="dyn-source">
598
- <pre>
599
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 305</span>
600
- 305: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fileno_of</span>(<span class="ruby-identifier">io</span>)
601
- 306: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">io</span>.<span class="ruby-identifier">fileno</span>
602
- 307: <span class="ruby-keyword kw">rescue</span>
603
- 308: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
604
- 309: <span class="ruby-keyword kw">end</span>
605
- </pre>
606
- </div>
607
- </div>
608
- </div>
609
- <div class="method">
610
- <div class="title">
611
- <a name="M000134"></a><b>finalize_server</b>()
612
- </div>
613
- <div class="description">
614
- <p>
615
- A hook which is called when the <a
616
- href="AbstractServer.html#M000137">server</a> is being stopped. This is
617
- called in the child process, after the main loop has been left. The default
618
- implementation does nothing, this method is supposed to be overrided by
619
- child classes.
620
- </p>
621
- </div>
622
- <div class="sourcecode">
623
- <p class="source-link">[ <a href="javascript:toggleSource('M000134_source')" id="l_M000134_source">show source</a> ]</p>
624
- <div id="M000134_source" class="dyn-source">
625
- <pre>
626
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 263</span>
627
- 263: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">finalize_server</span>
628
- 264: <span class="ruby-keyword kw">end</span>
629
- </pre>
630
- </div>
631
- </div>
632
- </div>
633
- <div class="method">
634
- <div class="title">
635
- <a name="M000133"></a><b>initialize_server</b>()
636
- </div>
637
- <div class="description">
638
- <p>
639
- A hook which is called when the <a
640
- href="AbstractServer.html#M000137">server</a> is being started. This is
641
- called in the child process, before the main loop is entered. The default
642
- implementation does nothing, this method is supposed to be overrided by
643
- child classes.
644
- </p>
645
- </div>
646
- <div class="sourcecode">
647
- <p class="source-link">[ <a href="javascript:toggleSource('M000133_source')" id="l_M000133_source">show source</a> ]</p>
648
- <div id="M000133_source" class="dyn-source">
649
- <pre>
650
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 257</span>
651
- 257: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_server</span>
652
- 258: <span class="ruby-keyword kw">end</span>
653
- </pre>
654
- </div>
655
- </div>
656
- </div>
657
- <div class="method">
658
- <div class="title">
659
- <a name="M000139"></a><b>quit_main</b>()
660
- </div>
661
- <div class="description">
662
- <p>
663
- Tell the main loop to <a href="AbstractServer.html#M000129">stop</a> as
664
- soon as possible.
665
- </p>
666
- </div>
667
- <div class="sourcecode">
668
- <p class="source-link">[ <a href="javascript:toggleSource('M000139_source')" id="l_M000139_source">show source</a> ]</p>
669
- <div id="M000139_source" class="dyn-source">
670
- <pre>
671
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 301</span>
672
- 301: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">quit_main</span>
673
- 302: <span class="ruby-ivar">@done</span> = <span class="ruby-keyword kw">true</span>
674
- 303: <span class="ruby-keyword kw">end</span>
675
- </pre>
676
- </div>
677
- </div>
678
- </div>
679
- <div class="method">
680
- <div class="title">
681
- <a name="M000137"></a><b>server</b>()
682
- </div>
683
- <div class="description">
684
- <p>
685
- Return the communication channel with the <a
686
- href="AbstractServer.html#M000137">server</a>. This is a <a
687
- href="MessageChannel.html">MessageChannel</a> object.
688
- </p>
689
- <p>
690
- Raises <a href="AbstractServer/ServerNotStarted.html">ServerNotStarted</a>
691
- if the <a href="AbstractServer.html#M000137">server</a> hasn&#8216;t been
692
- started yet.
693
- </p>
694
- <p>
695
- This method may only be called in the parent process, and not in the
696
- started <a href="AbstractServer.html#M000137">server</a> process.
697
- </p>
698
- </div>
699
- <div class="sourcecode">
700
- <p class="source-link">[ <a href="javascript:toggleSource('M000137_source')" id="l_M000137_source">show source</a> ]</p>
701
- <div id="M000137_source" class="dyn-source">
702
- <pre>
703
- <span class="ruby-comment cmt"># File lib/phusion_passenger/abstract_server.rb, line 287</span>
704
- 287: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">server</span>
705
- 288: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">started?</span>
706
- 289: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ServerNotStarted</span>, <span class="ruby-value str">&quot;Server hasn't been started yet. Please call start() first.&quot;</span>
707
- 290: <span class="ruby-keyword kw">end</span>
708
- 291: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@parent_channel</span>
709
- 292: <span class="ruby-keyword kw">end</span>
710
- </pre>
711
- </div>
712
- </div>
713
- </div>
714
- </div>
715
-
716
- </div>
717
-
718
- </body>
719
- </html>