Parses raw HTTP/1.0 and HTTP/1.1 requests from a :gen_tcp socket
using Erlang's built-in :erlang.decode_packet/3.
Summary
Functions
Reads and parses an HTTP request from the given :gen_tcp socket.
Functions
@spec parse_request(port(), binary(), timeout()) :: {:ok, Passby.Conn.t()} | {:error, :closed | :timeout | atom()}
Reads and parses an HTTP request from the given :gen_tcp socket.
Returns {:ok, %Passby.Conn{}} or {:error, reason}.