internal

package
v4.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package internal contains the frame routines shared by the relay implementations, SendFrame and ReceiveFrame.

This package is not part of the public API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

func SendFrame

func SendFrame(w io.Writer, fr *frame.Frame) error

SendFrame writes the header and the payload of fr to w.

A frame without a payload is one Write of the header. A frame whose payload is borrowed from the pool is one Write of the contiguous slice that Wire returns, at any size. A frame over caller memory, as built by From or ReadFrame, is written as net.Buffers: one writev on a net.Conn, the header and then the payload elsewhere. Nothing is copied on any path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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