stop

stop() Instance Public methods Stops the server from accepting new connections.

start

start(&block) Instance Public methods Starts the server and runs the block for each connection. This method does not return until the server is stopped from a signal handler or another thread using stop or shutdown. If the block raises a subclass of StandardError the exception is logged and ignored. If an IOError or Errno::EBADF exception is raised the exception is ignored. If an Exception subclass is raised the exception is logged and re-raised which stops the server. To co

shutdown

shutdown() Instance Public methods Shuts down the server and all listening sockets. New listeners must be provided to restart the server.

run

run(sock) Instance Public methods You must subclass GenericServer and implement #run which accepts a TCP client socket

listen

listen(address, port) Instance Public methods Adds listeners from address and port to the server. See WEBrick::Utils.create_listeners for details.

[]

[](key) Instance Public methods Retrieves key from the configuration

new

new(config={}, default=Config::General) Class Public methods Creates a new generic server from config. The default configuration comes from default.

start

start() Class Public methods Performs the standard operations for daemonizing a process. Runs a block, if given.

to_s

to_s() Instance Public methods The cookie string suitable for use in an HTTP header

expires=

expires=(t) Instance Public methods Sets the cookie expiration to the time t. The expiration time may be a false value to disable expiration or a Time or HTTP format time string to set the expiration date.