Enum SseEventStreamMode
- Namespace
- ModelContextProtocol.Server
- Assembly
- ModelContextProtocol.Core.dll
Represents the mode of an SSE event stream.
[Obsolete("Stateful Streamable HTTP mode is a back-compat-only escape hatch for legacy clients. Set HttpServerTransportOptions.Stateless = true (the default as of the 2026-07-28 protocol revision) for new code. See SEP-2567.", DiagnosticId = "MCP9006", UrlFormat = "https://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#obsolete-apis")]
public enum SseEventStreamMode
Fields
Polling = 1Causes the event stream returned by ReadEventsAsync(CancellationToken) to end after the most recent event has been consumed. This forces clients to keep making new requests in order to receive the latest messages.
Streaming = 0Causes the event stream returned by ReadEventsAsync(CancellationToken) to only end when the associated ISseEventStreamWriter gets disposed.