thin 0.5.3-x86-mswin32-60

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

Potentially problematic release.


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

Files changed (117) hide show
  1. data/CHANGELOG +40 -0
  2. data/COPYING +18 -0
  3. data/README +60 -0
  4. data/Rakefile +11 -0
  5. data/benchmark/simple.rb +48 -0
  6. data/bin/thin +123 -0
  7. data/doc/benchmarks.txt +86 -0
  8. data/doc/rdoc/classes/Process.html +181 -0
  9. data/doc/rdoc/classes/Rack.html +156 -0
  10. data/doc/rdoc/classes/Rack/Adapter.html +155 -0
  11. data/doc/rdoc/classes/Rack/Adapter/Rails.html +289 -0
  12. data/doc/rdoc/classes/Rack/Adapter/Rails/CGIWrapper.html +359 -0
  13. data/doc/rdoc/classes/Rack/Handler.html +155 -0
  14. data/doc/rdoc/classes/Rack/Handler/Thin.html +175 -0
  15. data/doc/rdoc/classes/Thin.html +164 -0
  16. data/doc/rdoc/classes/Thin/Cluster.html +399 -0
  17. data/doc/rdoc/classes/Thin/Connection.html +223 -0
  18. data/doc/rdoc/classes/Thin/Daemonizable.html +260 -0
  19. data/doc/rdoc/classes/Thin/Daemonizable/ClassMethods.html +197 -0
  20. data/doc/rdoc/classes/Thin/Headers.html +238 -0
  21. data/doc/rdoc/classes/Thin/InvalidRequest.html +144 -0
  22. data/doc/rdoc/classes/Thin/Logging.html +201 -0
  23. data/doc/rdoc/classes/Thin/Request.html +231 -0
  24. data/doc/rdoc/classes/Thin/Response.html +271 -0
  25. data/doc/rdoc/classes/Thin/Server.html +295 -0
  26. data/doc/rdoc/classes/Thin/StopServer.html +143 -0
  27. data/doc/rdoc/created.rid +1 -0
  28. data/doc/rdoc/files/README.html +226 -0
  29. data/doc/rdoc/files/bin/thin.html +245 -0
  30. data/doc/rdoc/files/lib/rack/adapter/rails_rb.html +146 -0
  31. data/doc/rdoc/files/lib/rack/handler/thin_rb.html +146 -0
  32. data/doc/rdoc/files/lib/thin/cluster_rb.html +146 -0
  33. data/doc/rdoc/files/lib/thin/connection_rb.html +145 -0
  34. data/doc/rdoc/files/lib/thin/daemonizing_rb.html +146 -0
  35. data/doc/rdoc/files/lib/thin/headers_rb.html +146 -0
  36. data/doc/rdoc/files/lib/thin/logging_rb.html +146 -0
  37. data/doc/rdoc/files/lib/thin/request_rb.html +145 -0
  38. data/doc/rdoc/files/lib/thin/response_rb.html +145 -0
  39. data/doc/rdoc/files/lib/thin/server_rb.html +145 -0
  40. data/doc/rdoc/files/lib/thin/statuses_rb.html +145 -0
  41. data/doc/rdoc/files/lib/thin/version_rb.html +145 -0
  42. data/doc/rdoc/files/lib/thin_rb.html +152 -0
  43. data/doc/rdoc/index.html +10 -0
  44. data/doc/rdoc/logo.gif +0 -0
  45. data/doc/rdoc/rdoc-style.css +55 -0
  46. data/example/config.ru +9 -0
  47. data/example/thin.god +72 -0
  48. data/ext/thin_parser/common.rl +54 -0
  49. data/ext/thin_parser/ext_help.h +14 -0
  50. data/ext/thin_parser/extconf.rb +6 -0
  51. data/ext/thin_parser/parser.c +1199 -0
  52. data/ext/thin_parser/parser.h +49 -0
  53. data/ext/thin_parser/parser.rl +143 -0
  54. data/ext/thin_parser/thin.c +424 -0
  55. data/lib/rack/adapter/rails.rb +155 -0
  56. data/lib/rack/handler/thin.rb +13 -0
  57. data/lib/thin.rb +36 -0
  58. data/lib/thin/cluster.rb +106 -0
  59. data/lib/thin/connection.rb +46 -0
  60. data/lib/thin/daemonizing.rb +112 -0
  61. data/lib/thin/headers.rb +37 -0
  62. data/lib/thin/logging.rb +23 -0
  63. data/lib/thin/request.rb +72 -0
  64. data/lib/thin/response.rb +48 -0
  65. data/lib/thin/server.rb +80 -0
  66. data/lib/thin/statuses.rb +43 -0
  67. data/lib/thin/version.rb +11 -0
  68. data/lib/thin_parser.so +0 -0
  69. data/spec/cluster_spec.rb +58 -0
  70. data/spec/daemonizing_spec.rb +93 -0
  71. data/spec/headers_spec.rb +35 -0
  72. data/spec/rack_rails_spec.rb +92 -0
  73. data/spec/rails_app/app/controllers/application.rb +10 -0
  74. data/spec/rails_app/app/controllers/simple_controller.rb +19 -0
  75. data/spec/rails_app/app/helpers/application_helper.rb +3 -0
  76. data/spec/rails_app/app/views/simple/index.html.erb +15 -0
  77. data/spec/rails_app/config/boot.rb +109 -0
  78. data/spec/rails_app/config/environment.rb +64 -0
  79. data/spec/rails_app/config/environments/development.rb +18 -0
  80. data/spec/rails_app/config/environments/production.rb +19 -0
  81. data/spec/rails_app/config/environments/test.rb +22 -0
  82. data/spec/rails_app/config/initializers/inflections.rb +10 -0
  83. data/spec/rails_app/config/initializers/mime_types.rb +5 -0
  84. data/spec/rails_app/config/routes.rb +35 -0
  85. data/spec/rails_app/public/404.html +30 -0
  86. data/spec/rails_app/public/422.html +30 -0
  87. data/spec/rails_app/public/500.html +30 -0
  88. data/spec/rails_app/public/dispatch.cgi +10 -0
  89. data/spec/rails_app/public/dispatch.fcgi +24 -0
  90. data/spec/rails_app/public/dispatch.rb +10 -0
  91. data/spec/rails_app/public/favicon.ico +0 -0
  92. data/spec/rails_app/public/images/rails.png +0 -0
  93. data/spec/rails_app/public/index.html +277 -0
  94. data/spec/rails_app/public/javascripts/application.js +2 -0
  95. data/spec/rails_app/public/javascripts/controls.js +963 -0
  96. data/spec/rails_app/public/javascripts/dragdrop.js +972 -0
  97. data/spec/rails_app/public/javascripts/effects.js +1120 -0
  98. data/spec/rails_app/public/javascripts/prototype.js +4225 -0
  99. data/spec/rails_app/public/robots.txt +5 -0
  100. data/spec/rails_app/script/about +3 -0
  101. data/spec/rails_app/script/console +3 -0
  102. data/spec/rails_app/script/destroy +3 -0
  103. data/spec/rails_app/script/generate +3 -0
  104. data/spec/rails_app/script/performance/benchmarker +3 -0
  105. data/spec/rails_app/script/performance/profiler +3 -0
  106. data/spec/rails_app/script/performance/request +3 -0
  107. data/spec/rails_app/script/plugin +3 -0
  108. data/spec/rails_app/script/process/inspector +3 -0
  109. data/spec/rails_app/script/process/reaper +3 -0
  110. data/spec/rails_app/script/process/spawner +3 -0
  111. data/spec/rails_app/script/runner +3 -0
  112. data/spec/rails_app/script/server +3 -0
  113. data/spec/request_spec.rb +258 -0
  114. data/spec/response_spec.rb +56 -0
  115. data/spec/server_spec.rb +75 -0
  116. data/spec/spec_helper.rb +127 -0
  117. metadata +219 -0
