internal

package
v4.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package internal contains shared utilities used by the relay implementations: tiered buffer pooling (1 MB / 5 MB / 10 MB) and the common frame-reception routine ReceiveFrame.

This package is not part of the public API.

Index

Constants

View Source
const (
	OneMB  uint32 = 1024 * 1024 * 1
	FiveMB uint32 = 1024 * 1024 * 5
	TenMB  uint32 = 1024 * 1024 * 10
)

Variables

This section is empty.

Functions

func Preallocate

func Preallocate()

Preallocate initializes the tiered buffer pools. Must be called before ReceiveFrame.

func ReceiveFrame

func ReceiveFrame(relay io.Reader, fr *frame.Frame) error

ReceiveFrame reads a complete frame (header, options, and payload) from the relay into fr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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