Standard library / net

net.ListenConfig.SetMultipathTCP()

Set whether future connections request MPTCP. Unsupported peers or platforms may fall back to TCP; do not mutate a configuration concurrently with use. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func (lc *ListenConfig) SetMultipathTCP(use bool)

Parameters & Attributes

NameTypeDescription
useboolArgument of the declared type; see example and description.

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