Class PhusionPassenger::RequestHandler
In: src/ruby_supportlib/phusion_passenger/request_handler.rb
src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb
Parent: Object

Methods

Included Modules

DebugLogging Utils

Classes and Modules

Class PhusionPassenger::RequestHandler::ThreadHandler

Constants

HARD_TERMINATION_SIGNAL = "SIGTERM"   Signal which will cause the application to exit immediately.
BACKLOG_SIZE = 500

Attributes

concurrency  [R] 
connect_password  [RW]  A password with which clients must authenticate. Default is unauthenticated.
server_sockets  [R]  A hash containing all server sockets that this request handler listens on. The hash is in the form of:
  {
     name1 => [socket_address1, socket_type1, socket1],
     name2 => [socket_address2, socket_type2, socket2],
     ...
  }

name is a Symbol. socket_addressx is the address of the socket, socket_typex is the socket‘s type (either ‘unix’ or ‘tcp’) and socketx is the actual socket IO objec. There‘s guaranteed to be at least one server socket, namely one with the name +:main+.

Public Class methods

Create a new RequestHandler with the given owner pipe. owner_pipe must be the readable part of a pipe IO object.

Additionally, the following options may be given:

  • connect_password

Public Instance methods

Clean up temporary stuff created by the request handler.

If the main loop was started by main_loop, then this method may only be called after the main loop has exited.

If the main loop was started by start_main_loop_thread, then this method may be called at any time, and it will stop the main loop thread.

Enter the request handler‘s main loop.

Check whether the main loop‘s currently running.

Start the main loop in a new thread. This thread will be stopped by cleanup.

[Validate]