Module elli

Elli acceptor manager.

Behaviours: gen_server.

Description

Elli acceptor manager

This gen_server owns the listen socket and manages the processes accepting on that socket. When a process waiting for accept gets a request, it notifies this gen_server so we can start up another acceptor.

Data Types

body()

body() = binary() | iolist()

header()

header() = {Key::binary(), Value::binary() | string()}

headers()

headers() = [header()]

http_method()

http_method() = 'OPTIONS' | 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | binary()

req()

req() = #req{method = elli:http_method(), scheme = undefined | binary(), host = undefined | binary(), port = undefined | 1..65535, path = [binary()], args = [{binary(), any()}], raw_path = binary(), version = elli_http:version(), headers = elli:headers(), body = elli:body(), pid = pid(), socket = undefined | elli_tcp:socket(), callback = elli_handler:callback()}

response_code()

response_code() = 100..999

state()

abstract datatype: state()

Function Index

get_acceptors/1
get_open_reqs/1Equivalent to get_open_reqs(S, 5000).
get_open_reqs/2
set_callback/3
start_link/0Create an Elli server process as part of a supervision tree, using the default configuration.
start_link/1
stop/1Stop Server.

Function Details

get_acceptors/1

get_acceptors(S::atom()) -> {reply, {ok, [ets:tid()]}, state()}

get_open_reqs/1

get_open_reqs(S::atom()) -> {reply, {ok, non_neg_integer()}, state()}

Equivalent to get_open_reqs(S, 5000).

get_open_reqs/2

get_open_reqs(S::atom(), Timeout::non_neg_integer()) -> Reply

set_callback/3

set_callback(S, Callback, CallbackArgs) -> Reply

start_link/0

start_link() -> Result

Equivalent to start_link([{callback, elli_example_callback}, {callback_args, []}]).

Create an Elli server process as part of a supervision tree, using the default configuration.

start_link/1

start_link(Opts) -> Result

stop/1

stop(Server::atom()) -> {stop, normal, ok, state()}

Stop Server.


Generated by EDoc