Versions in this module Expand all Collapse all v1 v1.0.40 Nov 23, 2026 Changes in this version + const AEADLimitReached + const AckECNCountOnly + const AckECNNative + const AckECNTransitions + const AckReorderingImmediate + const AckReorderingNative + const AckReorderingWindow + const ApplicationErrorErrorCode + const CongestionControlCubic + const CongestionControlCubicBytes + const CongestionControlNative + const CongestionControlReno + const ConnectionIDLimitError + const ConnectionRefused + const CryptoBufferExceeded + const FinalSizeError + const FlowControlError + const FrameEncodingError + const IPV6_DONTFRAG — windows/amd64 + const IP_DONTFRAGMENT — windows/amd64 + const InternalError + const InvalidToken + const KeyUpdateError + const MaxUDPReceivePacketSize + const NoError + const NoViablePathError + const PacingLeakyBucket + const PacingNative + const PacingScheduled + const ProtocolViolation + const SlowStartClassic + const SlowStartHybrid + const SlowStartNative + const StreamLimitError + const StreamStateError + const TransportParameterError + const Version1 + const Version2 + const VersionNegotiationErrorCode + var Err0RTTRejected = errors.New("0-RTT rejected") + var ErrPathClosed = errors.New("path closed") + var ErrPathNotValidated = errors.New("path not yet validated") + var ErrServerClosed = errServerClosed + var ErrStreamClosed = errors.New("stream closed") + var ErrTransportClosed = &errTransportClosed + var ErrWouldBlock = errors.New("operation would block") + var ErrWriteLimitReached = errors.New("write limit reached") + var QUICVersionContextKey = handshake.QUICVersionContextKey + type AckECNMode = ackhandler.AckECNMode + type AckPolicy = ackhandler.AckPolicy + type AckProbeInfo = ackhandler.AckProbeInfo + type AckReorderingMode = ackhandler.AckReorderingMode + type ApplicationError = qerr.ApplicationError + type ApplicationErrorCode = qerr.ApplicationErrorCode + type ClientHandshake struct + AckOnlyMaxDataThreshold int + AckOnlyPingThreshold int + AckPolicy *AckPolicy + AckProbePolicy func(AckProbeInfo) bool + ActiveConnectionIDLimit uint64 + ApplicationProbePackets uint8 + ApplicationProbeSkipPacketNumber *bool + CoalescePTOProbes bool + CoalesceSmallEarlyPackets bool + CompatibleVersionNegotiation bool + CongestionControl CongestionControlAlgorithm + CongestionControlConnections uint32 + CongestionControlSegmentSize uint16 + DisableClientHelloScrambling bool + DisableConnectionIDRotation bool + DisablePacketNumberSkipping bool + EarlyDataResendOnPeerCrypto bool + FlushEarlyData bool + HandshakeAckBeforeData bool + HandshakeCryptoRecovery bool + HandshakeCryptoResendOnPeerProbe bool + HandshakeProbeOnlyWithData bool + HandshakeProbePackets uint8 + HandshakeProbeSkipPacketNumber bool + ImmediateACKOnPeerPing bool + InitialACKResetsPTO bool + InitialCongestionWindowPackets uint32 + InitialCryptoCoalescingBarrier bool + InitialCryptoLayout func(InitialCryptoLayoutInfo) [][]CryptoRange + InitialCryptoProbePackets uint8 + InitialCryptoRecovery bool + InitialCryptoRecoveryLayout func(InitialCryptoLayoutInfo) [][]CryptoRange + InitialCryptoResendOnPeerProbe bool + InitialDestinationConnectionIDLength int + InitialPTOMultiplier uint32 + InitialPacketNumber uint64 + InitialPacketProtection *InitialPacketProtection + InitialPaddingMode InitialPaddingMode + InitialProbeSkipPacketNumber bool + InitialRTT time.Duration + LegacyAckFrequencyMinDelay time.Duration + MaxAckDelay time.Duration + MaxCongestionWindowPackets int64 + MaxDatagramFrameSize uint64 + MaxUDPPayloadSize uint64 + NewInitialDestinationConnectionIDLength func() (int, error) + NewInitialPacketNumber func() (uint64, error) + NewInitialPacketSize func(net.Addr) (uint16, error) + NewTLSClient tlsquic.NewClient + NewTransportParameters func(Version) (*transportparams.Layout, error) + OmitInitialAckOnHandshake bool + OmitLegacyResetStreamAt bool + OmitMaxUDPPayloadSize bool + OnApplicationReady func(*Conn) + OnEarlyDataReady func(*Conn) + OnEarlyDataRejected func(*Conn) + Pacing *PacingConfig + PacketNumberLengthPolicy func(PacketNumberLengthInfo) uint8 + PeerAckFrequencyPolicy PeerAckFrequencyPolicy + PeerPacketRecoveryPolicy func(PeerPacketInfo) PeerPacketRecovery + PersistentCongestionThreshold uint32 + PrioritizeFinishedStreams bool + ProportionalRateReduction bool + ReceiveWindowUpdateDivisor uint32 + RecoveryBurstPackets uint32 + ResetStreamsOnEarlyDataRejection bool + SeparatePacketNumberSpaces bool + SlowStart SlowStartAlgorithm + SortConnectionIDFrames bool + StreamDataRecovery bool + StreamLossRetention func(StreamLossInfo) bool + StreamReceiveWindows *StreamReceiveWindows + StreamSchedulingByCreation bool + TransportParameters *transportparams.Layout + WrapTLSClient func(*Conn, tlsquic.NewClient) tlsquic.NewClient + func (h *ClientHandshake) Clone() *ClientHandshake + func (h *ClientHandshake) Validate() error + type ClientInfo struct + AddrVerified bool + RemoteAddr net.Addr + type ClientToken struct + type Config struct + Allow0RTT bool + AllowConnectionWindowIncrease func(conn *Conn, delta uint64) bool + ClientHandshake *ClientHandshake + DisablePathMTUDiscovery bool + EnableDatagrams bool + EnableStreamResetPartialDelivery bool + GetConfigForClient func(info *ClientInfo) (*Config, error) + HandshakeIdleTimeout time.Duration + InitialConnectionReceiveWindow uint64 + InitialPacketSize uint16 + InitialStreamReceiveWindow uint64 + KeepAlivePeriod time.Duration + LegacyAckFrequencyMinDelay time.Duration + MaxConnectionReceiveWindow uint64 + MaxIdleTimeout time.Duration + MaxIncomingStreams int64 + MaxIncomingUniStreams int64 + MaxStreamReceiveWindow uint64 + PeerTransportParameterIDs []uint64 + RequireStreamCreditRelease bool + ServerTransportParameters *transportparams.Layout + TokenStore TokenStore + Tracer func(ctx context.Context, isClient bool, connID ConnectionID) qlogwriter.Trace + ValidatePeerTransportParameters func([]transportparams.Parameter) error + Versions []Version + func (c *Config) Clone() *Config + type CongestionControlAlgorithm = congestion.Algorithm + type Conn struct + func Dial(ctx context.Context, c net.PacketConn, addr net.Addr, tlsConf *tls.Config, ...) (*Conn, error) + func DialAddr(ctx context.Context, addr string, tlsConf *tls.Config, conf *Config) (*Conn, error) + func DialAddrEarly(ctx context.Context, addr string, tlsConf *tls.Config, conf *Config) (*Conn, error) + func DialEarly(ctx context.Context, c net.PacketConn, addr net.Addr, tlsConf *tls.Config, ...) (*Conn, error) + func (c *Conn) AcceptStream(ctx context.Context) (*Stream, error) + func (c *Conn) AcceptUniStream(ctx context.Context) (*ReceiveStream, error) + func (c *Conn) AddPath(t *Transport) (*Path, error) + func (c *Conn) CloseWithError(code ApplicationErrorCode, desc string) error + func (c *Conn) ConnectionState() ConnectionState + func (c *Conn) ConnectionStats() ConnectionStats + func (c *Conn) Context() context.Context + func (c *Conn) HandshakeComplete() <-chan struct{} + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) NextConnection(ctx context.Context) (*Conn, error) + func (c *Conn) OpenStream() (*Stream, error) + func (c *Conn) OpenStreamSync(ctx context.Context) (*Stream, error) + func (c *Conn) OpenUniStream() (*SendStream, error) + func (c *Conn) OpenUniStreamSync(ctx context.Context) (*SendStream, error) + func (c *Conn) PeerTransportParameter(id uint64) ([]byte, bool) + func (c *Conn) QlogTrace() qlogwriter.Trace + func (c *Conn) ReceiveDatagram(ctx context.Context) ([]byte, error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) SendDatagram(p []byte) error + func (c *Conn) TryAcceptUniStream() (*ReceiveStream, error) + func (c *Conn) TryWriteStreamBatch(writes []StreamWrite) (int, error) + type ConnectionID = protocol.ConnectionID + func ConnectionIDFromBytes(b []byte) ConnectionID + type ConnectionIDGenerator interface + ConnectionIDLen func() int + GenerateConnectionID func() (ConnectionID, error) + type ConnectionState struct + GSO bool + RequireStreamCreditRelease bool + SupportsDatagrams struct{ ... } + SupportsStreamResetPartialDelivery struct{ ... } + TLS tls.ConnectionState + Used0RTT bool + Version Version + type ConnectionStats struct + BytesLost uint64 + BytesReceived uint64 + BytesSent uint64 + CongestionWindow uint64 + LatestRTT time.Duration + MeanDeviation time.Duration + MinRTT time.Duration + PacketsLost uint64 + PacketsReceived uint64 + PacketsSent uint64 + RTTMeasured bool + SmoothedRTT time.Duration + type CryptoRange struct + Length int + Offset int + type DatagramTooLargeError struct + MaxDatagramPayloadSize int64 + func (e *DatagramTooLargeError) Error() string + func (e *DatagramTooLargeError) Is(target error) bool + type EarlyListener struct + func ListenAddrEarly(addr string, tlsConf *tls.Config, config *Config) (*EarlyListener, error) + func ListenEarly(conn net.PacketConn, tlsConf *tls.Config, config *Config) (*EarlyListener, error) + func (l *EarlyListener) Accept(ctx context.Context) (*Conn, error) + func (l *EarlyListener) Addr() net.Addr + func (l *EarlyListener) Close() error + type HandshakeTimeoutError = qerr.HandshakeTimeoutError + type IdleTimeoutError = qerr.IdleTimeoutError + type InitialCryptoLayoutInfo struct + ECHLength int + ECHOffset int + FrameBudget int + Length int + PacketSizeLimit int + Remaining []CryptoRange + SNILength int + SNIOffset int + type InitialPacketProtection struct + MaxCryptoSplits int + MaxFirstFrameSize int + MaxPingFrames int + MinCryptoSplits int + MinFirstFrameSize int + MinPingFrames int + type InitialPaddingMode uint8 + const InitialPaddingDatagram + const InitialPaddingPacket + type Listener struct + func Listen(conn net.PacketConn, tlsConf *tls.Config, config *Config) (*Listener, error) + func ListenAddr(addr string, tlsConf *tls.Config, config *Config) (*Listener, error) + func (l *Listener) Accept(ctx context.Context) (*Conn, error) + func (l *Listener) Addr() net.Addr + func (l *Listener) Close() error + type OOBCapablePacketConn = udp.OOBCapablePacketConn + type PacingAlgorithm = congestion.PacingAlgorithm + type PacingConfig = congestion.PacingConfig + type PacketNumberLengthInfo = ackhandler.PacketNumberLengthInfo + type Path struct + func (p *Path) Close() error + func (p *Path) Probe(ctx context.Context) error + func (p *Path) Switch() error + type PeerAckFrequency struct + AckElicitingThreshold uint64 + IgnoreOrder bool + MaxAckDelay time.Duration + type PeerAckFrequencyInfo struct + CongestionWindow uint64 + Current PeerAckFrequency + MaxDatagramSize uint64 + PeerMaxAckDelay time.Duration + PeerMinAckDelay time.Duration + SmoothedRTT time.Duration + type PeerAckFrequencyPolicy func(PeerAckFrequencyInfo) (target PeerAckFrequency, send bool) + type PeerPacketInfo struct + BufferedApplicationPackets int + BufferedHandshakePackets int + HandshakeComplete bool + KeysDropped bool + PacketType qlog.PacketType + ReceivedFirstPacket bool + type PeerPacketRecovery struct + ProbeHandshake bool + ResendEarlyData bool + ResendInitialCrypto bool + type ReceiveStream struct + func (s *ReceiveStream) CancelRead(errorCode StreamErrorCode) + func (s *ReceiveStream) Peek(b []byte) (int, error) + func (s *ReceiveStream) Read(p []byte) (int, error) + func (s *ReceiveStream) ReleaseStreamCredit() + func (s *ReceiveStream) SetReadDeadline(t time.Time) error + func (s *ReceiveStream) SetReceiveFinalSizeCallback(callback func(int64)) + func (s *ReceiveStream) StreamID() StreamID + func (s *ReceiveStream) TryPeek(b []byte) (int, error) + func (s *ReceiveStream) WaitForReadReady(ctx context.Context, ready <-chan struct{}) error + type SendStream struct + func (s *SendStream) CancelWrite(errorCode StreamErrorCode) + func (s *SendStream) Close() error + func (s *SendStream) Context() context.Context + func (s *SendStream) SetPriority(urgency int8, incremental bool) + func (s *SendStream) SetReliableBoundary() + func (s *SendStream) SetWriteDeadline(t time.Time) error + func (s *SendStream) StreamID() StreamID + func (s *SendStream) TryWriteAll(p []byte) error + func (s *SendStream) Write(p []byte) (int, error) + func (s *SendStream) WriteWithLimit(p []byte, limiter func(maxBytes int) int) (int, error) + type SessionMetadata struct + ConnectionID []byte + RTT time.Duration + TransportParameters []byte + Version Version + func ClientSessionMetadata(session *tls.ClientSessionState) (SessionMetadata, bool) + type SlowStartAlgorithm = congestion.SlowStart + type StatelessResetError = qerr.StatelessResetError + type StatelessResetKey [32]byte + type Stream struct + func (s *Stream) CancelRead(errorCode StreamErrorCode) + func (s *Stream) CancelWrite(errorCode StreamErrorCode) + func (s *Stream) Close() error + func (s *Stream) Context() context.Context + func (s *Stream) Peek(b []byte) (int, error) + func (s *Stream) Read(p []byte) (int, error) + func (s *Stream) ReleaseStreamCredit() + func (s *Stream) SetDeadline(t time.Time) error + func (s *Stream) SetPriority(urgency int8, incremental bool) + func (s *Stream) SetReadDeadline(t time.Time) error + func (s *Stream) SetReceiveFinalSizeCallback(callback func(int64)) + func (s *Stream) SetReliableBoundary() + func (s *Stream) SetWriteDeadline(t time.Time) error + func (s *Stream) StreamID() StreamID + func (s *Stream) TryWriteAll(p []byte) error + func (s *Stream) WaitForReadReady(ctx context.Context, ready <-chan struct{}) error + func (s *Stream) Write(p []byte) (int, error) + func (s *Stream) WriteWithLimit(p []byte, limiter func(maxBytes int) int) (int, error) + type StreamError struct + ErrorCode StreamErrorCode + Remote bool + StreamID StreamID + func (e *StreamError) Error() string + func (e *StreamError) Is(target error) bool + type StreamErrorCode = qerr.StreamErrorCode + type StreamID = protocol.StreamID + type StreamLimitReachedError struct + func (e StreamLimitReachedError) Error() string + type StreamLossInfo = ackhandler.StreamLossInfo + type StreamReceiveWindows struct + BidiLocal uint64 + BidiRemote uint64 + Uni uint64 + type StreamWrite struct + Data []byte + Fin bool + StreamID StreamID + type TokenGeneratorKey = handshake.TokenProtectorKey + type TokenStore interface + Pop func(key string) (token *ClientToken) + Put func(key string, token *ClientToken) + func NewLRUTokenStore(maxOrigins, tokensPerOrigin int) TokenStore + type Transport struct + Conn net.PacketConn + ConnContext func(context.Context, *ClientInfo) (context.Context, error) + ConnectionIDGenerator ConnectionIDGenerator + ConnectionIDLength int + DisableVersionNegotiationPackets bool + MaxTokenAge time.Duration + ReceiveBatchSize int + ReceivePacketSize int + StatelessResetKey *StatelessResetKey + TokenGeneratorKey *TokenGeneratorKey + Tracer qlogwriter.Recorder + VerifySourceAddress func(net.Addr) bool + func (t *Transport) Close() error + func (t *Transport) Dial(ctx context.Context, addr net.Addr, tlsConf *tls.Config, conf *Config) (*Conn, error) + func (t *Transport) DialEarly(ctx context.Context, addr net.Addr, tlsConf *tls.Config, conf *Config) (*Conn, error) + func (t *Transport) Listen(tlsConf *tls.Config, conf *Config) (*Listener, error) + func (t *Transport) ListenEarly(tlsConf *tls.Config, conf *Config) (*EarlyListener, error) + func (t *Transport) ReadNonQUICPacket(ctx context.Context, b []byte) (int, net.Addr, error) + func (t *Transport) WriteTo(b []byte, addr net.Addr) (int, error) + type TransportError = qerr.TransportError + type TransportErrorCode = qerr.TransportErrorCode + type Version = protocol.Version + func SessionVersion(session *tls.ClientSessionState) (Version, bool) + func SupportedVersions() []Version + type VersionNegotiationError = qerr.VersionNegotiationError