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.
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.