quicreuse

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromQuicMultiaddr

func FromQuicMultiaddr(addr ma.Multiaddr) (*net.UDPAddr, quic.VersionNumber, error)

func ToQuicMultiaddr

func ToQuicMultiaddr(na net.Addr, version quic.VersionNumber) (ma.Multiaddr, error)

Types

type ConnManager

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

func NewConnManager

func NewConnManager(statelessResetKey quic.StatelessResetKey, tokenKey quic.TokenGeneratorKey, opts ...Option) (*ConnManager, error)

func (*ConnManager) Close

func (c *ConnManager) Close() error

func (*ConnManager) DialQUIC

func (c *ConnManager) DialQUIC(ctx context.Context, raddr ma.Multiaddr, tlsConf *tls.Config, allowWindowIncrease func(conn quic.Connection, delta uint64) bool) (quic.Connection, error)

func (*ConnManager) ListenQUIC

func (c *ConnManager) ListenQUIC(addr ma.Multiaddr, tlsConf *tls.Config, allowWindowIncrease func(conn quic.Connection, delta uint64) bool) (Listener, error)

func (*ConnManager) Protocols

func (c *ConnManager) Protocols() []int

func (*ConnManager) TransportForDial

func (c *ConnManager) TransportForDial(network string, raddr *net.UDPAddr) (refCountedQuicTransport, error)

type Listener

type Listener interface {
	Accept(context.Context) (quic.Connection, error)
	Addr() net.Addr
	Multiaddrs() []ma.Multiaddr
	io.Closer
}

type Option

type Option func(*ConnManager) error

func DisableReuseport

func DisableReuseport() Option

func EnableMetrics

func EnableMetrics() Option

EnableMetrics enables Prometheus metrics collection.

Jump to

Keyboard shortcuts

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