Interface IInlineSseSubscriber

Namespace
Kuestenlogik.Bowire
Assembly
Kuestenlogik.Bowire.dll

Optional capability surface for protocol plugins that can subscribe to a remote Server-Sent Events stream and yield each event as it arrives.

The SSE plugin implements this so that other plugins (MCP for server-side notifications, GraphQL for the graphql-sse subscription transport) can reuse the SSE event-stream parser without taking a hard dependency on Kuestenlogik.Bowire.Protocol.Sse at compile time. If the SSE plugin isn't loaded, FindSseSubscriber() returns null and the consuming plugin should fall back to a clear "install the SSE plugin" error.

public interface IInlineSseSubscriber

Methods

SubscribeAsync(string, Dictionary<string, string>?, CancellationToken)

Open an SSE connection to url with the given request headers and yield each parsed event as a JSON envelope of the form { id, event, data, retry }. The stream stays open until the server closes it or ct is cancelled.

IAsyncEnumerable<string> SubscribeAsync(string url, Dictionary<string, string>? headers, CancellationToken ct = default)

Parameters

url string
headers Dictionary<string, string>
ct CancellationToken

Returns

IAsyncEnumerable<string>