Connection operations ExMCP.HttpPlug.SSEHandler needs from its socket.
The handler used to sniff its conn at runtime (is_struct/1 plus
Map.has_key?/2 checks for :chunk and :get_req_header function fields)
so that tests could pass a fake connection. That put test-only branches in
the production write path.
Instead the handler calls a connection module resolved once at start-up
from the :conn_module key of its options, defaulting to
ExMCP.HttpPlug.SSEConnection.PlugConn. Tests (or alternative adapters)
supply their own implementation:
SSEHandler.start_link(fake_conn, session_id, %{conn_module: MyFakeConn})
Summary
Callbacks
Writes a chunk to the connection.
Reads a request header, returning a (possibly empty) list of values.
Functions
Resolves the connection module from handler options.
Types
@type conn() :: term()