Behaviours: gen_server.
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.body() = binary() | iolist()
header() = {Key::binary(), Value::binary() | string()}
headers() = [header()]
http_method() = 'OPTIONS' | 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | binary()
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() = 100..999
abstract datatype: 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.
Generated by EDoc