1
0
mirror of https://github.com/golang/go synced 2024-11-26 02:57:57 -07:00

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
This commit is contained in:
Mikio Hara 2013-07-29 23:25:39 +09:00
parent f6dd45bf82
commit 442e614cab

View File

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