From 0960424db021d7a1f59170ae8012970260d6dd0c Mon Sep 17 00:00:00 2001 From: Liam Sean Brady Date: Sat, 17 Oct 2015 18:31:00 +0100 Subject: [PATCH] Fix typos and phrasing to increase readability of documentation --- lib/thin/server.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/thin/server.rb b/lib/thin/server.rb index 286aaa80..bea30958 100644 --- a/lib/thin/server.rb +++ b/lib/thin/server.rb @@ -1,10 +1,10 @@ module Thin - # The uterly famous Thin HTTP server. - # It listen for incoming request through a given +backend+ - # and forward all request to +app+. + # The utterly famous Thin HTTP server. + # It listens for incoming requests through a given +backend+ + # and forwards all requests to +app+. # # == TCP server - # Create a new TCP server on bound to host:port by specifiying +host+ + # Create a new TCP server bound to host:port by specifiying +host+ # and +port+ as the first 2 arguments. # # Thin::Server.start('0.0.0.0', 3000, app) @@ -18,12 +18,12 @@ module Thin # # == Using a custom backend # You can implement your own way to connect the server to its client by creating your - # own Backend class and pass it as the :backend option. + # own Backend class and passing it as the :backend option. # # Thin::Server.start('galaxy://faraway', 1345, app, :backend => Thin::Backends::MyFancyBackend) # # == Rack application (+app+) - # All requests will be processed through +app+ that must be a valid Rack adapter. + # All requests will be processed through +app+, which must be a valid Rack adapter. # A valid Rack adapter (application) must respond to call(env#Hash) and # return an array of [status, headers, body]. # @@ -76,10 +76,10 @@ class Server # Maximum number of file or socket descriptors that the server may open. def_delegators :backend, :maximum_connections, :maximum_connections= - # Maximum number of connection that can be persistent at the same time. - # Most browser never close the connection so most of the time they are closed - # when the timeout occur. If we don't control the number of persistent connection, - # if would be very easy to overflow the server for a DoS attack. + # Maximum number of connections that can be persistent at the same time. + # Most browsers never close the connection so most of the time they are closed + # when the timeout occurs. If we don't control the number of persistent connections, + # it would be very easy to overflow the server for a DoS attack. def_delegators :backend, :maximum_persistent_connections, :maximum_persistent_connections= # Allow using threads in the backend. @@ -166,7 +166,7 @@ def start # == Gracefull shutdown # Stops the server after processing all current connections. # As soon as this method is called, the server stops accepting - # new requests and wait for all current connections to finish. + # new requests and waits for all current connections to finish. # Calling twice is the equivalent of calling stop!. def stop if running?