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

Method NetworkShort

networktype.go:73–82  ·  view source on GitHub ↗

NetworkShort returns the short network description.

()

Source from the content-addressed store, hash-verified

71
72// NetworkShort returns the short network description.
73func (t NetworkType) NetworkShort() string {
74 switch t {
75 case NetworkTypeUDP4, NetworkTypeUDP6:
76 return udp
77 case NetworkTypeTCP4, NetworkTypeTCP6:
78 return tcp
79 default:
80 return ErrUnknownType.Error()
81 }
82}
83
84// IsReliable returns true if the network is reliable.
85func (t NetworkType) IsReliable() bool {

Callers 3

MarshalMethod · 0.80
TestActiveTCPFunction · 0.80

Calls 1

ErrorMethod · 0.45

Tested by 2

TestActiveTCPFunction · 0.64