Skip to content

Commit 442e614

Browse files
committed
net: document sockaddr interface
This is in preparation for runtime-integrated network pollster for BSD variants. Update #5199 R=golang-dev, fvbommel, dave CC=golang-dev https://golang.org/cl/11984043
1 parent f6dd45b commit 442e614

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/pkg/net/sock_posix.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,24 @@ import (
1515
// address that can be converted into a syscall.Sockaddr.
1616
type sockaddr interface {
1717
Addr
18+
19+
// family returns the platform-dependent address family
20+
// identifier.
1821
family() int
22+
23+
// isWildcard reports whether the address is a wildcard
24+
// address.
1925
isWildcard() bool
26+
27+
// sockaddr returns the address converted into a syscall
28+
// sockaddr type that implements syscall.Sockaddr
29+
// interface. It returns a nil interface when the address is
30+
// nil.
2031
sockaddr(family int) (syscall.Sockaddr, error)
32+
33+
// toAddr returns the address represented in sockaddr
34+
// interface. It returns a nil interface when the address is
35+
// nil.
2136
toAddr() sockaddr
2237
}
2338

0 commit comments

Comments
 (0)