]> Cypherpunks repositories - gostls13.git/commitdiff
net: document ctx argument to ListenConfig.Listen/ListenPacket
authorIan Lance Taylor <iant@golang.org>
Mon, 21 Oct 2024 00:39:31 +0000 (17:39 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 21 Oct 2024 18:16:19 +0000 (18:16 +0000)
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>

src/net/dial.go

index 3098d35b42c000f24ff43abc554bb2c6f7dda5ae..db0404c3f808158ce118eedb4205c437ec2adc8e 100644 (file)
@@ -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 {