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()

abstract datatype: body()

A binary or iolist.

header()

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

headers()

headers() = [header()]

http_method()

abstract datatype: http_method()

An uppercase atom representing a known HTTP verb or a binary for other verbs.

req()

abstract datatype: req()

A record representing an HTTP request.

response_code()

response_code() = 100..999

state()

abstract datatype: state()

Internal 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