class Orion::Server
- Orion::Server
- HTTP::Server
- Reference
- Object
Defined in:
Constructors
-
.new(handler : HTTP::Handler | HTTP::Handler::HandlerProc)
Creates a new Orion server with the given handler.
Instance Method Summary
-
#bind(*, tls : Nil = nil, uri)
Bind using a URI
-
#bind(*, tls : OpenSSL::SSL::Context::Server, address : Socket::IPAddress)
Bind TLS with an address
-
#bind(*, tls : OpenSSL::SSL::Context::Server, host = ::Socket::IPAddress::LOOPBACK, port = nil, reuse_port = false)
Bind TLS with a host and port
-
#bind(*, tls : Nil = nil, host = ::Socket::IPAddress::LOOPBACK, port = nil, reuse_port = false)
Bind TCP to a host and port
-
#bind(*, tls : Nil = nil, address : Socket::IPAddress, reuse_port = false)
Bind TCP to a Socket::IPAddress
-
#bind(*, tls = nil, address : Socket::UNIXAddress)
Bind to a Socket::UnixAddress
- #bind(*, tls = nil, path)
-
#bind(*, config : Orion::Config)
Bind using a config
-
#listen(*args, workers, **opts)
Listen clients using multiple workers A good suggestion is to use System.cpu_count
- #processor : HTTP::Server::RequestProcessor
Constructor Detail
def self.new(handler : HTTP::Handler | HTTP::Handler::HandlerProc)
#
Creates a new Orion server with the given handler.
Instance Method Detail
def bind(*, tls : OpenSSL::SSL::Context::Server, address : Socket::IPAddress)
#
Bind TLS with an address
def bind(*, tls : OpenSSL::SSL::Context::Server, host = ::Socket::IPAddress::LOOPBACK, port = nil, reuse_port = false)
#
Bind TLS with a host and port
def bind(*, tls : Nil = nil, host = ::Socket::IPAddress::LOOPBACK, port = nil, reuse_port = false)
#
Bind TCP to a host and port
Bind TCP to a Socket::IPAddress
def listen(*args, workers, **opts)
#
Listen clients using multiple workers A good suggestion is to use System.cpu_count