sendbuf

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package sendbuf fixes the kernel send buffer of a test server's connections. Linux grows a loopback connection's send buffer to several MiB and wakes a writer blocked on it only once about a third has drained, so without a fixed size how much of a response the kernel takes, and how soon a reading client lets a blocked write go on, depend on the host.

Index

Constants

View Source
const Size = 64 << 10

Size is the send buffer Listener sets: far below any test response, above one 32 KiB write.

Variables

This section is empty.

Functions

func Listener

func Listener(l net.Listener) net.Listener

Listener returns l with the send buffer of each TCP connection it accepts set to Size.

Types

This section is empty.

Jump to

Keyboard shortcuts

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