fragmentbuffer

package
v4.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package fragmentbuffer reassembles fragmented DTLS handshake messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FragmentBuffer

type FragmentBuffer struct {
	// contains filtered or unexported fields
}

FragmentBuffer stores and reassembles fragmented DTLS handshake messages.

func New

func New() *FragmentBuffer

New creates an empty FragmentBuffer.

func (*FragmentBuffer) AdvanceTo

func (f *FragmentBuffer) AdvanceTo(messageSequence uint16)

AdvanceTo discards fragments for message sequences before messageSequence.

func (*FragmentBuffer) Pop

func (f *FragmentBuffer) Pop() (content []byte, epoch uint64)

Pop returns the next complete handshake message and its record epoch.

func (*FragmentBuffer) Push

func (f *FragmentBuffer) Push(epoch uint64, content []byte) (PushResult, error)

Push validates and adds handshake fragments from content to the buffer. content starts with a handshake header.

type PushResult

type PushResult struct {
	IsRetransmit bool
	// IsRetransmitStart reports an old message's offset-zero fragment.
	IsRetransmitStart bool
}

PushResult identifies retransmitted messages among the received fragments.

Jump to

Keyboard shortcuts

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