Standard library / net

net.ListenConfig.MultipathTCP()

Report the configured MPTCP preference, not whether a connection negotiated MPTCP. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func (lc *ListenConfig) MultipathTCP() bool

Return Value

bool

Operation result; check errors and validity indicators when returned.

Working Example

Example Snippetgo
package main
import (  "fmt"  "net")
func main() { var cfg net.ListenConfig; cfg.SetMultipathTCP(true); fmt.Println(cfg.MultipathTCP()) }
func must[T any](v T, e error) T {  if e != nil {    panic(e)  }  return v}func check(e error) {  if e != nil {    panic(e)  }}
Go Reference