Per-client connection process.
Each accepted TCP socket is owned by a HttpDouble.Connection process,
which is responsible for:
- reading bytes from the socket and buffering them
- decoding HTTP/1.1 requests (including simple keep-alive)
- sending requests to
HttpDouble.Server - applying response specifications (including delays, timeouts, closes, partial/raw replies)
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type t() :: %HttpDouble.Connection{ buffer: binary(), closed?: boolean(), conn_id: non_neg_integer() | nil, request_index: non_neg_integer(), server: pid() | nil, socket: port() | nil }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(pid(), port(), non_neg_integer()) :: GenServer.on_start()