aboutsummaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorMikio Hara <mikioh.mikioh@gmail.com>2013-07-29 23:25:39 +0900
committerMikio Hara <mikioh.mikioh@gmail.com>2013-07-29 23:25:39 +0900
commit442e614caba7aee4f291e801b1d7ed4e8b2d9707 (patch)
tree641b39648a860f674d3be01955c885f467ffa2e7 /src/pkg
parentf6dd45bf82f84454f5d461e8e88bd4e70c1dc614 (diff)
downloadgo-442e614caba7aee4f291e801b1d7ed4e8b2d9707.tar.xz
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
Diffstat (limited to 'src/pkg')
-rw-r--r--src/pkg/net/sock_posix.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pkg/net/sock_posix.go b/src/pkg/net/sock_posix.go
index 1d238c9684..845428aa48 100644
--- a/src/pkg/net/sock_posix.go
+++ b/src/pkg/net/sock_posix.go
@@ -15,9 +15,24 @@ import (
// address that can be converted into a syscall.Sockaddr.
type sockaddr interface {
Addr
+
+ // family returns the platform-dependent address family
+ // identifier.
family() int
+
+ // isWildcard reports whether the address is a wildcard
+ // address.
isWildcard() bool
+
+ // sockaddr returns the address converted into a syscall
+ // sockaddr type that implements syscall.Sockaddr
+ // interface. It returns a nil interface when the address is
+ // nil.
sockaddr(family int) (syscall.Sockaddr, error)
+
+ // toAddr returns the address represented in sockaddr
+ // interface. It returns a nil interface when the address is
+ // nil.
toAddr() sockaddr
}