Show / Hide Table of Contents

Class Connection.ConnectionOptions

Inheritance
object
Connection.ConnectionOptions
XrplClient.ClientOptions
Namespace: Xrpl.Client
Assembly: Xrpl.dll
Syntax
public class Connection.ConnectionOptions

Properties

| Edit this page View Source

AdminPassword

Admin password for rippled's admin_password port-stanza setting. See AdminUser.

Declaration
public string AdminPassword { get; set; }
Property Value
Type Description
string
| Edit this page View Source

AdminUser

Admin user for rippled's admin_user port-stanza setting.

Declaration
public string AdminUser { get; set; }
Property Value
Type Description
string
Remarks

Unlike authorization, these credentials travel inside the JSON body of every request — that is the only mechanism rippled accepts for admin commands over ws/wss. Both AdminUser and AdminPassword must be set for them to be sent.

| Edit this page View Source

ConnectionAcquisitionTimeout

Maximum time to wait for connection when using WaitForConnection request policy. This is the total time allowed for multiple connection attempts, including retry delays. Must be >= ConnectionAttemptTimeout to allow at least one full connection attempt. Default: 30 seconds.

Declaration
public TimeSpan ConnectionAcquisitionTimeout { get; set; }
Property Value
Type Description
TimeSpan
| Edit this page View Source

ConnectionAttemptTimeout

Timeout for a single WebSocket connection attempt. If the connection cannot be established within this time, it will fail and trigger reconnection logic. Should be shorter than ConnectionAcquisitionTimeout to allow multiple retry attempts. Default: 30 seconds.

Declaration
public TimeSpan ConnectionAttemptTimeout { get; set; }
Property Value
Type Description
TimeSpan
| Edit this page View Source

MaxReconnectAttempts

Gets or sets the maximum number of times the system will attempt to reconnect after a disconnection.

Declaration
public int MaxReconnectAttempts { get; set; }
Property Value
Type Description
int
Remarks

Set this property to limit how many reconnection attempts are made before giving up. A value of 0 disables automatic reconnection.

| Edit this page View Source

ReconnectBaseDelay

Gets or sets the base delay interval used between automatic reconnection attempts.

Declaration
public TimeSpan ReconnectBaseDelay { get; set; }
Property Value
Type Description
TimeSpan
| Edit this page View Source

ReconnectMaxDelay

Gets or sets the maximum delay between automatic reconnection attempts after a disconnection.

Declaration
public TimeSpan ReconnectMaxDelay { get; set; }
Property Value
Type Description
TimeSpan
Remarks

This value determines the upper bound for the time interval between reconnection attempts. If the connection is lost, the delay between retries will not exceed this value, even if a backoff strategy is used.

| Edit this page View Source

RequestPolicy

Gets or sets the policy that determines how failed requests are handled.

Declaration
public RequestFailurePolicy RequestPolicy { get; set; }
Property Value
Type Description
RequestFailurePolicy
Remarks

Use this property to specify the strategy for handling request failures,
such as whether to retry, delay, or fail immediately.
The selected policy affects how the system responds to transient errors or network issues.

| Edit this page View Source

RequestTimeout

Timeout for individual API requests after connection is established. This controls how long to wait for a response to a single request (e.g., account_info, submit). Default: 40 seconds.

Declaration
public TimeSpan RequestTimeout { get; set; }
Property Value
Type Description
TimeSpan
| Edit this page View Source

StopAfterMaxAttempts

Gets or sets a value indicating whether the operation should stop after reaching the maximum number of attempts.

Declaration
public bool StopAfterMaxAttempts { get; set; }
Property Value
Type Description
bool
Remarks

Set this property to true to prevent further retries once the maximum attempt count is reached. If set to false, the operation may continue beyond the maximum attempts, depending on the retry policy.

| Edit this page View Source

UseCheckHealth

Gets or sets a value indicating whether to enable periodic background health monitoring of the WebSocket connection.
When enabled, the connection state is checked every 20 seconds. If the WebSocket is detected as Closed or Aborted, or if no data has been received for more than 60 seconds, an automatic reconnection is triggered.
This check does not send any network requests — it only inspects the local connection state.
Automatically enabled when UseCustomPing is set to true.
Default: false.

Declaration
public bool UseCheckHealth { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

UseCustomPing

Gets or sets a value indicating whether to use a custom ping
implementation instead of the default behavior.

Declaration
public bool UseCustomPing { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

authorization

Raw user:password pair sent as an HTTP Basic Authorization header on the WebSocket upgrade handshake. Matches the authorization option of xrpl.js.

Declaration
public string authorization { get; set; }
Property Value
Type Description
string
Remarks

rippled itself does not check Basic auth on the ws/wss handshake — its user/password port-stanza settings only apply to plain HTTP JSON-RPC. This option is for reaching a node behind a reverse proxy or a provider that requires Basic auth. For admin commands over ws/wss use AdminUser/AdminPassword instead. Ignored under WebAssembly — the browser WebSocket API cannot set request headers.

| Edit this page View Source

headers

Extra HTTP headers to put on the WebSocket upgrade handshake.

Declaration
public Dictionary<string, string> headers { get; set; }
Property Value
Type Description
Dictionary<string, string>
Remarks

Ignored under WebAssembly — the browser WebSocket API cannot set request headers.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX