titanfe.connection module¶
Encapsulate asyncio connections by wrapping them into a Connection
-
class
titanfe.connection.
Connection
(reader, writer, log=None, encoding='UJO')[source]¶ Bases:
object
Wrap an asyncio StreamReader/Writer combination into a connection object.
- Parameters:
reader (asyncio.StreamReader) – the stream reader
writer (asyncio.StreamWriter) – the stream writer
log (logging.logger) – a parent logger
encoding – “PICKLE” or “UJO”
-
async classmethod
open
(address: titanfe.connection.NetworkAddress, log: Optional[logging.Logger] = None) → titanfe.connection.Connection[source]¶ open an asyncio connection to the given address (host, port)