Versions in this module Expand all Collapse all v0 v0.50.0 Feb 20, 2025 v0.49.2 Feb 17, 2025 Changes in this version + const CapsuleProtocolHeader + 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 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 ClientConn struct + func (c *ClientConn) CloseWithError(code quic.ApplicationErrorCode, msg string) error + func (c *ClientConn) Context() context.Context + func (c *ClientConn) OpenRequestStream(ctx context.Context) (RequestStream, error) + func (c *ClientConn) ReceivedSettings() <-chan struct{} + func (c *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) + func (c *ClientConn) Settings() *Settings + 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 + func (e *Error) Is(target error) bool + 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 = Transport + 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) 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) Shutdown(ctx context.Context) error + type Settings struct + EnableDatagrams bool + EnableExtendedConnect bool + Other map[uint64]uint64 + type SingleDestinationRoundTripper = ClientConn + type Stream interface + ReceiveDatagram func(context.Context) ([]byte, error) + SendDatagram func([]byte) error + type StreamType uint64 + type Transport 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 + Logger *slog.Logger + MaxResponseHeaderBytes int64 + QUICConfig *quic.Config + StreamHijacker func(FrameType, quic.ConnectionTracingID, quic.Stream, error) (hijacked bool, err error) + TLSClientConfig *tls.Config + UniStreamHijacker func(StreamType, quic.ConnectionTracingID, quic.ReceiveStream, error) (hijacked bool) + func (t *Transport) Close() error + func (t *Transport) CloseIdleConnections() + func (t *Transport) NewClientConn(conn quic.Connection) *ClientConn + func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) + func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error)