class Orion::Server

Defined in:

orion/server.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(handler : HTTP::Handler | HTTP::Handler::HandlerProc) #

Creates a new Orion server with the given handler.


[View source]

Instance Method Detail

def bind(*, tls : Nil = nil, uri) #

Bind using a URI


[View source]
def bind(*, tls : OpenSSL::SSL::Context::Server, address : Socket::IPAddress) #

Bind TLS with an address


[View source]
def bind(*, tls : OpenSSL::SSL::Context::Server, host = ::Socket::IPAddress::LOOPBACK, port = nil, reuse_port = false) #

Bind TLS with a host and port


[View source]
def bind(*, tls : Nil = nil, host = ::Socket::IPAddress::LOOPBACK, port = nil, reuse_port = false) #

Bind TCP to a host and port


[View source]
def bind(*, tls : Nil = nil, address : Socket::IPAddress, reuse_port = false) #

Bind TCP to a Socket::IPAddress


[View source]
def bind(*, tls = nil, address : Socket::UNIXAddress) #

Bind to a Socket::UnixAddress


[View source]
def bind(*, tls = nil, path) #

[View source]
def bind(*, config : Orion::Config) #

Bind using a config


[View source]
def listen(*args, workers, **opts) #

Listen clients using multiple workers A good suggestion is to use System.cpu_count


[View source]
def processor : HTTP::Server::RequestProcessor #

[View source]