

def connect(self, addr, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
    sock.setblocking(0)
    try:
        self.address = (addr, int(port))
        sock.connect(self.address)
    except SocketError as exc:
        if (not in_progress(exc)):
            raise
    self.socket = sock
    return self

dataset/ETHPy150Open HenryHu/pybbs/xmpp/aio.py TCPClient.connect/original