You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e9f093b
Browse filesBrowse the repository at this point in the historyBrowse files
Streamable HTTP supports session resumption. Save the session ID, server capabilities, and server info from the original session, then use <xref:ModelContextProtocol.Client.McpClient.ResumeSessionAsync*> to reconnect:
Copy file name to clipboardExpand all lines: src/ModelContextProtocol.Core/McpSession.Methods.cs
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ public ValueTask<TResult> SendRequestAsync<TParameters, TResult>(
38
38
serializerOptions.GetTypeInfo<TParameters>(),
39
39
serializerOptions.GetTypeInfo<TResult>(),
40
40
requestId,
41
-
cancellationToken);
41
+
cancellationToken:cancellationToken);
42
42
}
43
43
44
44
/// <summary>
@@ -51,6 +51,7 @@ public ValueTask<TResult> SendRequestAsync<TParameters, TResult>(
51
51
/// <param name="parametersTypeInfo">The type information for request parameter serialization.</param>
52
52
/// <param name="resultTypeInfo">The type information for result deserialization.</param>
53
53
/// <param name="requestId">The request ID for the request.</param>
54
+
/// <param name="context">Non-serialized runtime context for the request.</param>
54
55
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
55
56
/// <returns>A task that represents the asynchronous operation. The task result contains the deserialized result.</returns>
0 commit comments