assembly

package
v0.0.0-...-75fa4b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PacketAssembly

type PacketAssembly struct {
	RxReassembleBuffer *cache.Cache

	TxNextSeq        uint32
	TxRingBuffer     []packetAssemblyTxChunkHolder
	TxRingBufferSize int

	RxChan      chan []byte
	TxChan      chan []byte
	TxNoFECChan chan []byte

	MaxDataShardPerChunk int
	RxMaxTimeInSecond    int

	FECEnabled uint32

	TxEpochTimeInMs                  int
	TxFECSoftPacketSoftLimitPerEpoch int

	TxEpocSeq uint64

	RxShardOriginalNoFEC uint64
	RxShardOriginal      uint64
	RxShardRecovered     uint64

	TxShardOriginal      uint64
	TxShardFEC           uint64
	TxShardOriginalNoFEC uint64

	RxBytes uint64
	TxBytes uint64
	// contains filtered or unexported fields
}

func NewPacketAssembly

func NewPacketAssembly(ctx context.Context, conn net.Conn) *PacketAssembly

func (*PacketAssembly) AsConn

func (pa *PacketAssembly) AsConn() net.Conn

func (*PacketAssembly) Close

func (pa *PacketAssembly) Close() error

func (*PacketAssembly) GetProcess

func (pa *PacketAssembly) GetProcess(slot int) float64

func (*PacketAssembly) GetReleasedShard

func (pa *PacketAssembly) GetReleasedShard(slot int) int

func (*PacketAssembly) GetRemainingShard

func (pa *PacketAssembly) GetRemainingShard(slot int) int

func (*PacketAssembly) GetSentShard

func (pa *PacketAssembly) GetSentShard(slot int) int

func (*PacketAssembly) GetTotalShard

func (pa *PacketAssembly) GetTotalShard(slot int) int

func (*PacketAssembly) Report

func (pa *PacketAssembly) Report()

func (*PacketAssembly) Rx

func (pa *PacketAssembly) Rx()

func (*PacketAssembly) SelectPacketToSend

func (pa *PacketAssembly) SelectPacketToSend(quota int) []int

Return number of packet to send for each slot

func (*PacketAssembly) TrafficShapingFunc

func (pa *PacketAssembly) TrafficShapingFunc(process float64) float64

func (*PacketAssembly) Tx

func (pa *PacketAssembly) Tx()

func (*PacketAssembly) TxWithoutFEC

func (pa *PacketAssembly) TxWithoutFEC(pack []byte) bool

type PacketWireHead

type PacketWireHead struct {
	Seq uint32 `struc:"uint32"`
	Id  int    `struc:"uint16"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL