modbot.connection.base.BaseSocketClientAsync

class modbot.connection.base.BaseSocketClientAsync[source]

Bases: object

Methods

EXTRA_VERBOSE_LOGGER(message, *args, **kws)

Extra verbose log level

INFO_LOGGER(msg, *args, **kwargs)

Log 'msg % args' with severity 'INFO'.

VERBOSE_LOGGER(message, *args, **kws)

Verbose log level

connect()

Connection to socket

connect_fail(e)

Response to connection failure

handle_message(message)

Handle message

heartbeat()

Heartbeat routine for keeping connection alive

listen_forever()

Listen for socket connection

receive_fail(e)

Response to message receive failure

receive_message()

Receive and handle socket message

send_ping()

Send ping to keep connection alive

EXTRA_VERBOSE_LOGGER(message, *args, **kws)

Extra verbose log level

INFO_LOGGER(msg, *args, **kwargs)

Log ‘msg % args’ with severity ‘INFO’.

To pass exception information, use the keyword argument exc_info with a true value, e.g.

logger.info(“Houston, we have a %s”, “interesting problem”, exc_info=1)

VERBOSE_LOGGER(message, *args, **kws)

Verbose log level

abstract connect()[source]

Connection to socket

connect_fail(e)[source]

Response to connection failure

abstract handle_message(message)[source]

Handle message

async heartbeat()[source]

Heartbeat routine for keeping connection alive

async listen_forever()[source]

Listen for socket connection

receive_fail(e)[source]

Response to message receive failure

abstract receive_message()[source]

Receive and handle socket message

abstract send_ping()[source]

Send ping to keep connection alive