csharp-sdk/src/ModelContextProtocol.Core/Server/SseEventStreamMode.cs
Mackinnon Buck b8311756b4
Streamable HTTP resumability + redelivery + SSE polling via server-side disconnect (#1077)
Co-authored-by: Stephen Halter <halter73@gmail.com>
2026-01-14 22:54:25 -08:00

20 lines
777 B
C#

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,
}