@@ -0,0 +1,295 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
+ <html>
4
+ <head>
5
+ <title>
6
+ thin &raquo; Class: Thin::Server
7
+ </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
+ <script language="JavaScript" type="text/javascript">
11
+ // <![CDATA[
12
+
13
+ function toggleSource( id )
14
+ {
15
+ var elem
16
+ var link
17
+
18
+ if( document.getElementById )
19
+ {
20
+ elem = document.getElementById( id )
21
+ link = document.getElementById( "l_" + id )
22
+ }
23
+ else if ( document.all )
24
+ {
25
+ elem = eval( "document.all." + id )
26
+ link = eval( "document.all.l_" + id )
27
+ }
28
+ else
29
+ return false;
30
+
31
+ if( elem.style.display == "block" )
32
+ {
33
+ elem.style.display = "none"
34
+ link.innerHTML = "show source"
35
+ }
36
+ else
37
+ {
38
+ elem.style.display = "block"
39
+ link.innerHTML = "hide source"
40
+ }
41
+ }
42
+
43
+ function openCode( url )
44
+ {
45
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
46
+ }
47
+ // ]]>
48
+ </script>
49
+ </head>
50
+ <body>
51
+ <ul id="menu">
52
+ <li><a href="/thin/">about</a></li>
53
+ <li><a href="/thin/download/">download</a></li>
54
+ <li><a href="/thin/usage/">usage</a></li>
55
+ <li><a href="/thin/doc/">doc</a></li>
56
+ <li><a href="http://groups.google.com/group/thin-ruby/">community</a></li>
57
+ </ul>
58
+ <div id="sidebar">
59
+ <h2>Files</h2>
60
+ <ul class="list">
61
+ <li><a href="../../files/README.html" value="File: README">README</a></li>
62
+ <li><a href="../../files/lib/rack/adapter/rails_rb.html" value="File: rails.rb">lib/rack/adapter/rails.rb</a></li>
63
+ <li><a href="../../files/lib/rack/handler/thin_rb.html" value="File: thin.rb">lib/rack/handler/thin.rb</a></li>
64
+ <li><a href="../../files/lib/thin/cluster_rb.html" value="File: cluster.rb">lib/thin/cluster.rb</a></li>
65
+ <li><a href="../../files/lib/thin/connection_rb.html" value="File: connection.rb">lib/thin/connection.rb</a></li>
66
+ <li><a href="../../files/lib/thin/daemonizing_rb.html" value="File: daemonizing.rb">lib/thin/daemonizing.rb</a></li>
67
+ <li><a href="../../files/lib/thin/headers_rb.html" value="File: headers.rb">lib/thin/headers.rb</a></li>
68
+ <li><a href="../../files/lib/thin/logging_rb.html" value="File: logging.rb">lib/thin/logging.rb</a></li>
69
+ <li><a href="../../files/lib/thin/request_rb.html" value="File: request.rb">lib/thin/request.rb</a></li>
70
+ <li><a href="../../files/lib/thin/response_rb.html" value="File: response.rb">lib/thin/response.rb</a></li>
71
+ <li><a href="../../files/lib/thin/server_rb.html" value="File: server.rb">lib/thin/server.rb</a></li>
72
+ <li><a href="../../files/lib/thin/statuses_rb.html" value="File: statuses.rb">lib/thin/statuses.rb</a></li>
73
+ <li><a href="../../files/lib/thin/version_rb.html" value="File: version.rb">lib/thin/version.rb</a></li>
74
+ <li><a href="../../files/lib/thin_rb.html" value="File: thin.rb">lib/thin.rb</a></li>
75
+ <li><a href="../../files/bin/thin.html" value="File: thin">bin/thin</a></li>
76
+ </ul>
77
+
78
+ <h2>Classes</h2>
79
+ <ul class="list">
80
+ <li><a href="../../classes/Rack.html" title="Module: Rack">Rack</a></li>
81
+ <li><a href="../../classes/Rack/Adapter.html" title="Module: Rack::Adapter">Rack::Adapter</a></li>
82
+ <li><a href="../../classes/Rack/Adapter/Rails.html" title="Class: Rack::Adapter::Rails">Rack::Adapter::Rails</a></li>
83
+ <li><a href="../../classes/Rack/Adapter/Rails/CGIWrapper.html" title="Class: Rack::Adapter::Rails::CGIWrapper">Rack::Adapter::Rails::CGIWrapper</a></li>
84
+ <li><a href="../../classes/Rack/Handler.html" title="Module: Rack::Handler">Rack::Handler</a></li>
85
+ <li><a href="../../classes/Rack/Handler/Thin.html" title="Class: Rack::Handler::Thin">Rack::Handler::Thin</a></li>
86
+ <li><a href="../../classes/Thin.html" title="Module: Thin">Thin</a></li>
87
+ <li><a href="../../classes/Thin/Daemonizable.html" title="Module: Thin::Daemonizable">Thin::Daemonizable</a></li>
88
+ <li><a href="../../classes/Thin/Daemonizable/ClassMethods.html" title="Module: Thin::Daemonizable::ClassMethods">Thin::Daemonizable::ClassMethods</a></li>
89
+ <li><a href="../../classes/Thin/VERSION.html" title="Module: Thin::VERSION">Thin::VERSION</a></li>
90
+ <li><a href="../../classes/Thin/Logging.html" title="Module: Thin::Logging">Thin::Logging</a></li>
91
+ <li><a href="../../classes/Thin/InvalidRequest.html" title="Class: Thin::InvalidRequest">Thin::InvalidRequest</a></li>
92
+ <li><a href="../../classes/Thin/StopServer.html" title="Class: Thin::StopServer">Thin::StopServer</a></li>
93
+ <li><a href="../../classes/Thin/Response.html" title="Class: Thin::Response">Thin::Response</a></li>
94
+ <li><a href="../../classes/Thin/Headers.html" title="Class: Thin::Headers">Thin::Headers</a></li>
95
+ <li><a href="../../classes/Thin/Server.html" title="Class: Thin::Server">Thin::Server</a></li>
96
+ <li><a href="../../classes/Thin/Request.html" title="Class: Thin::Request">Thin::Request</a></li>
97
+ <li><a href="../../classes/Thin/Connection.html" title="Class: Thin::Connection">Thin::Connection</a></li>
98
+ <li><a href="../../classes/Thin/Cluster.html" title="Class: Thin::Cluster">Thin::Cluster</a></li>
99
+ <li><a href="../../classes/Process.html" title="Module: Process">Process</a></li>
100
+ </ul>
101
+ </div>
102
+ <div id="container">
103
+ <div id="header">
104
+ <a href="/thin/" title="Home">
105
+ <img id="logo" src="../../logo.gif" />
106
+ </a>
107
+ <h2 id="tag_line">A fast and very simple Ruby web server</h2>
108
+ </div>
109
+
110
+ <div id="content">
111
+ <h2>Class: Thin::Server</h2>
112
+
113
+
114
+ <div id="Thin::Server" class="page_shade">
115
+ <div class="page">
116
+ <h3>Class Thin::Server &lt; Object</h3>
117
+
118
+ <span class="path">(in files
119
+ <a href="../../files/lib/thin/server_rb.html">lib/thin/server.rb</a>
120
+ )</span>
121
+
122
+ <p>
123
+ The <a href="../Thin.html">Thin</a> HTTP server used to served request. It
124
+ listen for incoming request on a given port and forward all request to
125
+ <tt>app</tt>.
126
+ </p>
127
+ <p>
128
+ Based on HTTP 1.1 protocol specs: <a
129
+ href="http://www.w3.org/Protocols/rfc2616/rfc2616.html">www.w3.org/Protocols/rfc2616/rfc2616.html</a>
130
+ </p>
131
+
132
+
133
+
134
+
135
+ <h4>Includes</h4>
136
+ <ul>
137
+ <li><a href="Logging.html">Logging</a></li>
138
+ <li><a href="Daemonizable.html">Daemonizable</a></li>
139
+ </ul>
140
+
141
+ <h2 class="ruled">Methods</h2>
142
+ <h4 class="ruled">
143
+ <span class="method-type" title="Public Class method">Public Class</span>
144
+ <strong><a name="M000041" href="#M000041" title="Permalink to Public Class method: new">new(host, port, app=nil)</a></strong>
145
+ </h4>
146
+
147
+ <p>
148
+ Creates a <a href="Server.html#M000041">new</a> server binded to
149
+ <tt>host:port</tt> that will pass request to <tt>app</tt>.
150
+ </p>
151
+
152
+ <div class="sourcecode">
153
+ <p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p>
154
+ <div id="M000041_source" class="dyn-source">
155
+ <pre>
156
+ <span class="ruby-comment cmt"># File lib/thin/server.rb, line 26</span>
157
+ 26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">app</span>=<span class="ruby-keyword kw">nil</span>)
158
+ 27: <span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
159
+ 28: <span class="ruby-ivar">@port</span> = <span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_i</span>
160
+ 29: <span class="ruby-ivar">@app</span> = <span class="ruby-identifier">app</span>
161
+ 30: <span class="ruby-ivar">@timeout</span> = <span class="ruby-value">60</span> <span class="ruby-comment cmt"># sec</span>
162
+ 31: <span class="ruby-keyword kw">end</span>
163
+ </pre>
164
+ </div>
165
+ </div>
166
+ <h4 class="ruled">
167
+ <span class="method-type" title="Public Instance method">Public Instance</span>
168
+ <strong><a name="M000044" href="#M000044" title="Permalink to Public Instance method: listen!">listen!()</a></strong>
169
+ </h4>
170
+
171
+ <p>
172
+ Start listening for connections
173
+ </p>
174
+
175
+ <div class="sourcecode">
176
+ <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p>
177
+ <div id="M000044_source" class="dyn-source">
178
+ <pre>
179
+ <span class="ruby-comment cmt"># File lib/thin/server.rb, line 48</span>
180
+ 48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">listen!</span>
181
+ 49: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">'INT'</span>) { <span class="ruby-identifier">stop</span> }
182
+ 50: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">'TERM'</span>) { <span class="ruby-identifier">stop!</span> }
183
+ 51:
184
+ 52: <span class="ruby-comment cmt"># See http://rubyeventmachine.com/pub/rdoc/files/EPOLL.html</span>
185
+ 53: <span class="ruby-constant">EventMachine</span>.<span class="ruby-identifier">epoll</span>
186
+ 54:
187
+ 55: <span class="ruby-constant">EventMachine</span>.<span class="ruby-identifier">run</span> <span class="ruby-keyword kw">do</span>
188
+ 56: <span class="ruby-keyword kw">begin</span>
189
+ 57: <span class="ruby-identifier">log</span> <span class="ruby-node">&quot;&gt;&gt; Listening on #{@host}:#{@port}, CTRL+C to stop&quot;</span>
190
+ 58: <span class="ruby-constant">EventMachine</span>.<span class="ruby-identifier">start_server</span>(<span class="ruby-ivar">@host</span>, <span class="ruby-ivar">@port</span>, <span class="ruby-constant">Connection</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">connection</span><span class="ruby-operator">|</span>
191
+ 59: <span class="ruby-identifier">connection</span>.<span class="ruby-identifier">comm_inactivity_timeout</span> = <span class="ruby-ivar">@timeout</span>
192
+ 60: <span class="ruby-identifier">connection</span>.<span class="ruby-identifier">app</span> = <span class="ruby-ivar">@app</span>
193
+ 61: <span class="ruby-identifier">connection</span>.<span class="ruby-identifier">silent</span> = <span class="ruby-ivar">@silent</span>
194
+ 62: <span class="ruby-keyword kw">end</span>
195
+ 63: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StopServer</span>
196
+ 64: <span class="ruby-constant">EventMachine</span>.<span class="ruby-identifier">stop_event_loop</span>
197
+ 65: <span class="ruby-keyword kw">end</span>
198
+ 66: <span class="ruby-keyword kw">end</span>
199
+ 67: <span class="ruby-keyword kw">end</span>
200
+ </pre>
201
+ </div>
202
+ </div>
203
+ <h4 class="ruled">
204
+ <span class="method-type" title="Public Instance method">Public Instance</span>
205
+ <strong><a name="M000042" href="#M000042" title="Permalink to Public Instance method: start">start()</a></strong>
206
+ </h4>
207
+
208
+ <p>
209
+ Starts the handlers.
210
+ </p>
211
+
212
+ <div class="sourcecode">
213
+ <p class="source-link">[ <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show source</a> ]</p>
214
+ <div id="M000042_source" class="dyn-source">
215
+ <pre>
216
+ <span class="ruby-comment cmt"># File lib/thin/server.rb, line 34</span>
217
+ 34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
218
+ 35: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;app required&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@app</span>
219
+ 36:
220
+ 37: <span class="ruby-identifier">log</span> <span class="ruby-node">&quot;&gt;&gt; Thin web server (v#{VERSION::STRING} codename #{VERSION::CODENAME})&quot;</span>
221
+ 38: <span class="ruby-identifier">trace</span> <span class="ruby-value str">&quot;&gt;&gt; Tracing ON&quot;</span>
222
+ 39: <span class="ruby-keyword kw">end</span>
223
+ </pre>
224
+ </div>
225
+ </div>
226
+ <h4 class="ruled">
227
+ <span class="method-type" title="Public Instance method">Public Instance</span>
228
+ <strong><a name="M000043" href="#M000043" title="Permalink to Public Instance method: start!">start!()</a></strong>
229
+ </h4>
230
+
231
+ <p>
232
+ Start the server and listen for connections
233
+ </p>
234
+
235
+ <div class="sourcecode">
236
+ <p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p>
237
+ <div id="M000043_source" class="dyn-source">
238
+ <pre>
239
+ <span class="ruby-comment cmt"># File lib/thin/server.rb, line 42</span>
240
+ 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start!</span>
241
+ 43: <span class="ruby-identifier">start</span>
242
+ 44: <span class="ruby-identifier">listen!</span>
243
+ 45: <span class="ruby-keyword kw">end</span>
244
+ </pre>
245
+ </div>
246
+ </div>
247
+ <h4 class="ruled">
248
+ <span class="method-type" title="Public Instance method">Public Instance</span>
249
+ <strong><a name="M000045" href="#M000045" title="Permalink to Public Instance method: stop">stop()</a></strong>
250
+ </h4>
251
+
252
+
253
+ <div class="sourcecode">
254
+ <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p>
255
+ <div id="M000045_source" class="dyn-source">
256
+ <pre>
257
+ <span class="ruby-comment cmt"># File lib/thin/server.rb, line 70</span>
258
+ 70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>
259
+ 71: <span class="ruby-constant">EventMachine</span>.<span class="ruby-identifier">stop_event_loop</span>
260
+ 72: <span class="ruby-keyword kw">rescue</span>
261
+ 73: <span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;Error stopping : #{$!}&quot;</span>
262
+ 74: <span class="ruby-keyword kw">end</span>
263
+ </pre>
264
+ </div>
265
+ </div>
266
+ <h4 class="ruled">
267
+ <span class="method-type" title="Public Instance method">Public Instance</span>
268
+ <strong><a name="M000046" href="#M000046" title="Permalink to Public Instance method: stop!">stop!()</a></strong>
269
+ </h4>
270
+
271
+
272
+ <div class="sourcecode">
273
+ <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p>
274
+ <div id="M000046_source" class="dyn-source">
275
+ <pre>
276
+ <span class="ruby-comment cmt"># File lib/thin/server.rb, line 76</span>
277
+ 76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop!</span>
278
+ 77: <span class="ruby-identifier">raise</span> <span class="ruby-constant">StopServer</span>
279
+ 78: <span class="ruby-keyword kw">end</span>
280
+ </pre>
281
+ </div>
282
+ </div>
283
+
284
+ </div>
285
+ </div>
286
+
287
+
288
+ </div>
289
+ </div>
290
+ <div id="footer">
291
+ <hr />
292
+ &copy; <a href="http://macournoyer.com">Marc-Andr&eacute; Cournoyer</a>
293
+ </div>
294
+ </body>
295
+ </html>
@@ -0,0 +1,143 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
+ <html>
4
+ <head>
5
+ <title>
6
+ thin &raquo; Class: Thin::StopServer
7
+ </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
+ <script language="JavaScript" type="text/javascript">
11
+ // <![CDATA[
12
+
13
+ function toggleSource( id )
14
+ {
15
+ var elem
16
+ var link
17
+
18
+ if( document.getElementById )
19
+ {
20
+ elem = document.getElementById( id )
21
+ link = document.getElementById( "l_" + id )
22
+ }
23
+ else if ( document.all )
24
+ {
25
+ elem = eval( "document.all." + id )
26
+ link = eval( "document.all.l_" + id )
27
+ }
28
+ else
29
+ return false;
30
+
31
+ if( elem.style.display == "block" )
32
+ {
33
+ elem.style.display = "none"
34
+ link.innerHTML = "show source"
35
+ }
36
+ else
37
+ {
38
+ elem.style.display = "block"
39
+ link.innerHTML = "hide source"
40
+ }
41
+ }
42
+
43
+ function openCode( url )
44
+ {
45
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
46
+ }
47
+ // ]]>
48
+ </script>
49
+ </head>
50
+ <body>
51
+ <ul id="menu">
52
+ <li><a href="/thin/">about</a></li>
53
+ <li><a href="/thin/download/">download</a></li>
54
+ <li><a href="/thin/usage/">usage</a></li>
55
+ <li><a href="/thin/doc/">doc</a></li>
56
+ <li><a href="http://groups.google.com/group/thin-ruby/">community</a></li>
57
+ </ul>
58
+ <div id="sidebar">
59
+ <h2>Files</h2>
60
+ <ul class="list">
61
+ <li><a href="../../files/README.html" value="File: README">README</a></li>
62
+ <li><a href="../../files/lib/rack/adapter/rails_rb.html" value="File: rails.rb">lib/rack/adapter/rails.rb</a></li>
63
+ <li><a href="../../files/lib/rack/handler/thin_rb.html" value="File: thin.rb">lib/rack/handler/thin.rb</a></li>
64
+ <li><a href="../../files/lib/thin/cluster_rb.html" value="File: cluster.rb">lib/thin/cluster.rb</a></li>
65
+ <li><a href="../../files/lib/thin/connection_rb.html" value="File: connection.rb">lib/thin/connection.rb</a></li>
66
+ <li><a href="../../files/lib/thin/daemonizing_rb.html" value="File: daemonizing.rb">lib/thin/daemonizing.rb</a></li>
67
+ <li><a href="../../files/lib/thin/headers_rb.html" value="File: headers.rb">lib/thin/headers.rb</a></li>
68
+ <li><a href="../../files/lib/thin/logging_rb.html" value="File: logging.rb">lib/thin/logging.rb</a></li>
69
+ <li><a href="../../files/lib/thin/request_rb.html" value="File: request.rb">lib/thin/request.rb</a></li>
70
+ <li><a href="../../files/lib/thin/response_rb.html" value="File: response.rb">lib/thin/response.rb</a></li>
71
+ <li><a href="../../files/lib/thin/server_rb.html" value="File: server.rb">lib/thin/server.rb</a></li>
72
+ <li><a href="../../files/lib/thin/statuses_rb.html" value="File: statuses.rb">lib/thin/statuses.rb</a></li>
73
+ <li><a href="../../files/lib/thin/version_rb.html" value="File: version.rb">lib/thin/version.rb</a></li>
74
+ <li><a href="../../files/lib/thin_rb.html" value="File: thin.rb">lib/thin.rb</a></li>
75
+ <li><a href="../../files/bin/thin.html" value="File: thin">bin/thin</a></li>
76
+ </ul>
77
+
78
+ <h2>Classes</h2>
79
+ <ul class="list">
80
+ <li><a href="../../classes/Rack.html" title="Module: Rack">Rack</a></li>
81
+ <li><a href="../../classes/Rack/Adapter.html" title="Module: Rack::Adapter">Rack::Adapter</a></li>
82
+ <li><a href="../../classes/Rack/Adapter/Rails.html" title="Class: Rack::Adapter::Rails">Rack::Adapter::Rails</a></li>
83
+ <li><a href="../../classes/Rack/Adapter/Rails/CGIWrapper.html" title="Class: Rack::Adapter::Rails::CGIWrapper">Rack::Adapter::Rails::CGIWrapper</a></li>
84
+ <li><a href="../../classes/Rack/Handler.html" title="Module: Rack::Handler">Rack::Handler</a></li>
85
+ <li><a href="../../classes/Rack/Handler/Thin.html" title="Class: Rack::Handler::Thin">Rack::Handler::Thin</a></li>
86
+ <li><a href="../../classes/Thin.html" title="Module: Thin">Thin</a></li>
87
+ <li><a href="../../classes/Thin/Daemonizable.html" title="Module: Thin::Daemonizable">Thin::Daemonizable</a></li>
88
+ <li><a href="../../classes/Thin/Daemonizable/ClassMethods.html" title="Module: Thin::Daemonizable::ClassMethods">Thin::Daemonizable::ClassMethods</a></li>
89
+ <li><a href="../../classes/Thin/VERSION.html" title="Module: Thin::VERSION">Thin::VERSION</a></li>
90
+ <li><a href="../../classes/Thin/Logging.html" title="Module: Thin::Logging">Thin::Logging</a></li>
91
+ <li><a href="../../classes/Thin/InvalidRequest.html" title="Class: Thin::InvalidRequest">Thin::InvalidRequest</a></li>
92
+ <li><a href="../../classes/Thin/StopServer.html" title="Class: Thin::StopServer">Thin::StopServer</a></li>
93
+ <li><a href="../../classes/Thin/Response.html" title="Class: Thin::Response">Thin::Response</a></li>
94
+ <li><a href="../../classes/Thin/Headers.html" title="Class: Thin::Headers">Thin::Headers</a></li>
95
+ <li><a href="../../classes/Thin/Server.html" title="Class: Thin::Server">Thin::Server</a></li>
96
+ <li><a href="../../classes/Thin/Request.html" title="Class: Thin::Request">Thin::Request</a></li>
97
+ <li><a href="../../classes/Thin/Connection.html" title="Class: Thin::Connection">Thin::Connection</a></li>
98
+ <li><a href="../../classes/Thin/Cluster.html" title="Class: Thin::Cluster">Thin::Cluster</a></li>
99
+ <li><a href="../../classes/Process.html" title="Module: Process">Process</a></li>
100
+ </ul>
101
+ </div>
102
+ <div id="container">
103
+ <div id="header">
104
+ <a href="/thin/" title="Home">
105
+ <img id="logo" src="../../logo.gif" />
106
+ </a>
107
+ <h2 id="tag_line">A fast and very simple Ruby web server</h2>
108
+ </div>
109
+
110
+ <div id="content">
111
+ <h2>Class: Thin::StopServer</h2>
112
+
113
+
114
+ <div id="Thin::StopServer" class="page_shade">
115
+ <div class="page">
116
+ <h3>Class Thin::StopServer &lt; Exception</h3>
117
+
118
+ <span class="path">(in files
119
+ <a href="../../files/lib/thin/server_rb.html">lib/thin/server.rb</a>
120
+ )</span>
121
+
122
+ <p>
123
+ Raise when we require the server to stop
124
+ </p>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ </div>
133
+ </div>
134
+
135
+
136
+ </div>
137
+ </div>
138
+ <div id="footer">
139
+ <hr />
140
+ &copy; <a href="http://macournoyer.com">Marc-Andr&eacute; Cournoyer</a>
141
+ </div>
142
+ </body>
143
+ </html>
@@ -0,0 +1 @@
1
+ Fri, 18 Jan 2008 08:38:16 -0700
@@ -0,0 +1,226 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
+ <html>
4
+ <head>
5
+ <title>
6
+ thin &raquo; File: README
7
+ </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
+ <script language="JavaScript" type="text/javascript">
11
+ // <![CDATA[
12
+
13
+ function toggleSource( id )
14
+ {
15
+ var elem
16
+ var link
17
+
18
+ if( document.getElementById )
19
+ {
20
+ elem = document.getElementById( id )
21
+ link = document.getElementById( "l_" + id )
22
+ }
23
+ else if ( document.all )
24
+ {
25
+ elem = eval( "document.all." + id )
26
+ link = eval( "document.all.l_" + id )
27
+ }
28
+ else
29
+ return false;
30
+
31
+ if( elem.style.display == "block" )
32
+ {
33
+ elem.style.display = "none"
34
+ link.innerHTML = "show source"
35
+ }
36
+ else
37
+ {
38
+ elem.style.display = "block"
39
+ link.innerHTML = "hide source"
40
+ }
41
+ }
42
+
43
+ function openCode( url )
44
+ {
45
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
46
+ }
47
+ // ]]>
48
+ </script>
49
+ </head>
50
+ <body>
51
+ <ul id="menu">
52
+ <li><a href="/thin/">about</a></li>
53
+ <li><a href="/thin/download/">download</a></li>
54
+ <li><a href="/thin/usage/">usage</a></li>
55
+ <li><a href="/thin/doc/">doc</a></li>
56
+ <li><a href="http://groups.google.com/group/thin-ruby/">community</a></li>
57
+ </ul>
58
+ <div id="sidebar">
59
+ <h2>Files</h2>
60
+ <ul class="list">
61
+ <li><a href="../files/README.html" value="File: README">README</a></li>
62
+ <li><a href="../files/lib/rack/adapter/rails_rb.html" value="File: rails.rb">lib/rack/adapter/rails.rb</a></li>
63
+ <li><a href="../files/lib/rack/handler/thin_rb.html" value="File: thin.rb">lib/rack/handler/thin.rb</a></li>
64
+ <li><a href="../files/lib/thin/cluster_rb.html" value="File: cluster.rb">lib/thin/cluster.rb</a></li>
65
+ <li><a href="../files/lib/thin/connection_rb.html" value="File: connection.rb">lib/thin/connection.rb</a></li>
66
+ <li><a href="../files/lib/thin/daemonizing_rb.html" value="File: daemonizing.rb">lib/thin/daemonizing.rb</a></li>
67
+ <li><a href="../files/lib/thin/headers_rb.html" value="File: headers.rb">lib/thin/headers.rb</a></li>
68
+ <li><a href="../files/lib/thin/logging_rb.html" value="File: logging.rb">lib/thin/logging.rb</a></li>
69
+ <li><a href="../files/lib/thin/request_rb.html" value="File: request.rb">lib/thin/request.rb</a></li>
70
+ <li><a href="../files/lib/thin/response_rb.html" value="File: response.rb">lib/thin/response.rb</a></li>
71
+ <li><a href="../files/lib/thin/server_rb.html" value="File: server.rb">lib/thin/server.rb</a></li>
72
+ <li><a href="../files/lib/thin/statuses_rb.html" value="File: statuses.rb">lib/thin/statuses.rb</a></li>
73
+ <li><a href="../files/lib/thin/version_rb.html" value="File: version.rb">lib/thin/version.rb</a></li>
74
+ <li><a href="../files/lib/thin_rb.html" value="File: thin.rb">lib/thin.rb</a></li>
75
+ <li><a href="../files/bin/thin.html" value="File: thin">bin/thin</a></li>
76
+ </ul>
77
+
78
+ <h2>Classes</h2>
79
+ <ul class="list">
80
+ <li><a href="../classes/Rack.html" title="Module: Rack">Rack</a></li>
81
+ <li><a href="../classes/Rack/Adapter.html" title="Module: Rack::Adapter">Rack::Adapter</a></li>
82
+ <li><a href="../classes/Rack/Adapter/Rails.html" title="Class: Rack::Adapter::Rails">Rack::Adapter::Rails</a></li>
83
+ <li><a href="../classes/Rack/Adapter/Rails/CGIWrapper.html" title="Class: Rack::Adapter::Rails::CGIWrapper">Rack::Adapter::Rails::CGIWrapper</a></li>
84
+ <li><a href="../classes/Rack/Handler.html" title="Module: Rack::Handler">Rack::Handler</a></li>
85
+ <li><a href="../classes/Rack/Handler/Thin.html" title="Class: Rack::Handler::Thin">Rack::Handler::Thin</a></li>
86
+ <li><a href="../classes/Thin.html" title="Module: Thin">Thin</a></li>
87
+ <li><a href="../classes/Thin/Daemonizable.html" title="Module: Thin::Daemonizable">Thin::Daemonizable</a></li>
88
+ <li><a href="../classes/Thin/Daemonizable/ClassMethods.html" title="Module: Thin::Daemonizable::ClassMethods">Thin::Daemonizable::ClassMethods</a></li>
89
+ <li><a href="../classes/Thin/VERSION.html" title="Module: Thin::VERSION">Thin::VERSION</a></li>
90
+ <li><a href="../classes/Thin/Logging.html" title="Module: Thin::Logging">Thin::Logging</a></li>
91
+ <li><a href="../classes/Thin/InvalidRequest.html" title="Class: Thin::InvalidRequest">Thin::InvalidRequest</a></li>
92
+ <li><a href="../classes/Thin/StopServer.html" title="Class: Thin::StopServer">Thin::StopServer</a></li>
93
+ <li><a href="../classes/Thin/Response.html" title="Class: Thin::Response">Thin::Response</a></li>
94
+ <li><a href="../classes/Thin/Headers.html" title="Class: Thin::Headers">Thin::Headers</a></li>
95
+ <li><a href="../classes/Thin/Server.html" title="Class: Thin::Server">Thin::Server</a></li>
96
+ <li><a href="../classes/Thin/Request.html" title="Class: Thin::Request">Thin::Request</a></li>
97
+ <li><a href="../classes/Thin/Connection.html" title="Class: Thin::Connection">Thin::Connection</a></li>
98
+ <li><a href="../classes/Thin/Cluster.html" title="Class: Thin::Cluster">Thin::Cluster</a></li>
99
+ <li><a href="../classes/Process.html" title="Module: Process">Process</a></li>
100
+ </ul>
101
+ </div>
102
+ <div id="container">
103
+ <div id="header">
104
+ <a href="/thin/" title="Home">
105
+ <img id="logo" src="../logo.gif" />
106
+ </a>
107
+ <h2 id="tag_line">A fast and very simple Ruby web server</h2>
108
+ </div>
109
+
110
+ <div id="content">
111
+ <h2>File: README</h2>
112
+
113
+ <div id="README" class="page_shade">
114
+ <div class="page">
115
+ <div class="header">
116
+ <div class="path">README / Fri Jan 18 08:37:21 -0700 2008</div>
117
+ </div>
118
+
119
+ <h2><a href="../classes/Thin.html">Thin</a></h2>
120
+ <p>
121
+ Tiny, fast &amp; funny HTTP server
122
+ </p>
123
+ <p>
124
+ <a href="../classes/Thin.html">Thin</a> is a Ruby web server that glues
125
+ together 3 of the best Ruby libraries in web history:
126
+ </p>
127
+ <pre>
128
+ * the Mongrel parser: the root of Mongrel speed and security
129
+ * Event Machine: a network I/O library with extremely high scalability, performance and stability
130
+ * Rack: a minimal interface between webservers and Ruby frameworks
131
+ </pre>
132
+ <p>
133
+ Which makes it, with all humility, the most secure, stable, fast and
134
+ extensible Ruby web server bundled in an easy to use gem for your own
135
+ pleasure.
136
+ </p>
137
+ <h3>Installation</h3>
138
+ <p>
139
+ For the latest stable version:
140
+ </p>
141
+ <pre>
142
+ sudo gem install thin
143
+ </pre>
144
+ <p>
145
+ or using my mirror (might be more recent):
146
+ </p>
147
+ <pre>
148
+ sudo gem install thin --source http://code.macournoyer.com
149
+ </pre>
150
+ <p>
151
+ Or from source:
152
+ </p>
153
+ <pre>
154
+ git clone git://repo.or.cz/thin.git
155
+ cd thin
156
+ rake install
157
+ </pre>
158
+ <h3>Usage</h3>
159
+ <p>
160
+ A <tt>thin</tt> script is offered to easily start your Rails application:
161
+ </p>
162
+ <pre>
163
+ cd to/your/rails/app
164
+ thin start
165
+ </pre>
166
+ <p>
167
+ But <a href="../classes/Thin.html">Thin</a> is also usable through <a
168
+ href="../classes/Rack.html">Rack</a> <tt>rackup</tt> command. You need to
169
+ setup a config.ru file and require thin in it:
170
+ </p>
171
+ <pre>
172
+ cat &lt;&lt;EOS
173
+ require 'thin'
174
+
175
+ app = proc do |env|
176
+ [200, {'Content-Type'=&gt;'text/html'}, ['hi']]
177
+ end
178
+
179
+ run app
180
+ EOS
181
+ rackup -s thin
182
+ </pre>
183
+ <p>
184
+ See example/config.ru for details and rackup -h
185
+ </p>
186
+ <h3>License</h3>
187
+ <p>
188
+ Ruby License, <a
189
+ href="http://www.ruby-lang.org/en/LICENSE.txt">www.ruby-lang.org/en/LICENSE.txt</a>.
190
+ </p>
191
+ <h3>Credits</h3>
192
+ <p>
193
+ The parser was stolen from Mongrel <a
194
+ href="http://mongrel.rubyforge.org">mongrel.rubyforge.org</a> by Zed Shaw.
195
+ Mongrel Web Server (Mongrel) is copyrighted free software by Zed A. Shaw
196
+ &lt;zedshaw at zedshaw dot com&gt; You can redistribute it and/or modify it
197
+ under either the terms of the GPL.
198
+ </p>
199
+ <p>
200
+ <a href="../classes/Thin.html">Thin</a> is copyright Marc-Andre Cournoyer
201
+ &lt;macournoyer@gmail.com&gt;
202
+ </p>
203
+ <p>
204
+ Please report any bug at <a
205
+ href="http://groups.google.com/group/thin-ruby">groups.google.com/group/thin-ruby</a>/
206
+ and major security issues directly to me at macournoyer@gmail.com.
207
+ </p>
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+ </div>
216
+ </div>
217
+
218
+
219
+ </div>
220
+ </div>
221
+ <div id="footer">
222
+ <hr />
223
+ &copy; <a href="http://macournoyer.com">Marc-Andr&eacute; Cournoyer</a>
224
+ </div>
225
+ </body>
226
+ </html>