directquic

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialConfig

type DialConfig struct {
	PacketConn net.PacketConn
	RemoteAddr net.Addr
	Identity   quicpath.SessionIdentity
	PeerPublic [32]byte
}

type Endpoint

type Endpoint struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(ctx context.Context, cfg DialConfig) (*Endpoint, error)

func DialConnections

func DialConnections(ctx context.Context, cfg DialConfig, count int) (*Endpoint, error)

func Listen

func Listen(ctx context.Context, cfg ListenConfig) (*Endpoint, error)

func ListenConnectionsWithReady

func ListenConnectionsWithReady(ctx context.Context, cfg ListenConfig, count int, ready func() error) (*Endpoint, error)

func ListenWithReady

func ListenWithReady(ctx context.Context, cfg ListenConfig, ready func() error) (*Endpoint, error)

func (*Endpoint) AcceptReceiveStream

func (e *Endpoint) AcceptReceiveStream(ctx context.Context) (io.ReadCloser, error)

func (*Endpoint) AcceptReceiveStreams

func (e *Endpoint) AcceptReceiveStreams(ctx context.Context, count int) ([]io.ReadCloser, error)

func (*Endpoint) Close

func (e *Endpoint) Close() error

func (*Endpoint) CloseWithError

func (e *Endpoint) CloseWithError(code uint64, reason string) error

func (*Endpoint) OpenSendStream

func (e *Endpoint) OpenSendStream(ctx context.Context) (io.WriteCloser, error)

func (*Endpoint) OpenSendStreams

func (e *Endpoint) OpenSendStreams(ctx context.Context, count int) ([]io.WriteCloser, error)

func (*Endpoint) Stats

func (e *Endpoint) Stats() Stats

func (*Endpoint) WaitClosed

func (e *Endpoint) WaitClosed(ctx context.Context) error

type ListenConfig

type ListenConfig struct {
	PacketConn net.PacketConn
	Identity   quicpath.SessionIdentity
	PeerPublic [32]byte
}

type Stats

type Stats struct {
	BytesSent            int64
	BytesReceived        int64
	TelemetryPresent     bool
	Connections          uint32
	Streams              uint32
	PacketsSent          uint64
	PacketsReceived      uint64
	PacketsLost          uint64
	WireBytesSent        uint64
	RecoveryWireBytes    uint64
	SmoothedRTT          time.Duration
	HandshakeDuration    time.Duration
	FirstByteDuration    time.Duration
	StreamBytesSent      uint64
	StreamBytesReceived  uint64
	Version              string
	RawSocketBackend     string
	NativeSendBackend    string
	NativeReceiveBackend string
	NativeGSO            string
	NativeReceiveBatch   string
	HandshakeMS          int64
	FirstByteMS          int64
	OpenedAt             time.Time
	HandshakeAt          time.Time
	FirstByteAt          time.Time
	ClosedAt             time.Time
	CloseReason          string
}

Jump to

Keyboard shortcuts

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