mirror of
https://github.com/status-im/status-go.git
synced 2025-02-27 14:10:54 +00:00
19 lines
461 B
Go
19 lines
461 B
Go
package proto
|
|
|
|
import "github.com/pion/stun"
|
|
|
|
// DontFragmentAttr represents DONT-FRAGMENT attribute.
|
|
type DontFragmentAttr struct{}
|
|
|
|
// AddTo adds DONT-FRAGMENT attribute to message.
|
|
func (DontFragmentAttr) AddTo(m *stun.Message) error {
|
|
m.Add(stun.AttrDontFragment, nil)
|
|
return nil
|
|
}
|
|
|
|
// IsSet returns true if DONT-FRAGMENT attribute is set.
|
|
func (DontFragmentAttr) IsSet(m *stun.Message) bool {
|
|
_, err := m.Get(stun.AttrDontFragment)
|
|
return err == nil
|
|
}
|