Write "event: message" to SSE response (#192)
* Write "event: message" to SSE response * Rename McpJsonRpcEndpoint to McpEndpoint * Remove unused McpServerConfig.Arguments property
This commit is contained in:
parent
f1af251c32
commit
9b4db350c3
1 changed files with 57 additions and 13 deletions
|
|
@ -76,7 +76,8 @@ public sealed class SseResponseStreamTransport(Stream sseResponseStream, string
|
|||
throw new InvalidOperationException($"Transport is not connected. Make sure to call {nameof(RunAsync)} first.");
|
||||
}
|
||||
|
||||
await _outgoingSseChannel.Writer.WriteAsync(new SseItem<IJsonRpcMessage?>(message), cancellationToken);
|
||||
// Emit redundant "event: message" lines for better compatibility with other SDKs.
|
||||
await _outgoingSseChannel.Writer.WriteAsync(new SseItem<IJsonRpcMessage?>(message, SseParser.EventTypeDefault), cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue