aboutsummaryrefslogtreecommitdiff
path: root/src/net/dial.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2024-10-20 17:39:31 -0700
committerGopher Robot <gobot@golang.org>2024-10-21 18:16:19 +0000
commit813d9ea524e4d75ef2e4aaa358e8b45ac8b3547c (patch)
tree915b1d22a0de7605c4022ef32678176dbc24c767 /src/net/dial.go
parent427d1a23ef8183a4e0c6714e391f53d35c614c4d (diff)
downloadgo-813d9ea524e4d75ef2e4aaa358e8b45ac8b3547c.tar.xz
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 <iant@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/net/dial.go')
-rw-r--r--src/net/dial.go6
1 files changed, 6 insertions, 0 deletions
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 {