Hermes.Transport.SSE (hermes_mcp v0.2.2)
A transport implementation that uses Server-Sent Events (SSE) for receiving messages and HTTP POST requests for sending messages back to the server.
Examples
iex> Hermes.Transport.SSE.start_link(server_url: "http://localhost:4000")
{:ok, #PID<0.123.0>}
iex> Hermes.Transport.SSE.send_message(pid, "Hello, world!")
Options
The options schema for the SSE transport.
name
: The name of the transport.client
: The client process to send messages to.server_url
: The URL of the server to connect to.headers
: Additional headers to send with the HTTP requests.transport_opts
: Additional options as keyword to pass to the HTTP client, you can reference the available options at https://hexdocs.pm/mint/Mint.HTTP.html#connect/4-transport-optionshttp_options
: Additional HTTP request options as keyword to pass to the HTTP client, you can check the available options on https://hexdocs.pm/finch/Finch.html#t:request_opt/0
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type params_t() :: Enumerable.t(option())