Transport boundary for Ircxd.Client.
Ircxd.Client.Transport.Socket is the default adapter and preserves the existing TCP/TLS
behavior. A configured adapter owns connection establishment and serialized writes, delivers
framed IRC records to the client with deliver/4, and is told when the client accepts a record.
Returning a resumed connection restores bounded protocol state without sending IRC registration
commands again. Transport metadata is emitted unchanged in the client's :resumed event. A
custom adapter's connect/3 configuration and retained checkpoints exclude credentials and raw
TLS options. send_data/2 necessarily receives complete IRC wire records, including registration
or authentication commands, so adapters must treat outbound data as sensitive.
Summary
Types
Public, credential-free connection settings passed to an adapter.
Adapter-owned identity for one active transport connection.
Whether IRC registration is required for the connected transport.
Adapter-owned receipt reported after an inbound record is accepted.
Callbacks
Reports an accepted receipt and its complete post-record protocol checkpoint.
Enables delivery of the next inbound record.
Returns whether accepted records require resumable parser checkpoints.
Releases one transport handle. Implementations must tolerate repeated calls.
Connects one client using the adapter's initialization argument.
Translates an adapter-owned process message into a transport event.
Writes one serialized IRC record through the active transport.
Writes one serialized record once for an adapter-owned set of idempotency keys.
Functions
Reports closure of one transport handle to its client.
Delivers one framed IRC record to a client using the active transport handle.
Types
@type config() :: %{ host: String.t(), port: :inet.port_number(), tls?: boolean(), sni: String.t() }
Public, credential-free connection settings passed to an adapter.
@type handle() :: term()
Adapter-owned identity for one active transport connection.
@type mode() :: :fresh | {:resumed, Ircxd.Client.Resume.t(), map()}
Whether IRC registration is required for the connected transport.
@type receipt() :: term()
Adapter-owned receipt reported after an inbound record is accepted.
Callbacks
@callback accepted( handle(), receipt(), Ircxd.Client.Resume.t() | nil | {:unavailable, Ircxd.Client.Resume.unavailable_reason()} ) :: :ok | {:error, term()}
Reports an accepted receipt and its complete post-record protocol checkpoint.
Enables delivery of the next inbound record.
Returns whether accepted records require resumable parser checkpoints.
Releases one transport handle. Implementations must tolerate repeated calls.
@callback connect(client :: pid(), config(), init_arg :: term()) :: {:ok, handle(), mode()} | {:error, term()}
Connects one client using the adapter's initialization argument.
@callback handle_info(message :: term(), handle()) :: :unknown | {:data, receipt(), binary()} | {:closed, term()}
Translates an adapter-owned process message into a transport event.
Writes one serialized IRC record through the active transport.
Writes one serialized record once for an adapter-owned set of idempotency keys.
This callback is optional. Ircxd supplies a deduplicated, non-empty list of non-empty binary keys.
The adapter defines bounded key retention and must decide all-key repeat and partial-overlap
semantics. When the callback is absent, Ircxd falls back to send_data/2 without duplicate
suppression.
Functions
Reports closure of one transport handle to its client.
Delivers one framed IRC record to a client using the active transport handle.