quictest

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 12 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 quictest provides an in-process QUIC peer for tests: a TLS configuration for a self-signed server, and helpers to listen and dial on the loopback interface.

A QUIC stream is created implicitly by sending data on it, so a client that opens a stream must write before the server's AcceptStream returns.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoStream = errors.New("no stream")

ErrNoStream is returned when a peer closes its stream without sending anything, so that AcceptStream never returns.

Functions

func Dial

func Dial(ctx context.Context, addr net.Addr, tlsConf *tls.Config) (conn *quic.Conn, err error)

Dial connects to a QUIC listener on a loopback UDP socket.

func Listen

func Listen(tlsConf *tls.Config) (ln *quic.Listener, addr net.Addr, err error)

Listen starts a QUIC listener on a loopback UDP socket and returns it together with the address it listens on.

func SelfSignedTLS

func SelfSignedTLS() (server, client *tls.Config, err error)

SelfSignedTLS returns a server and a client TLS configuration for a self-signed certificate valid for 127.0.0.1.

Types

This section is empty.

Jump to

Keyboard shortcuts

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