func (n ChannelNumber) Valid() bool {
	return isChannelNumberValid(uint16(n))
}
Valid returns true if channel number has correct value that complies RFC 5766 Section 11 range.
package proto
import (
	"encoding/binary"
	"errors"
	"strconv"
	"github.com/pion/stun"
)
type ChannelNumber uint16  
func (n ChannelNumber) String() string { return strconv.Itoa(int(n)) }
const channelNumberSize = 4
func (n ChannelNumber) AddTo(m *stun.Message) error {
	v := make([]byte, channelNumberSize)
	binary.BigEndian.PutUint16(v[:2], uint16(n))
	m.Add(stun.AttrChannelNumber, v)
	return nil
}
func (n *ChannelNumber) GetFrom(m *stun.Message) error {
	v, err := m.Get(stun.AttrChannelNumber)
	if err != nil {
		return err
	}
	if err = stun.CheckSize(stun.AttrChannelNumber, len(v), channelNumberSize); err != nil {
		return err
	}
	_ = v[channelNumberSize-1]  
	*n = ChannelNumber(binary.BigEndian.Uint16(v[:2]))
	return nil
}
const (
	MinChannelNumber = 0x4000
	MaxChannelNumber = 0x7FFF
)
var ErrInvalidChannelNumber = errors.New("channel number not in [0x4000, 0x7FFF]")
func isChannelNumberValid(c uint16) bool {
	return c >= MinChannelNumber && c <= MaxChannelNumber
}