mongrel 0.3.10.1 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. data/Rakefile +14 -2
  2. data/bin/mongrel_rails +7 -1
  3. data/bin/mongrel_rails_service +4 -4
  4. data/lib/mongrel.rb +5 -6
  5. data/tools/rakehelp.rb +4 -2
  6. metadata +3 -134
  7. data/doc/rdoc/classes/Mongrel.html +0 -175
  8. data/doc/rdoc/classes/Mongrel/CGIWrapper.html +0 -381
  9. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000057.html +0 -24
  10. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000058.html +0 -47
  11. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000059.html +0 -34
  12. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000060.html +0 -27
  13. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000061.html +0 -25
  14. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000062.html +0 -18
  15. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000063.html +0 -18
  16. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000064.html +0 -18
  17. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000065.html +0 -19
  18. data/doc/rdoc/classes/Mongrel/Camping.html +0 -177
  19. data/doc/rdoc/classes/Mongrel/Camping.src/M000019.html +0 -22
  20. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +0 -165
  21. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000020.html +0 -18
  22. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000021.html +0 -27
  23. data/doc/rdoc/classes/Mongrel/Command.html +0 -119
  24. data/doc/rdoc/classes/Mongrel/Command/Base.html +0 -332
  25. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000006.html +0 -24
  26. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000007.html +0 -41
  27. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000008.html +0 -18
  28. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000009.html +0 -18
  29. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000010.html +0 -18
  30. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000011.html +0 -22
  31. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000012.html +0 -18
  32. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000013.html +0 -18
  33. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000014.html +0 -18
  34. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000015.html +0 -18
  35. data/doc/rdoc/classes/Mongrel/Command/Registry.html +0 -192
  36. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000016.html +0 -20
  37. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000017.html +0 -25
  38. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000018.html +0 -46
  39. data/doc/rdoc/classes/Mongrel/Const.html +0 -352
  40. data/doc/rdoc/classes/Mongrel/DirHandler.html +0 -283
  41. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000029.html +0 -20
  42. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000030.html +0 -42
  43. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000031.html +0 -40
  44. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000032.html +0 -31
  45. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000033.html +0 -38
  46. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000034.html +0 -18
  47. data/doc/rdoc/classes/Mongrel/Error404Handler.html +0 -171
  48. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000066.html +0 -18
  49. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000067.html +0 -18
  50. data/doc/rdoc/classes/Mongrel/HeaderOut.html +0 -185
  51. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000041.html +0 -18
  52. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000042.html +0 -21
  53. data/doc/rdoc/classes/Mongrel/HttpHandler.html +0 -146
  54. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000043.html +0 -17
  55. data/doc/rdoc/classes/Mongrel/HttpParser.html +0 -271
  56. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000022.html +0 -28
  57. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000023.html +0 -29
  58. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000024.html +0 -29
  59. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000025.html +0 -41
  60. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000026.html +0 -27
  61. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000027.html +0 -27
  62. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000028.html +0 -28
  63. data/doc/rdoc/classes/Mongrel/HttpRequest.html +0 -177
  64. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000068.html +0 -39
  65. data/doc/rdoc/classes/Mongrel/HttpResponse.html +0 -321
  66. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000044.html +0 -21
  67. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000045.html +0 -20
  68. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000046.html +0 -19
  69. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000047.html +0 -19
  70. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000048.html +0 -20
  71. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000049.html +0 -20
  72. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000050.html +0 -20
  73. data/doc/rdoc/classes/Mongrel/HttpServer.html +0 -310
  74. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000035.html +0 -36
  75. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000036.html +0 -57
  76. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000037.html +0 -48
  77. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000038.html +0 -18
  78. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000039.html +0 -18
  79. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000040.html +0 -23
  80. data/doc/rdoc/classes/Mongrel/StopServer.html +0 -117
  81. data/doc/rdoc/classes/Mongrel/TimeoutWorker.html +0 -117
  82. data/doc/rdoc/classes/Mongrel/URIClassifier.html +0 -301
  83. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000051.html +0 -18
  84. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000052.html +0 -18
  85. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000053.html +0 -39
  86. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000054.html +0 -51
  87. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000055.html +0 -36
  88. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000056.html +0 -83
  89. data/doc/rdoc/classes/RailsHandler.html +0 -245
  90. data/doc/rdoc/classes/RailsHandler.src/M000003.html +0 -22
  91. data/doc/rdoc/classes/RailsHandler.src/M000004.html +0 -48
  92. data/doc/rdoc/classes/RailsHandler.src/M000005.html +0 -23
  93. data/doc/rdoc/classes/TCPServer.html +0 -173
  94. data/doc/rdoc/classes/TCPServer.src/M000001.html +0 -19
  95. data/doc/rdoc/created.rid +0 -1
  96. data/doc/rdoc/files/COPYING.html +0 -756
  97. data/doc/rdoc/files/LICENSE.html +0 -756
  98. data/doc/rdoc/files/README.html +0 -302
  99. data/doc/rdoc/files/ext/http11/http11_c.html +0 -101
  100. data/doc/rdoc/files/lib/mongrel/camping_rb.html +0 -108
  101. data/doc/rdoc/files/lib/mongrel/cgi_rb.html +0 -108
  102. data/doc/rdoc/files/lib/mongrel/command_rb.html +0 -111
  103. data/doc/rdoc/files/lib/mongrel/handlers_rb.html +0 -101
  104. data/doc/rdoc/files/lib/mongrel/init_rb.html +0 -109
  105. data/doc/rdoc/files/lib/mongrel/rails_rb.html +0 -109
  106. data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +0 -109
  107. data/doc/rdoc/files/lib/mongrel_rb.html +0 -116
  108. data/doc/rdoc/fr_class_index.html +0 -47
  109. data/doc/rdoc/fr_file_index.html +0 -38
  110. data/doc/rdoc/fr_method_index.html +0 -94
  111. data/doc/rdoc/index.html +0 -24
  112. data/doc/rdoc/rdoc-style.css +0 -208
