Default draft protocol support: sessionless + handshake-less (SEP-2575 + SEP-2567) (#1610)
This commit is contained in:
parent
3368bb7349
commit
6c323e783b
1 changed files with 5704 additions and 712 deletions
|
|
@ -22,7 +22,9 @@ internal sealed partial class StreamableHttpPostTransport(
|
|||
private readonly SseEventWriter _httpSseWriter = new(responseStream);
|
||||
|
||||
private TaskCompletionSource<bool>? _storeStreamTcs;
|
||||
#pragma warning disable MCP9006 // Stateful Streamable HTTP resumability types are obsolete but still wired up internally.
|
||||
private ISseEventStreamWriter? _storeSseWriter;
|
||||
#pragma warning restore MCP9006
|
||||
|
||||
private RequestId _pendingRequest;
|
||||
private bool _finalResponseMessageSent;
|
||||
|
|
@ -176,7 +178,9 @@ internal sealed partial class StreamableHttpPostTransport(
|
|||
|
||||
// Set the mode to 'Polling' so that the replay stream ends as soon as all available messages have been sent.
|
||||
// This prevents the client from immediately establishing another long-lived connection.
|
||||
#pragma warning disable MCP9006 // Stateful Streamable HTTP resumability types are obsolete but still wired up internally.
|
||||
await _storeSseWriter.SetModeAsync(SseEventStreamMode.Polling, cancellationToken).ConfigureAwait(false);
|
||||
#pragma warning restore MCP9006
|
||||
|
||||
// Signal completion so HandlePostAsync can return.
|
||||
_httpResponseTcs.TrySetResult(true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue