Show / Hide Table of Contents

Class RequestManager

Manage all the requests made to the websocket, and their async responses that come in from the WebSocket.Responses come in over the WS connection after-the-fact, so this manager will tie that response to resolve the original request.

Inheritance
object
RequestManager
Namespace: Xrpl.Client
Assembly: Xrpl.dll
Syntax
public class RequestManager

Constructors

| Edit this page View Source

RequestManager()

Declaration
public RequestManager()

Methods

| Edit this page View Source

CreateGRequest<T, R>(R, TimeSpan, CancellationToken)

Declaration
public RequestManager.XrplGRequest CreateGRequest<T, R>(R request, TimeSpan timeout, CancellationToken cancellationToken = default)
Parameters
Type Name Description
R request
TimeSpan timeout
CancellationToken cancellationToken
Returns
Type Description
RequestManager.XrplGRequest
Type Parameters
Name Description
T
R
| Edit this page View Source

CreateRequest(Dictionary<string, object>, TimeSpan, CancellationToken)

Declaration
public RequestManager.XrplRequest CreateRequest(Dictionary<string, object> request, TimeSpan timeout, CancellationToken cancellationToken = default)
Parameters
Type Name Description
Dictionary<string, object> request
TimeSpan timeout
CancellationToken cancellationToken
Returns
Type Description
RequestManager.XrplRequest
| Edit this page View Source

DeletePromise(Guid, TaskInfo)

Declaration
public void DeletePromise(Guid id, TaskInfo taskInfo)
Parameters
Type Name Description
Guid id
TaskInfo taskInfo
| Edit this page View Source

HandleResponse(string)

Handles an incoming response message. Returns a tuple of (response, handled).
handled=true means the message was matched to a pending request (resolved or rejected).
handled=false means the id was not found among pending requests — the caller should treat the message as a stream/follow-up (e.g. path_find async updates).

Declaration
public (BaseResponse Response, bool Handled) HandleResponse(string message)
Parameters
Type Name Description
string message
Returns
Type Description
(BaseResponse Response, bool Handled)
| Edit this page View Source

RejectAll(Exception)

Rejects all pending requests with the specified exception.

Declaration
public void RejectAll(Exception error)
Parameters
Type Name Description
Exception error
| Edit this page View Source

RejectAllWithCancellation()

Rejects all pending requests with OperationCanceledException. Used for intentional disconnects to avoid logging as Critical errors.

Declaration
public void RejectAllWithCancellation()
| Edit this page View Source

Reject<T>(Guid, T)

Rejects a pending request with the specified exception. Safe to call even if the promise no longer exists (e.g., already resolved). The exception is automatically "observed" to prevent UnobservedTaskException from being raised in consuming applications like DaddyWallet.

Declaration
public void Reject<T>(Guid id, T error) where T : Exception
Parameters
Type Name Description
Guid id
T error
Type Parameters
Name Description
T
| Edit this page View Source

Resolve(Guid, BaseResponse)

Declaration
public void Resolve(Guid id, BaseResponse response)
Parameters
Type Name Description
Guid id
BaseResponse response
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX