backlog

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(l net.Listener, backlog int) error

backlog.Set() will attempt to reset the TCP connection backlog queue to the given value. Works on MacOS and Linux. On linux seems to allow n+1 connections to be queued (one in userland 1 in kernel maybe? despite no accept). To test

  • run the server go run sampleServer.go -b 3
  • run the client with -n 5 only first 3 (or 4) will connect go run sampleClient.go -n 5

On linux `ss -ltn6` will show the backlog as SendQ column.

PS: none of this meant to work according to POSIX, it just happens to seem to do so pending https://github.com/golang/go/issues/39000

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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