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
Assembly: Xrpl.dll
Syntax
public class RequestManager
Constructors
|
Edit this page
View Source
RequestManager()
Declaration
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 Parameters
|
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
|
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
|
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
|
Edit this page
View Source
Resolve(Guid, BaseResponse)
Declaration
public void Resolve(Guid id, BaseResponse response)
Parameters