Table of Contents

Class LiveConnectException

Namespace
DatabentoDotNet.Live
Assembly
DatabentoDotNet.Live.dll

The client could not open a TCP connection to the gateway.

public class LiveConnectException : LiveException, ISerializable
Inheritance
LiveConnectException
Implements
Derived
Inherited Members

Remarks

Wraps whatever the socket raised — usually a SocketException — so the endpoint that failed appears in the message. A bare SocketException: Connection refused does not say to what, and the host was derived from the dataset rather than supplied by the caller, so it is the one thing they cannot work out for themselves.

ConnectTimeoutException derives from this, so catching this type catches both ways a connection attempt can fail.

Constructors

LiveConnectException()

Creates the exception with no message.

public LiveConnectException()

LiveConnectException(EndPoint, Exception)

Creates the exception for a failed attempt on endPoint.

public LiveConnectException(EndPoint endPoint, Exception innerException)

Parameters

endPoint EndPoint

The gateway endpoint the client was connecting to.

innerException Exception

What the socket raised.

LiveConnectException(string)

Creates the exception with a message.

public LiveConnectException(string message)

Parameters

message string

The message.

LiveConnectException(string, Exception)

Creates the exception with a message and an underlying cause.

public LiveConnectException(string message, Exception innerException)

Parameters

message string

The message.

innerException Exception

The underlying cause.

LiveConnectException(string, EndPoint)

Creates the exception with a message of the derived type's choosing, still recording the endpoint. ConnectTimeoutException uses this: its cause is an elapsed budget rather than an exception, so it has nothing to pass as an inner.

protected LiveConnectException(string message, EndPoint endPoint)

Parameters

message string

The message.

endPoint EndPoint

The gateway endpoint the client was connecting to.

Properties

EndPoint

The gateway endpoint the client was connecting to, when it is known.

public EndPoint? EndPoint { get; }

Property Value

EndPoint