1
0
mirror of https://github.com/golang/go synced 2024-11-24 01:10:12 -07:00

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 <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Bryan C. Mills 2021-12-03 17:09:06 -05:00 committed by Bryan Mills
parent 6180c4f5eb
commit 8ea0ffb84a

View File

@ -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