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

Function effectiveURLProtoType

gather.go:44–57  ·  view source on GitHub ↗
(url stun.URI)

Source from the content-addressed store, hash-verified

42}
43
44func effectiveURLProtoType(url stun.URI) stun.ProtoType {
45 if url.Proto != stun.ProtoTypeUnknown {
46 return url.Proto
47 }
48
49 switch url.Scheme {
50 case stun.SchemeTypeSTUN, stun.SchemeTypeTURN:
51 return stun.ProtoTypeUDP
52 case stun.SchemeTypeSTUNS, stun.SchemeTypeTURNS:
53 return stun.ProtoTypeTCP
54 default:
55 return stun.ProtoTypeUnknown
56 }
57}
58
59func urlSupportsSrflxGathering(url stun.URI) bool {
60 if effectiveURLProtoType(url) != stun.ProtoTypeUDP {

Callers 5

turnNetworkTypesForURLFunction · 0.85
gatherCandidatesRelayMethod · 0.85

Calls

no outgoing calls

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…