@@ -1,21 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>new (Mongrel::HttpResponse)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 260</span>
14
- 260: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">socket</span>)
15
- 261: <span class="ruby-ivar">@socket</span> = <span class="ruby-identifier">socket</span>
16
- 262: <span class="ruby-ivar">@body</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
17
- 263: <span class="ruby-ivar">@status</span> = <span class="ruby-value">404</span>
18
- 264: <span class="ruby-ivar">@header</span> = <span class="ruby-constant">HeaderOut</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>)
19
- 265: <span class="ruby-keyword kw">end</span></pre>
20
- </body>
21
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>start (Mongrel::HttpResponse)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 271</span>
14
- 271: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">status</span>=<span class="ruby-value">200</span>)
15
- 272: <span class="ruby-ivar">@status</span> = <span class="ruby-identifier">status</span>.<span class="ruby-identifier">to_i</span>
16
- 273: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@header</span>, <span class="ruby-ivar">@body</span>
17
- 274: <span class="ruby-identifier">finished</span>
18
- 275: <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>reset (Mongrel::HttpResponse)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 279</span>
14
- 279: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
15
- 280: <span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>
16
- 281: <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">rewind</span>
17
- 282: <span class="ruby-keyword kw">end</span></pre>
18
- </body>
19
- </html>
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>send_status (Mongrel::HttpResponse)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 284</span>
14
- 284: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_status</span>
15
- 285: <span class="ruby-identifier">status</span> = <span class="ruby-node">&quot;HTTP/1.1 #{@status} #{HTTP_STATUS_CODES[@status]}\r\nContent-Length: #{@body.length}\r\nConnection: close\r\n&quot;</span>
16
- 286: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">status</span>)
17
- 287: <span class="ruby-keyword kw">end</span></pre>
18
- </body>
19
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>send_header (Mongrel::HttpResponse)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 289</span>
14
- 289: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_header</span>
15
- 290: <span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>
16
- 291: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">read</span>)
17
- 292: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">&quot;\r\n&quot;</span>)
18
- 293: <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>send_body (Mongrel::HttpResponse)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 295</span>
14
- 295: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_body</span>
15
- 296: <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">rewind</span>
16
- 297: <span class="ruby-comment cmt"># connection: close is also added to ensure that the client does not pipeline.</span>
17
- 298: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-ivar">@body</span>.<span class="ruby-identifier">read</span>)
18
- 299: <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>finished (Mongrel::HttpResponse)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 303</span>
14
- 303: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">finished</span>
15
- 304: <span class="ruby-identifier">send_status</span>
16
- 305: <span class="ruby-identifier">send_header</span>
17
- 306: <span class="ruby-identifier">send_body</span>
18
- 307: <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,310 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Mongrel::HttpServer</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Mongrel::HttpServer</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/mongrel_rb.html">
59
- lib/mongrel.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- This is the main driver of <a href="../Mongrel.html">Mongrel</a>, while the
84
- Mognrel::HttpParser and <a
85
- href="URIClassifier.html">Mongrel::URIClassifier</a> make up the majority
86
- of how the server functions. It&#8217;s a very simple class that just has a
87
- thread accepting connections and a simple <a
88
- href="HttpServer.html#M000036">HttpServer.process_client</a> function to do
89
- the heavy lifting with the IO and Ruby.
90
- </p>
91
- <p>
92
- You use it by doing the following:
93
- </p>
94
- <pre>
95
- server = HttpServer.new(&quot;0.0.0.0&quot;, 3000)
96
- server.register(&quot;/stuff&quot;, MyNifterHandler.new)
97
- server.run.join
98
- </pre>
99
- <p>
100
- The last line can be just server.run if you don&#8217;t want to join the
101
- thread used. If you don&#8217;t though Ruby will mysteriously just exit on
102
- you.
103
- </p>
104
- <p>
105
- Ruby&#8217;s thread implementation is &quot;interesting&quot; to say the
106
- least. Experiments with <b>many</b> different types of IO processing simply
107
- cannot make a dent in it. Future releases of <a
108
- href="../Mongrel.html">Mongrel</a> will find other creative ways to make
109
- threads faster, but don&#8217;t hold your breath until Ruby 1.9 is actually
110
- finally useful.
111
- </p>
112
-
113
- </div>
114
-
115
-
116
- </div>
117
-
118
- <div id="method-list">
119
- <h3 class="section-bar">Methods</h3>
120
-
121
- <div class="name-list">
122
- <a href="#M000035">new</a>&nbsp;&nbsp;
123
- <a href="#M000036">process_client</a>&nbsp;&nbsp;
124
- <a href="#M000038">register</a>&nbsp;&nbsp;
125
- <a href="#M000037">run</a>&nbsp;&nbsp;
126
- <a href="#M000040">stop</a>&nbsp;&nbsp;
127
- <a href="#M000039">unregister</a>&nbsp;&nbsp;
128
- </div>
129
- </div>
130
-
131
- </div>
132
-
133
-
134
- <!-- if includes -->
135
-
136
- <div id="section">
137
-
138
-
139
-
140
-
141
-
142
- <div id="attribute-list">
143
- <h3 class="section-bar">Attributes</h3>
144
-
145
- <div class="name-list">
146
- <table>
147
- <tr class="top-aligned-row context-row">
148
- <td class="context-item-name">acceptor</td>
149
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
150
- <td class="context-item-desc"></td>
151
- </tr>
152
- </table>
153
- </div>
154
- </div>
155
-
156
-
157
-
158
- <!-- if method_list -->
159
- <div id="methods">
160
- <h3 class="section-bar">Public Class methods</h3>
161
-
162
- <div id="method-M000035" class="method-detail">
163
- <a name="M000035"></a>
164
-
165
- <div class="method-heading">
166
- <a href="HttpServer.src/M000035.html" target="Code" class="method-signature"
167
- onclick="popupCode('HttpServer.src/M000035.html');return false;">
168
- <span class="method-name">new</span><span class="method-args">(host, port, num_processors=20, timeout=120)</span>
169
- </a>
170
- </div>
171
-
172
- <div class="method-description">
173
- <p>
174
- Creates a working server on host:port (strange things happen if port
175
- isn&#8217;t a Number). Use HttpServer::run to start the server.
176
- </p>
177
- <p>
178
- The num_processors variable has varying affects on how requests are
179
- processed. You&#8216;d think adding more processing threads (processors)
180
- would make the server faster, but that&#8217;s just not true. There&#8217;s
181
- actually an effect of how Ruby does threads such that the more processors
182
- waiting on the request queue, the slower the system is to handle each
183
- request. But, the lower the number of processors the fewer concurrent
184
- responses the server can make.
185
- </p>
186
- <p>
187
- 20 is the default number of processors and is based on experimentation on a
188
- few systems. If you find that you overload <a
189
- href="../Mongrel.html">Mongrel</a> too much try changing it higher. If you
190
- find that responses are way too slow try lowering it (after you&#8217;ve
191
- tuned your stuff of course).
192
- </p>
193
- </div>
194
- </div>
195
-
196
- <h3 class="section-bar">Public Instance methods</h3>
197
-
198
- <div id="method-M000036" class="method-detail">
199
- <a name="M000036"></a>
200
-
201
- <div class="method-heading">
202
- <a href="HttpServer.src/M000036.html" target="Code" class="method-signature"
203
- onclick="popupCode('HttpServer.src/M000036.html');return false;">
204
- <span class="method-name">process_client</span><span class="method-args">(client)</span>
205
- </a>
206
- </div>
207
-
208
- <div class="method-description">
209
- <p>
210
- Does the majority of the IO processing. It has been written in Ruby using
211
- about 7 different IO processing strategies and no matter how it&#8217;s
212
- done the performance just does not improve. It is currently carefully
213
- constructed to make sure that it gets the best possible performance, but
214
- anyone who thinks they can make it faster is more than welcome to take a
215
- crack at it.
216
- </p>
217
- </div>
218
- </div>
219
-
220
- <div id="method-M000038" class="method-detail">
221
- <a name="M000038"></a>
222
-
223
- <div class="method-heading">
224
- <a href="HttpServer.src/M000038.html" target="Code" class="method-signature"
225
- onclick="popupCode('HttpServer.src/M000038.html');return false;">
226
- <span class="method-name">register</span><span class="method-args">(uri, handler)</span>
227
- </a>
228
- </div>
229
-
230
- <div class="method-description">
231
- <p>
232
- Simply registers a handler with the internal <a
233
- href="URIClassifier.html">URIClassifier</a>. When the URI is found in the
234
- prefix of a request then your handler&#8217;s HttpHandler::process method
235
- is called. See <a
236
- href="URIClassifier.html#M000054">Mongrel::URIClassifier#register</a> for
237
- more information.
238
- </p>
239
- </div>
240
- </div>
241
-
242
- <div id="method-M000037" class="method-detail">
243
- <a name="M000037"></a>
244
-
245
- <div class="method-heading">
246
- <a href="HttpServer.src/M000037.html" target="Code" class="method-signature"
247
- onclick="popupCode('HttpServer.src/M000037.html');return false;">
248
- <span class="method-name">run</span><span class="method-args">()</span>
249
- </a>
250
- </div>
251
-
252
- <div class="method-description">
253
- <p>
254
- Runs the thing. It returns the thread used so you can &quot;join&quot; it.
255
- You can also access the HttpServer::acceptor attribute to get the thread
256
- later.
257
- </p>
258
- </div>
259
- </div>
260
-
261
- <div id="method-M000040" class="method-detail">
262
- <a name="M000040"></a>
263
-
264
- <div class="method-heading">
265
- <a href="HttpServer.src/M000040.html" target="Code" class="method-signature"
266
- onclick="popupCode('HttpServer.src/M000040.html');return false;">
267
- <span class="method-name">stop</span><span class="method-args">()</span>
268
- </a>
269
- </div>
270
-
271
- <div class="method-description">
272
- <p>
273
- Stops the acceptor thread and then causes the worker threads to finish off
274
- the request queue before finally exiting.
275
- </p>
276
- </div>
277
- </div>
278
-
279
- <div id="method-M000039" class="method-detail">
280
- <a name="M000039"></a>
281
-
282
- <div class="method-heading">
283
- <a href="HttpServer.src/M000039.html" target="Code" class="method-signature"
284
- onclick="popupCode('HttpServer.src/M000039.html');return false;">
285
- <span class="method-name">unregister</span><span class="method-args">(uri)</span>
286
- </a>
287
- </div>
288
-
289
- <div class="method-description">
290
- <p>
291
- Removes any handler registered at the given URI. See <a
292
- href="URIClassifier.html#M000055">Mongrel::URIClassifier#unregister</a> for
293
- more information.
294
- </p>
295
- </div>
296
- </div>
297
-
298
-
299
- </div>
300
-
301
-
302
- </div>
303
-
304
-
305
- <div id="validator-badges">
306
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
307
- </div>
308
-
309
- </body>
310
- </html>