From: Ian Lance Taylor Date: Mon, 21 Oct 2024 00:39:31 +0000 (-0700) Subject: net: document ctx argument to ListenConfig.Listen/ListenPacket X-Git-Tag: go1.24rc1~657 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=813d9ea524e4d75ef2e4aaa358e8b45ac8b3547c;p=gostls13.git net: document ctx argument to ListenConfig.Listen/ListenPacket Change-Id: I351b88276307c8d21e43b5b992b30b64996d129c Reviewed-on: https://go-review.googlesource.com/c/go/+/620777 Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Reviewed-by: Damien Neil Auto-Submit: Ian Lance Taylor Commit-Queue: Ian Lance Taylor --- diff --git a/src/net/dial.go b/src/net/dial.go index 3098d35b42..db0404c3f8 100644 --- a/src/net/dial.go +++ b/src/net/dial.go @@ -798,6 +798,9 @@ func (lc *ListenConfig) SetMultipathTCP(use bool) { // // See func Listen for a description of the network and address // parameters. +// +// The ctx argument is used while resolving the address on which to listen; +// it does not affect the returned Listener. func (lc *ListenConfig) Listen(ctx context.Context, network, address string) (Listener, error) { addrs, err := DefaultResolver.resolveAddrList(ctx, "listen", network, address, nil) if err != nil { @@ -832,6 +835,9 @@ func (lc *ListenConfig) Listen(ctx context.Context, network, address string) (Li // // See func ListenPacket for a description of the network and address // parameters. +// +// The ctx argument is used while resolving the address on which to listen; +// it does not affect the returned Listener. func (lc *ListenConfig) ListenPacket(ctx context.Context, network, address string) (PacketConn, error) { addrs, err := DefaultResolver.resolveAddrList(ctx, "listen", network, address, nil) if err != nil {