Streamable HTTP resumability + redelivery + SSE polling via server-side disconnect (#1077)

Co-authored-by: Stephen Halter <halter73@gmail.com>
This commit is contained in:
Mackinnon Buck 2026-01-14 22:54:25 -08:00 • committed by GitHub
commit b8311756b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,20 @@
namespace ModelContextProtocol.Server;
/// <summary>
/// Represents the mode of an SSE event stream.
/// </summary>
public enum SseEventStreamMode
{
/// <summary>
/// Causes the event stream returned by <see cref="ISseEventStreamReader.ReadEventsAsync(System.Threading.CancellationToken)"/> to only end when
/// the associated <see cref="ISseEventStreamWriter"/> gets disposed.
/// </summary>
Streaming = 0,
/// <summary>
/// Causes the event stream returned by <see cref="ISseEventStreamReader.ReadEventsAsync(System.Threading.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.
/// </summary>
Polling = 1,
}