class

Earl::HTTPServer

Inherits Earl::SockServer < Earl::Supervisor < Earl::Logger < Earl::Agent < Reference < Object

A HTTP/1 server.

  • Based on SockServer, thus binds and listens on many interfaces and ports (TCP, SSL, UNIX);
  • Leverages HTTP::Server request processor and supports all existing HTTP::Handler.

Constructors

new(handlers = [] of HTTP::Handler, &block : HTTP::Server::Context -> )
new(handlers : Array(HTTP::Handler))

Instance methods

call(socket : Earl::Socket)

Processes the incoming HTTP connection.

reset

Recycles all supervised agents.

terminate

Asks all supervised agents to stop.