winerror 10022:提供的参数无效-windows 10 python

cbjzeqam  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(200)

当我运行下面的代码时,我得到的错误中没有10022 sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) ,出什么问题了?

@staticmethod
    def _open(suffix, dscp):
        error, sock = ovs.socket_util.inet_open_active(socket.SOCK_STREAM,
                                                       suffix, 0, dscp)
        if not error:
            try:
                sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
            except socket.error as e:
                print("error: {}".format(e))
                sock.close()
                return ovs.socket_util.get_exception_errno(e), None
        return error, sock

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题