MCPcopy Create free account
hub / github.com/pion/ice / createAddr

Function createAddr

addr.go:104–111  ·  view source on GitHub ↗
(network NetworkType, ip netip.Addr, port int)

Source from the content-addressed store, hash-verified

102}
103
104func createAddr(network NetworkType, ip netip.Addr, port int) net.Addr {
105 switch {
106 case network.IsTCP():
107 return &net.TCPAddr{IP: ip.AsSlice(), Port: port, Zone: ip.Zone()}
108 default:
109 return &net.UDPAddr{IP: ip.AsSlice(), Port: port, Zone: ip.Zone()}
110 }
111}
112
113func addrEqual(a, b net.Addr) bool {
114 aIP, aPort, aType, aErr := parseAddr(a)

Callers 3

TestCreateAddrFunction · 0.85
setIPAddrMethod · 0.85

Calls 1

IsTCPMethod · 0.80

Tested by 1

TestCreateAddrFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…