class Puma::Server

def initialize(app, events=Events.stdio, options={})


to do its work.
Server#run returns a thread that you can join on to wait for the server

to be handled. See Puma::Events for the list of current methods to implement.
+events+ is an object which will be called when certain error events occur

Create a server for the rack app +app+.
def initialize(app, events=Events.stdio, options={})
  @app = app
  @events = events
  @check, @notify = Puma::Util.pipe
  @status = :stop
  @min_threads = 0
  @max_threads = 16
  @auto_trim_time = 30
  @reaping_time = 1
  @thread = nil
  @thread_pool = nil
  @early_hints = nil
  @persistent_timeout = options.fetch(:persistent_timeout, PERSISTENT_TIMEOUT)
  @first_data_timeout = options.fetch(:first_data_timeout, FIRST_DATA_TIMEOUT)
  @binder = Binder.new(events)
  @leak_stack_on_error = true
  @options = options
  @queue_requests = options[:queue_requests].nil? ? true : options[:queue_requests]
  ENV['RACK_ENV'] ||= "development"
  @mode = :http
  @precheck_closing = true
end