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(tr *http.Transport, opts TransportOpts)
RegisterTransport configures a net/http HTTP/1 Transport to use HTTP/3.
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 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
}