type net/netip.AddrPort
43 uses
net/netip (current package)
netip.go#L1069: type AddrPort struct {
netip.go#L1076: func AddrPortFrom(ip Addr, port uint16) AddrPort { return AddrPort{ip: ip, port: port} }
netip.go#L1079: func (p AddrPort) Addr() Addr { return p.ip }
netip.go#L1082: func (p AddrPort) Port() uint16 { return p.port }
netip.go#L1117: func ParseAddrPort(s string) (AddrPort, error) {
netip.go#L1118: var ipp AddrPort
netip.go#L1130: return AddrPort{}, err
netip.go#L1133: return AddrPort{}, errors.New("invalid ip:port " + strconv.Quote(s) + ", square brackets can only be used with IPv6 addresses")
netip.go#L1135: return AddrPort{}, errors.New("invalid ip:port " + strconv.Quote(s) + ", IPv6 addresses must be surrounded by square brackets")
netip.go#L1142: func MustParseAddrPort(s string) AddrPort {
netip.go#L1152: func (p AddrPort) IsValid() bool { return p.ip.IsValid() }
netip.go#L1157: func (p AddrPort) Compare(p2 AddrPort) int {
netip.go#L1164: func (p AddrPort) String() string {
netip.go#L1195: func (p AddrPort) AppendTo(b []byte) []byte {
netip.go#L1217: func (p AddrPort) AppendText(b []byte) ([]byte, error) {
netip.go#L1224: func (p AddrPort) MarshalText() ([]byte, error) {
netip.go#L1241: func (p *AddrPort) UnmarshalText(text []byte) error {
netip.go#L1243: *p = AddrPort{}
netip.go#L1254: func (p AddrPort) AppendBinary(b []byte) ([]byte, error) {
netip.go#L1265: func (p AddrPort) MarshalBinary() ([]byte, error) {
netip.go#L1271: func (p *AddrPort) UnmarshalBinary(b []byte) error {
net
ipsock_posix.go#L237: func addrPortToSockaddrInet4(ap netip.AddrPort) (syscall.SockaddrInet4, error) {
ipsock_posix.go#L251: func addrPortToSockaddrInet6(ap netip.AddrPort) (syscall.SockaddrInet6, error) {
tcpsock.go#L32: func (a *TCPAddr) AddrPort() netip.AddrPort {
tcpsock.go#L34: return netip.AddrPort{}
tcpsock.go#L102: func TCPAddrFromAddrPort(addr netip.AddrPort) *TCPAddr {
udpsock.go#L35: func (a *UDPAddr) AddrPort() netip.AddrPort {
udpsock.go#L37: return netip.AddrPort{}
udpsock.go#L105: func UDPAddrFromAddrPort(addr netip.AddrPort) *UDPAddr {
udpsock.go#L115: netip.AddrPort
udpsock.go#L171: func (c *UDPConn) ReadFromUDPAddrPort(b []byte) (n int, addr netip.AddrPort, err error) {
udpsock.go#L173: return 0, netip.AddrPort{}, syscall.EINVAL
udpsock.go#L190: var ap netip.AddrPort
udpsock.go#L199: func (c *UDPConn) ReadMsgUDPAddrPort(b, oob []byte) (n, oobn, flags int, addr netip.AddrPort, err error) {
udpsock.go#L201: return 0, 0, 0, netip.AddrPort{}, syscall.EINVAL
udpsock.go#L223: func (c *UDPConn) WriteToUDPAddrPort(b []byte, addr netip.AddrPort) (int, error) {
udpsock.go#L270: func (c *UDPConn) WriteMsgUDPAddrPort(b, oob []byte, addr netip.AddrPort) (n, oobn int, err error) {
udpsock_posix.go#L72: func (c *UDPConn) readFromAddrPort(b []byte) (n int, addr netip.AddrPort, err error) {
udpsock_posix.go#L97: func (c *UDPConn) readMsg(b, oob []byte) (n, oobn, flags int, addr netip.AddrPort, err error) {
udpsock_posix.go#L139: func (c *UDPConn) writeToAddrPort(b []byte, addr netip.AddrPort) (int, error) {
udpsock_posix.go#L179: func (c *UDPConn) writeMsgAddrPort(b, oob []byte, addr netip.AddrPort) (n, oobn int, err error) {