build: update bootstrap req to C++14
[official-gcc.git] / libgo / go / net / sockaddr_posix.go
blob050eac75a4f75b335e396b1ee751e2705b02e944
1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 //go:build aix || darwin || dragonfly || freebsd || hurd || (js && wasm) || linux || netbsd || openbsd || solaris || windows
7 package net
9 import (
10 "syscall"
13 // A sockaddr represents a TCP, UDP, IP or Unix network endpoint
14 // address that can be converted into a syscall.Sockaddr.
15 type sockaddr interface {
16 Addr
18 // family returns the platform-dependent address family
19 // identifier.
20 family() int
22 // isWildcard reports whether the address is a wildcard
23 // address.
24 isWildcard() bool
26 // sockaddr returns the address converted into a syscall
27 // sockaddr type that implements syscall.Sockaddr
28 // interface. It returns a nil interface when the address is
29 // nil.
30 sockaddr(family int) (syscall.Sockaddr, error)
32 // toLocal maps the zero address to a local system address (127.0.0.1 or ::1)
33 toLocal(net string) sockaddr