Documentation ¶
Index ¶
- Constants
- Variables
- type Bucket
- func (b *Bucket[T]) AddPacket(pkt []byte) ([]byte, error)
- func (b *Bucket[T]) AddPacketWithSequenceNumber(pkt []byte, sn T) ([]byte, error)
- func (b *Bucket[T]) Capacity() int
- func (b *Bucket[T]) GetPacket(buf []byte, sn T) (int, error)
- func (b *Bucket[T]) Grow() int
- func (b *Bucket[T]) HeadSequenceNumber() T
- func (b *Bucket[T]) ResyncOnNextPacket()
Constants ¶
View Source
const (
MaxPktSize = 1500
)
Variables ¶
View Source
var ( ErrBufferTooSmall = errors.New("buffer too small") ErrPacketTooOld = errors.New("received packet too old") ErrPacketTooNew = errors.New("received packet too new") ErrRTXPacket = errors.New("packet already received") ErrRTXPacketSize = errors.New("packet already received, size mismatch") ErrPacketMismatch = errors.New("sequence number mismatch") ErrPacketSizeInvalid = errors.New("invalid size") ErrPacketTooLarge = errors.New("packet too large") )
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket[T number] struct {
// contains filtered or unexported fields
}
func (*Bucket[T]) AddPacketWithSequenceNumber ¶
func (*Bucket[T]) Grow ¶
Grow increases the capacity of the bucket by adding initial capacity to the buffer
func (*Bucket[T]) HeadSequenceNumber ¶
func (b *Bucket[T]) HeadSequenceNumber() T
func (*Bucket[T]) ResyncOnNextPacket ¶
func (b *Bucket[T]) ResyncOnNextPacket()
Click to show internal directories.
Click to hide internal directories.