h1_listener (h1 v0.2.0)

View Source

HTTP/1.1 listener: owns the listen socket and supervises the acceptor pool. Runs under h1_sup so the listener outlives the process that called h1:start_server/2.

Summary

Types

args/0

-type args() ::
          #{transport := transport(),
            listen_socket := term(),
            acceptor_count := pos_integer(),
            ref := reference(),
            handler := term(),
            conn_opts := map(),
            server_opts := map()}.

transport/0

-type transport() :: gen_tcp | ssl.

Functions

init(Parent, Args)

start_link(Args)

-spec start_link(args()) -> {ok, pid()}.

stop(Pid, Ref)

-spec stop(pid(), reference()) -> ok.