Snodo.Transport.StreamableHTTP.Server (snodo v0.1.0)

Copy Markdown View Source

Small dependency-free HTTP/1.1 listener for Snodo.Transport.StreamableHTTP.

It is intentionally a binding, not a web framework. Each accepted connection carries one request and closes after one response. Header admission happens in the connection process; admitted MCP work runs through the reusable bounded Snodo.Server.Executor. A peer disconnect while work is pending cancels that execution and tears down its reply owner.

:request_timeout bounds queue wait plus execution after HTTP admission; the transport's default ceiling is 30 seconds, including with an application-owned executor. Progress does not extend the deadline. Explicit :infinity disables this ceiling. Body reads and socket writes have their own transport bounds.

Applications that already run Plug, Bandit, or Cowboy can translate their request into Snodo.Transport.StreamableHTTP.Request and use the pure adapter directly instead of starting this listener.

Summary

Functions

Returns the bound IP, actual port, and configured MCP endpoint path.

Returns a specification to start this module under a supervisor.

Returns a URL for a listener bound to a local IPv4 or IPv6 address.

Functions

address(server)

Returns the bound IP, actual port, and configured MCP endpoint path.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

url(server)

@spec url(GenServer.server()) :: String.t()

Returns a URL for a listener bound to a local IPv4 or IPv6 address.