Standard library / net
net.Dialer.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 (d *Dialer) SetMultipathTCP(use bool)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| use | bool | Argument of the declared type; see example and description. |
Working Example
Example Snippetgo
package main
import ( "fmt" "net")
func main() { var cfg net.Dialer; 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) }}