def __init__(self, console, host, port, password, keepalive=False):
asyncore.dispatcher_with_send.__init__(self)
self.console = console
self._host = host
self._port = port
self._password = password
self.keepalive = keepalive
self._buffer_in = ''
self.authed = False
self.server_version = None
self.last_pong_time = self.last_ping_time = time.time()
self._handlers = set()
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.connect( (self._host, self._port) )
评论列表
文章目录