Per-client connection process.
Each accepted TCP socket is owned by a FauxRedis.Connection process,
which is responsible for:
- reading bytes from the socket and buffering them
- decoding RESP frames (including pipelined commands)
- sending commands to
FauxRedis.Server - applying response specifications (including delays, timeouts, closes, partial/protocol-error replies)
- handling server-side pub/sub messages
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type t() :: %FauxRedis.Connection{ buffer: binary(), closed?: boolean(), conn_id: non_neg_integer() | nil, db: non_neg_integer(), ets_kv: term(), mode: atom(), server: pid() | nil, socket: port() | nil }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(pid(), non_neg_integer()) :: GenServer.on_start()
@spec start_link(pid(), port(), non_neg_integer()) :: GenServer.on_start()