type net/netip.AddrPort
41 uses
net/netip (current package)
netip.go#L1034: type AddrPort struct {
netip.go#L1041: func AddrPortFrom(ip Addr, port uint16) AddrPort { return AddrPort{ip: ip, port: port} }
netip.go#L1044: func (p AddrPort) Addr() Addr { return p.ip }
netip.go#L1047: func (p AddrPort) Port() uint16 { return p.port }
netip.go#L1082: func ParseAddrPort(s string) (AddrPort, error) {
netip.go#L1083: var ipp AddrPort
netip.go#L1095: return AddrPort{}, err
netip.go#L1098: return AddrPort{}, errors.New("invalid ip:port " + strconv.Quote(s) + ", square brackets can only be used with IPv6 addresses")
netip.go#L1100: return AddrPort{}, errors.New("invalid ip:port " + strconv.Quote(s) + ", IPv6 addresses must be surrounded by square brackets")
netip.go#L1107: func MustParseAddrPort(s string) AddrPort {
netip.go#L1116: func (p AddrPort) isZero() bool { return p == AddrPort{} }
netip.go#L1120: func (p AddrPort) IsValid() bool { return p.ip.IsValid() }
netip.go#L1122: func (p AddrPort) String() string {
netip.go#L1153: func (p AddrPort) AppendTo(b []byte) []byte {
netip.go#L1181: func (p AddrPort) MarshalText() ([]byte, error) {
netip.go#L1198: func (p *AddrPort) UnmarshalText(text []byte) error {
netip.go#L1200: *p = AddrPort{}
netip.go#L1211: func (p AddrPort) MarshalBinary() ([]byte, error) {
netip.go#L1219: func (p *AddrPort) UnmarshalBinary(b []byte) error {
net
ipsock_posix.go#L201: func addrPortToSockaddrInet4(ap netip.AddrPort) (syscall.SockaddrInet4, error) {
ipsock_posix.go#L215: 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#L167: func (c *UDPConn) ReadFromUDPAddrPort(b []byte) (n int, addr netip.AddrPort, err error) {
udpsock.go#L169: return 0, netip.AddrPort{}, syscall.EINVAL
udpsock.go#L186: var ap netip.AddrPort
udpsock.go#L195: func (c *UDPConn) ReadMsgUDPAddrPort(b, oob []byte) (n, oobn, flags int, addr netip.AddrPort, err error) {
udpsock.go#L197: return 0, 0, 0, netip.AddrPort{}, syscall.EINVAL
udpsock.go#L219: func (c *UDPConn) WriteToUDPAddrPort(b []byte, addr netip.AddrPort) (int, error) {
udpsock.go#L266: 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) {