webtransportgo

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(ctx context.Context, addr string, header http.Header, tlsConfig *tls.Config, quicConfig *quic.Config, appProtocols []string, qtr *quic.Transport) (*http.Response, transport.WebTransportSession, error)

Dial opens a WebTransport session to addr. quicConfig configures the QUIC connection under it and is passed to the library as it is: nil is the library's defaults, and any other must have datagrams and stream reset with partial delivery on, or the library refuses it.

The QUIC connection is dialed over qtr, the caller's, if not nil, as quic.Transport.DialEarly does; else through quicgo.DialEarly, so the session keeps through a network change as a native QUIC one does.

Types

type Config added in v0.23.0

Config is an alias for quicgo_webtransportgo.Config

type Server

type Server struct {
	Handler http.Handler
	Config  *quicgo_webtransportgo.Config
	// contains filtered or unexported fields
}

Server is a wrapper for (quic-go/webtransport-go).Server

func (*Server) Close

func (s *Server) Close() error

func (*Server) Serve

func (s *Server) Serve(conn net.PacketConn) error

func (*Server) ServeQUICConn

func (s *Server) ServeQUICConn(conn transport.StreamConn) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

type Upgrader

type Upgrader struct {
	CheckOrigin          func(r *http.Request) bool
	ApplicationProtocols []string
	ReorderingTimeout    time.Duration
}

func (*Upgrader) Upgrade

Jump to

Keyboard shortcuts

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