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

Method AddTo

icecontrol.go:74–80  ·  view source on GitHub ↗

AddTo adds ICE-CONTROLLED or ICE-CONTROLLING attribute depending on Role.

(m *stun.Message)

Source from the content-addressed store, hash-verified

72
73// AddTo adds ICE-CONTROLLED or ICE-CONTROLLING attribute depending on Role.
74func (c AttrControl) AddTo(m *stun.Message) error {
75 if c.Role == Controlling {
76 return tiebreaker(c.Tiebreaker).AddToAs(m, stun.AttrICEControlling)
77 }
78
79 return tiebreaker(c.Tiebreaker).AddToAs(m, stun.AttrICEControlled)
80}
81
82// GetFrom decodes Role and Tiebreaker value from message.
83func (c *AttrControl) GetFrom(m *stun.Message) error {

Callers

nothing calls this directly

Calls 2

tiebreakerTypeAlias · 0.85
AddToAsMethod · 0.80

Tested by

no test coverage detected