Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultReassembleTimeout = 30 * time.Second // 默认的重组时间
View Source
const HighFragThreshold = 4 << 20 // 4MB 开始丢弃旧分片包的阈值
View Source
const LowFragThreshold = 3 << 20 // 3MB 丢弃旧分片包需要减小到的阈值
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fragmentation ¶
type Fragmentation struct {
// contains filtered or unexported fields
}
func NewFragmentation ¶
func NewFragmentation(highMemoryLimit, lowMemoryLimit int, reassemblingTimeout time.Duration) *Fragmentation
func (*Fragmentation) Process ¶
func (f *Fragmentation) Process(id uint32, first, last uint16, more bool, vv buffer.VectorisedView) (buffer.VectorisedView, bool)
Process 完成分片重组功能
Click to show internal directories.
Click to hide internal directories.