summaryrefslogtreecommitdiff
path: root/lib/gserver.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-04 22:00:31 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-04 22:00:31 +0000
commit91edcb053b3dd0a86ad7cec0a652d084d6e7dd46 (patch)
tree3ebfb81d7fdc03904604b2c7148180d7c6b02cec /lib/gserver.rb
parent4d2d744487d6f2ca97d034c7b7d5c2a4836fc5db (diff)
Merge RDoc changes from HEAD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/gserver.rb')
-rw-r--r--lib/gserver.rb42
1 files changed, 23 insertions, 19 deletions
diff --git a/lib/gserver.rb b/lib/gserver.rb
index 371fceb..eb5f31b 100644
--- a/lib/gserver.rb
+++ b/lib/gserver.rb
@@ -12,21 +12,23 @@ require "socket"
require "thread"
#
-# +GServer+ implements a generic server, featuring thread pool management, simple logging, and
-# multi-server management. See <tt>xmlrpc/httpserver.rb</tt> in the Ruby standard library for
-# an example of +GServer+ in action.
-#
-# Any kind of application-level server can be implemented using this class. It accepts
-# multiple simultaneous connections from clients, up to an optional maximum number. Several
-# _services_ (i.e. one service per TCP port) can be run simultaneously, and stopped at any time
-# through the class method <tt>GServer.stop(port)</tt>. All the threading issues are handled,
-# saving you the effort. All events are optionally logged, but you can provide your own event
-# handlers if you wish.
+# GServer implements a generic server, featuring thread pool management,
+# simple logging, and multi-server management. See HttpServer in
+# <tt>xmlrpc/httpserver.rb</tt> in the Ruby standard library for an example of
+# GServer in action.
+#
+# Any kind of application-level server can be implemented using this class.
+# It accepts multiple simultaneous connections from clients, up to an optional
+# maximum number. Several _services_ (i.e. one service per TCP port) can be
+# run simultaneously, and stopped at any time through the class method
+# <tt>GServer.stop(port)</tt>. All the threading issues are handled, saving
+# you the effort. All events are optionally logged, but you can provide your
+# own event handlers if you wish.
#
# === Example
#
-# Using +GServer+ is simple. Below we implement a simple time server, run it, query it, and
-# shut it down. Try this code in +irb+:
+# Using GServer is simple. Below we implement a simple time server, run it,
+# query it, and shut it down. Try this code in +irb+:
#
# require 'gserver'
#
@@ -60,14 +62,16 @@ require "thread"
# GServer.stop(10001)
# # or, of course, "server.stop".
#
-# All the business of accepting connections and exception handling is taken care of. All we
-# have to do is implement the method that actually serves the client.
+# All the business of accepting connections and exception handling is taken
+# care of. All we have to do is implement the method that actually serves the
+# client.
#
# === Advanced
#
-# As the example above shows, the way to use +GServer+ is to subclass it to create a specific
-# server, overriding the +serve+ method. You can override other methods as well if you wish,
-# perhaps to collect statistics, or emit more detailed logging.
+# As the example above shows, the way to use GServer is to subclass it to
+# create a specific server, overriding the +serve+ method. You can override
+# other methods as well if you wish, perhaps to collect statistics, or emit
+# more detailed logging.
#
# connecting
# disconnecting
@@ -76,8 +80,8 @@ require "thread"
#
# The above methods are only called if auditing is enabled.
#
-# You can also override +log+ and +error+ if, for example, you wish to use a more sophisticated
-# logging system.
+# You can also override +log+ and +error+ if, for example, you wish to use a
+# more sophisticated logging system.
#
class GServer