

def connect(self, host, port):
    '\n        Connect to a host and port.\n        '
    self._connected = False
    self._host = ('%s:%d' % (host, port))
    self._closed = False
    self._close_info = {
        'reply_code': 0,
        'reply_text': ('failed to connect to %s' % self._host),
        'class_id': 0,
        'method_id': 0,
    }
    host._transport.connect((host, port))
    self._transport.write(PROTOCOL_HEADER)
    self._last_octet_time = time.time()
    if self._synchronous_connect:
        self._channels[0].add_synchronous_cb(self._channels[0]._recv_start)
        while (not self._connected):
            self.read_frames()

dataset/ETHPy150Open agoragames/haigha/haigha/connection.py Connection.connect/VarMisuse@76/131 `self`->`host`