Standard library / net
net.Dialer.MultipathTCP()
Report the configured MPTCP preference, not whether a connection negotiated MPTCP. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (d *Dialer) MultipathTCP() boolReturn 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.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) }}