From: Bryan C. Mills Date: Fri, 3 Dec 2021 22:09:06 +0000 (-0500) Subject: net: clarify that conn.LocalAddr and conn.RemoteAddr might not be known X-Git-Tag: go1.18beta1~77 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8ea0ffb84a5807438061d34256448df9948a3809;p=gostls13.git net: clarify that conn.LocalAddr and conn.RemoteAddr might not be known For #34611 Change-Id: I9a1357f53124c98ad017b58774696d0377dbea27 Reviewed-on: https://go-review.googlesource.com/c/go/+/369160 Trust: Bryan Mills Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor --- diff --git a/src/net/net.go b/src/net/net.go index ab6aeaac2f..77e54a9125 100644 --- a/src/net/net.go +++ b/src/net/net.go @@ -125,10 +125,10 @@ type Conn interface { // Any blocked Read or Write operations will be unblocked and return errors. Close() error - // LocalAddr returns the local network address. + // LocalAddr returns the local network address, if known. LocalAddr() Addr - // RemoteAddr returns the remote network address. + // RemoteAddr returns the remote network address, if known. RemoteAddr() Addr // SetDeadline sets the read and write deadlines associated @@ -328,7 +328,7 @@ type PacketConn interface { // Any blocked ReadFrom or WriteTo operations will be unblocked and return errors. Close() error - // LocalAddr returns the local network address. + // LocalAddr returns the local network address, if known. LocalAddr() Addr // SetDeadline sets the read and write deadlines associated