blob: f168c08ebdf670ac8080e2af401998efa74317b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package ice
import "github.com/pion/stun"
// UseCandidateAttr represents USE-CANDIDATE attribute.
type UseCandidateAttr struct{}
// AddTo adds USE-CANDIDATE attribute to message.
func (UseCandidateAttr) AddTo(m *stun.Message) error {
m.Add(stun.AttrUseCandidate, nil)
return nil
}
// IsSet returns true if USE-CANDIDATE attribute is set.
func (UseCandidateAttr) IsSet(m *stun.Message) bool {
_, err := m.Get(stun.AttrUseCandidate)
return err == nil
}
// UseCandidate is shorthand for UseCandidateAttr.
func UseCandidate() UseCandidateAttr {
return UseCandidateAttr{}
}
|