The Connection class is a wrapper around asyncio.open_connection.
Subclasses will implement different transport modes as atomic operations,
which this class eases doing since the exposed interface simply puts and
gets complete data payloads to and from queues.
The only error that will raise from send and receive methods is
ConnectionError, which will raise when attempting to send if
the client is disconnected (includes remote disconnections).
The
Connection
class is a wrapper aroundasyncio.open_connection
.Subclasses will implement different transport modes as atomic operations, which this class eases doing since the exposed interface simply puts and gets complete data payloads to and from queues.
The only error that will raise from send and receive methods is
ConnectionError
, which will raise when attempting to send if the client is disconnected (includes remote disconnections).