http3

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package http3 implements the HTTP/3 protocol.

This package is a work in progress. It is not ready for production usage. Its API is subject to change without notice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterServer

func RegisterServer(s *http.Server, opts ServerOpts)

RegisterServer adds HTTP/3 support to a net/http Server.

RegisterServer must be called before s begins serving, and only affects s.ListenAndServeTLS.

func RegisterTransport

func RegisterTransport(tr *http.Transport, opts TransportOpts)

RegisterTransport configures a net/http HTTP/1 Transport to use HTTP/3.

Types

type ServerOpts

type ServerOpts struct {
	// ListenQUIC determines how the server will open a QUIC endpoint.
	// By default, quic.Listen("udp", addr, config) is used.
	ListenQUIC func(addr string, config *quic.Config) (*quic.Endpoint, error)

	// QUICConfig is the QUIC configuration used by the server.
	// QUICConfig may be nil and should not be modified after calling
	// RegisterServer.
	// If QUICConfig.TLSConfig is nil, the TLSConfig of the net/http Server
	// given to RegisterServer will be used.
	QUICConfig *quic.Config
}

type TransportOpts

type TransportOpts struct {
	// ListenQUIC determines how the transport will open a QUIC endpoint.
	// By default, quic.Listen("udp", addr, config) is used.
	// ListenQUIC might be called multiple times.
	ListenQUIC func(addr string, config *quic.Config) (*quic.Endpoint, error)

	// QUICConfig is the QUIC configuration used by the transport.
	// QUICConfig may be nil and should not be modified after calling
	// RegisterTransport.
	// If QUICConfig.TLSConfig is nil, the TLSConfig of the net/http Transport
	// given to RegisterTransport will be used.
	QUICConfig *quic.Config
}

Jump to

Keyboard shortcuts

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