Versions in this module Expand all Collapse all v0 v0.46.3 Dec 20, 2024 v0.46.0 Dec 20, 2024 Changes in this version + const MethodGet0RTT + const MethodHead0RTT + const NextProtoH3 + var ErrNoAltSvcPort = errors.New(...) + var ErrNoCachedConn = errors.New("http3: no cached connection was available") + var RemoteAddrContextKey = &contextKey + var ServerContextKey = &contextKey + func ConfigureTLSConfig(tlsConf *tls.Config) *tls.Config + func ListenAndServe(addr, certFile, keyFile string, handler http.Handler) error + func ListenAndServeQUIC(addr, certFile, keyFile string, handler http.Handler) error + func ListenAndServeTLS(addr, certFile, keyFile string, handler http.Handler) error + func WriteCapsule(w quicvarint.Writer, ct CapsuleType, value []byte) error + type CapsuleType uint64 + func ParseCapsule(r quicvarint.Reader) (CapsuleType, io.Reader, error) + type Connection interface + CloseWithError func(quic.ApplicationErrorCode, string) error + ConnectionState func() quic.ConnectionState + Context func() context.Context + LocalAddr func() net.Addr + OpenStream func() (quic.Stream, error) + OpenStreamSync func(context.Context) (quic.Stream, error) + OpenUniStream func() (quic.SendStream, error) + OpenUniStreamSync func(context.Context) (quic.SendStream, error) + ReceivedSettings func() <-chan struct{} + RemoteAddr func() net.Addr + Settings func() *Settings + type ErrCode quic.ApplicationErrorCode + const ErrCodeClosedCriticalStream + const ErrCodeConnectError + const ErrCodeDatagramError + const ErrCodeExcessiveLoad + const ErrCodeFrameError + const ErrCodeFrameUnexpected + const ErrCodeGeneralProtocolError + const ErrCodeIDError + const ErrCodeInternalError + const ErrCodeMessageError + const ErrCodeMissingSettings + const ErrCodeNoError + const ErrCodeRequestCanceled + const ErrCodeRequestIncomplete + const ErrCodeRequestRejected + const ErrCodeSettingsError + const ErrCodeStreamCreationError + const ErrCodeVersionFallback + func (e ErrCode) String() string + type Error struct + ErrorCode ErrCode + ErrorMessage string + Remote bool + func (e *Error) Error() string + type FrameType uint64 + type HTTPStreamer interface + HTTPStream func() Stream + type Hijacker interface + Connection func() Connection + type QUICEarlyListener interface + Accept func(context.Context) (quic.EarlyConnection, error) + Addr func() net.Addr + type RequestStream interface + ReadResponse func() (*http.Response, error) + SendRequestHeader func(req *http.Request) error + type RoundTripOpt struct + OnlyCachedConn bool + type RoundTripper struct + AdditionalSettings map[uint64]uint64 + Dial func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlyConnection, error) + DisableCompression bool + EnableDatagrams bool + MaxResponseHeaderBytes int64 + QUICConfig *quic.Config + TLSClientConfig *tls.Config + func (r *RoundTripper) Close() error + func (r *RoundTripper) CloseIdleConnections() + func (r *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) + func (r *RoundTripper) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) + type Server struct + AdditionalSettings map[uint64]uint64 + Addr string + ConnContext func(ctx context.Context, c quic.Connection) context.Context + EnableDatagrams bool + Handler http.Handler + IdleTimeout time.Duration + Logger *slog.Logger + MaxHeaderBytes int + Port int + QUICConfig *quic.Config + StreamHijacker func(FrameType, quic.ConnectionTracingID, quic.Stream, error) (hijacked bool, err error) + TLSConfig *tls.Config + UniStreamHijacker func(StreamType, quic.ConnectionTracingID, quic.ReceiveStream, error) (hijacked bool) + func (s *Server) Close() error + func (s *Server) CloseGracefully(timeout time.Duration) error + func (s *Server) ListenAndServe() error + func (s *Server) ListenAndServeTLS(certFile, keyFile string) error + func (s *Server) Serve(conn net.PacketConn) error + func (s *Server) ServeListener(ln QUICEarlyListener) error + func (s *Server) ServeQUICConn(conn quic.Connection) error + func (s *Server) SetQUICHeaders(hdr http.Header) error + func (s *Server) SetQuicHeaders(hdr http.Header) error + type Settings struct + EnableDatagrams bool + EnableExtendedConnect bool + Other map[uint64]uint64 + type SingleDestinationRoundTripper struct + AdditionalSettings map[uint64]uint64 + Connection quic.Connection + DisableCompression bool + EnableDatagrams bool + Logger *slog.Logger + MaxResponseHeaderBytes int64 + StreamHijacker func(FrameType, quic.ConnectionTracingID, quic.Stream, error) (hijacked bool, err error) + UniStreamHijacker func(StreamType, quic.ConnectionTracingID, quic.ReceiveStream, error) (hijacked bool) + func (c *SingleDestinationRoundTripper) OpenRequestStream(ctx context.Context) (RequestStream, error) + func (c *SingleDestinationRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) + func (c *SingleDestinationRoundTripper) Start() Connection + type Stream interface + ReceiveDatagram func(context.Context) ([]byte, error) + SendDatagram func([]byte) error + type StreamType uint64