webt

package
v0.0.0-...-e6b4c3c Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

README

This is a quic-based transport that establishes a WebTransport session over HTTP/3.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAddr

func ListenAddr(options *ListenOptions) (net.Listener, error)

ListenAddr creates an HTTP/3 server listening on a given address. The net.Conn instances returned by the net.Listener may be multiplexed connections.

func NewClient

func NewClient(config *ClientOptions) *client

NewClient returns a client that creates multiplexed WebTransport based sessions

func NewConn

func NewConn(stream webtransport.Stream, session *webtransport.Session, res *http.Response, onClose streamClosedFn) net.Conn

NewConn creates a new net.Conn from a webtransport.Stream, session, and http.Response

Types

type ClientOptions

type ClientOptions struct {
	Addr       string
	Path       string
	TLSConfig  *tls.Config
	QuicConfig *quic.Config
	PinnedCert *x509.Certificate
}

type ListenOptions

type ListenOptions struct {
	Addr       string
	Path       string
	TLSConfig  *tls.Config
	QuicConfig *quic.Config
	Handler    *http.ServeMux
}

Jump to

Keyboard shortcuts

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