Python 3.10 - 模块“socket”没有属性“IPPROTO_MPTCP”;
根据文档,Python3中已经添加了“IPPROTO_MPTCP”协议。 10,但是当我创建这样的套接字时,
socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_MPTCP)
我收到此错误
module 'socket' has no attribute 'IPPROTO_MPTCP'
我可能做错了什么?这是一个屏幕截图。
According to the documentation, the "IPPROTO_MPTCP" protocol has been added to Python3.10, but when I create a socket like this,
socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_MPTCP)
I get this error
module 'socket' has no attribute 'IPPROTO_MPTCP'
What could I be doing wrong in this? Here's a screenshot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就像 @Boris Verkhovskiy 猜测的那样,目前 Python 需要使用
IPPROTO_MPTCP
选项进行编译。您可以通过转到变更日志,然后打开票证来查看这一点,您可以检查 diff如果您使用的是 Linux,请同时检查您的内核版本 (>= 5.6) 和是否启用 MPTCP (
sysctl net.mptcp.enabled
)。查看此清单了解更多详细信息。Like @Boris Verkhovskiy guessed, for now Python needs to be compiled with the
IPPROTO_MPTCP
option. You can see that by going to the changelog, then opening the ticket, you can check the diffIf you are on linux, please also check your kernel version (>= 5.6) and whether MPTCP is enabled (
sysctl net.mptcp.enabled
). Check this checklist for more details.