]> Cypherpunks.ru repositories - gostls13.git/commit
net: mptcp: implement listenMPTCP
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Fri, 24 Feb 2023 16:51:58 +0000 (17:51 +0100)
committerGopher Robot <gobot@golang.org>
Wed, 29 Mar 2023 22:12:20 +0000 (22:12 +0000)
commit7dc10dbf45db5a361e0ace376dedb5578f6a5642
treefd679f97b79942db58f12ba621e8ead785d7697b
parent0bd94e4387da2ce056c0f4e9bfa66976841710a5
net: mptcp: implement listenMPTCP

Similar to dialMPTCP, this listenMPTCP function is called when the user
has requested MPTCP via SetMultipathTCP in the ListenConfig.

This function falls back to listenTCP on operating systems that do not
support MPTCP or if MPTCP is not supported.

On ListenConfig side, MultipathTCP function can be used to know if the
package will try to use MPTCP or not when Listen is called.

Note that this new listenMPTCP function returns a TCPListener object and
not a new MPTCP dedicated one. The reasons are similar as the ones
explained in the parent commit introducing dialTCP: if MPTCP is used by
default later, Listen will return a different object that could break
existing applications expecting TCPListener.

This work has been co-developped by Gregory Detal
<gregory.detal@tessares.net>.

Updates #56539

Change-Id: I010f1d87f921bbac9e157cef2212c51917852353
Reviewed-on: https://go-review.googlesource.com/c/go/+/471137
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
api/next/56539.txt
src/net/dial.go
src/net/mptcpsock_linux.go
src/net/mptcpsock_stub.go
src/net/tcpsock_posix.go