]> Cypherpunks repositories - gostls13.git/commitdiff
net: document sockaddr interface
authorMikio Hara <mikioh.mikioh@gmail.com>
Mon, 29 Jul 2013 14:25:39 +0000 (23:25 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Mon, 29 Jul 2013 14:25:39 +0000 (23:25 +0900)
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

src/pkg/net/sock_posix.go

index 1d238c96840db3b9b3d6e62c451c6f59f5944dae..845428aa487f76d36941d5e20cf1b976a34f01d0 100644 (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
 }