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
endPointEndPointThe gateway endpoint the client was connecting to.
innerExceptionExceptionWhat the socket raised.
LiveConnectException(string)
Creates the exception with a message.
public LiveConnectException(string message)
Parameters
messagestringThe message.
LiveConnectException(string, Exception)
Creates the exception with a message and an underlying cause.
public LiveConnectException(string message, Exception innerException)
Parameters
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
Properties
EndPoint
The gateway endpoint the client was connecting to, when it is known.
public EndPoint? EndPoint { get; }