Show / Hide Table of Contents

Enum ConnectionWaitOutcome

How a wait for the connection ended.

Namespace: Xrpl.Client
Assembly: Xrpl.dll
Syntax
public enum ConnectionWaitOutcome
Remarks

The same events NotConnectedException and its subtypes report, for callers who would rather read an answer than catch one: "it did not come back in time" is something a caller has to act on, not an exceptional event.

A bool would fold "timed out", "gave up" and "nothing is running" into one false, which is the confusion this whole family of types exists to remove. Two things stay exceptions: cancellation through the caller's own token, which is the .NET convention, and an invalid timeout, which is a mistake by the caller rather than an outcome of the connection.

Fields

Name Description
ClosedPermanently

The node closed the connection with a code this client does not reconnect after, and no reconnect was started. The counterpart of ClosedPermanently.

ConnectHandlerFailed

The client gave up because its OnConnected handler kept failing.

Connected

The connection is up.

NotConnecting

There is no connection and no attempt to make one: Connect() is due.

ReconnectExhausted

The reconnect loop spent its budget and stopped.

TimedOut

It did not come up within the time allowed.

UserDisconnected

The consumer disconnected the client. The counterpart of UserDisconnected, and named after it: the two enums are two views of one event, and a pair that agrees on the event while disagreeing on its name is a pair nothing can check.

Extension Methods

EmumExtensions.DecodeFlags<ConnectionWaitOutcome>(ConnectionWaitOutcome)
EmumExtensions.FlagsValues<ConnectionWaitOutcome>(ConnectionWaitOutcome)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX