

def bind(self, addr, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
    flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
    flags |= fcntl.FD_CLOEXEC
    fcntl.fcntl(sock.fileno(), fcntl.F_SETFD, flags)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.setblocking(0)
    sock.bind((addr, int(port)))
    sock.listen(128)
    self.socket = sock
    return self

dataset/ETHPy150Open HenryHu/pybbs/xmpp/aio.py TCPServer.bind/VarMisuse@37/40 `sock`->`self`