Method CancelRequestAsync
CancelRequestAsync(long, string, CancellationToken)
Sends a cancellation notification to the server for an in-progress request. The server SHOULD stop processing the request, but this is not guaranteed.
public Task CancelRequestAsync(long requestId, string reason = null, CancellationToken cancellationToken = default)
Parameters
requestIdlongThe ID of the request to cancel.
reasonstringAn optional reason for the cancellation.
cancellationTokenCancellationTokenA token to cancel this operation.
Returns
Remarks
Note: The initialize request MUST NOT be cancelled. After sending a cancellation, the sender SHOULD ignore any response that arrives for the cancelled request.