Add and implement wss_timeout in BfxWebsocketClient (and Client).

This commit is contained in:
Davide Casale
2023-04-16 20:04:46 +02:00
parent 7a9a57e878
commit 734375ec9f
4 changed files with 28 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ __all__ = [
"ConnectionNotOpen",
"TooManySubscriptions",
"ZeroConnectionsError",
"ReconnectionTimeoutError",
"WebsocketAuthenticationRequired",
"InvalidAuthenticationCredentials",
"EventNotSupported",
@@ -33,6 +34,11 @@ class ZeroConnectionsError(BfxWebsocketException):
This error indicates an attempt to subscribe to a public channel while the number of connections is 0.
"""
class ReconnectionTimeoutError(BfxWebsocketException):
"""
This error indicates that the connection has been offline for too long without being able to reconnect.
"""
class WebsocketAuthenticationRequired(BfxWebsocketException):
"""
This error indicates an attempt to access a protected resource without logging in first.