status-go/vendor/github.com/pion/ice/v2/usecandidate.go
Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6c5642830354740d045f453eb3e77e8.
2024-01-18 20:29:33 +00:00

24 lines
579 B
Go

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{}
}