Elli acceptor manager.
Behaviours: gen_server
.
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.
abstract datatype: body()
A binary or iolist.
header() = {Key::binary(), Value::binary() | string()}
headers() = [header()]
abstract datatype: http_method()
An uppercase atom representing a known HTTP verb or a binary for other verbs.
abstract datatype: req()
A record representing an HTTP request.
response_code() = 100..999
abstract datatype: state()
Internal state.
get_acceptors/1 | |
get_open_reqs/1 | Equivalent to get_open_reqs(S, 5000). |
get_open_reqs/2 | |
set_callback/3 | |
start_link/0 | Create an Elli server process as part of a supervision tree, using the default configuration. |
start_link/1 | |
stop/1 | Stop Server . |
get_open_reqs(S::atom()) -> {reply, {ok, non_neg_integer()}, state()}
Equivalent to get_open_reqs(S, 5000)
.
get_open_reqs(S::atom(), Timeout::non_neg_integer()) -> Reply
Reply = {reply, {ok, non_neg_integer()}, state()}
set_callback(S, Callback, CallbackArgs) -> Reply
S = atom()
Callback = elli_handler:callback_mod()
CallbackArgs = elli_handler:callback_args()
Reply = {reply, ok, state()}
start_link() -> Result
Result = {ok, Pid} | ignore | {error, Error}
Pid = pid()
Error = {already_started, Pid} | term()
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(Opts) -> Result
Opts = [{term(), term()}]
Result = {ok, Pid} | ignore | {error, Error}
Pid = pid()
Error = {already_started, Pid} | term()
stop(Server::atom()) -> {stop, normal, ok, state()}
Stop Server
.