httpx

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: GPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package httpx is the transport every client of the relay and the ccc-pages service runs on.

A pooled HTTP/2 connection whose path died (a NAT entry dropped, the network changed) reads nothing and errors nothing: every request on it waits out its timeout, and the pool hands the same connection to the next one, so a long-running serve gets nothing through until it restarts. Transport pings a connection that has read nothing for ReadIdle and closes it when the ping goes unanswered for PingTimeout; the next request dials afresh.

Index

Constants

View Source
const (
	ReadIdle    = 15 * time.Second
	PingTimeout = 10 * time.Second
)

Variables

Transport is the shared transport: one connection pool for the process.

Functions

func NewTransport

func NewTransport(tlsConf *tls.Config, readIdle, pingTimeout time.Duration) *http.Transport

NewTransport is the default transport with HTTP/2 health pings; a nil tlsConf keeps the system roots.

Types

This section is empty.

Jump to

Keyboard shortcuts

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