Class: Reel::Server::HTTP

Inherits:
Reel::Server show all
Defined in:
lib/reel/server/http.rb

Constant Summary

Constants inherited from Reel::Server

DEFAULT_BACKLOG

Instance Method Summary collapse

Methods inherited from Reel::Server

#handle_connection, #run, #shutdown

Constructor Details

#initialize(host, port, options = {}, &callback) ⇒ Reel::Server::HTTP

Create a new Reel HTTP server

Parameters:

  • host (String)

    address to bind to

  • port (Fixnum)

    to bind to

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • backlog (Fixnum)

    of requests to accept


12
13
14
15
16
# File 'lib/reel/server/http.rb', line 12

def initialize(host, port, options={}, &callback)
  server = Celluloid::IO::TCPServer.new(host, port)
  options.merge!(host: host, port: port)
  super(server, options, &callback)
end