Streamable HTTP resumability + redelivery + SSE polling via server-side disconnect (#1077)
Co-authored-by: Stephen Halter <halter73@gmail.com>
This commit is contained in:
parent
4cb2fd4655
commit
b8311756b4
1 changed files with 2675 additions and 246 deletions
20
src/ModelContextProtocol.Core/Server/SseEventStreamMode.cs
Normal file
20
src/ModelContextProtocol.Core/Server/SseEventStreamMode.cs
Normal 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,
|
||||
}
|
||||
Loading…
Reference in a new issue