Add pendings in _BfxWebsocketBucket. Add new logic for selecting the bucket with less connections. Add ._unsubscribe coroutine.

This commit is contained in:
Davide Casale
2022-11-22 17:21:21 +01:00
parent 2f561a4fba
commit 721e82b86d
3 changed files with 38 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
__all__ = [
"ConnectionNotOpen",
"TooManySubscriptions",
"WebsocketAuthenticationRequired",
"InvalidAuthenticationCredentials",
"EventNotSupported",
@@ -20,6 +21,13 @@ class ConnectionNotOpen(BfxWebsocketException):
pass
class TooManySubscriptions(BfxWebsocketException):
"""
This error indicates an attempt to subscribe to a public channel after reaching the limit of simultaneous connections.
"""
pass
class WebsocketAuthenticationRequired(BfxWebsocketException):
"""
This error indicates an attempt to access a protected resource without logging in first.