mirror of
https://github.com/golang/go
synced 2024-11-14 05:40:29 -07:00
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>
This commit is contained in:
parent
427d1a23ef
commit
813d9ea524
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user