quick

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func New

func New() Builder

func (*Builder) Build

func (t *Builder) Build(cfg Cfg) error

func (*Builder) Get

func (t *Builder) Get() quic.Listener

type Cfg

type Cfg struct {
	Versions                              []quic.VersionNumber
	ConnectionIDLength                    int
	HandshakeTimeout                      time.Duration
	MaxIdleTimeout                        time.Duration
	MaxReceiveStreamFlowControlWindow     uint64
	MaxReceiveConnectionFlowControlWindow uint64
	MaxIncomingStreams                    int64
	MaxIncomingUniStreams                 int64
	StatelessResetKey                     []byte
	KeepAlive                             bool
	TokenStore                            quic.TokenStore
	QuicTracer                            quictrace.Tracer
	Tracer                                logging.Tracer
	AcceptToken                           func(clientAddr net.Addr, token *quic.Token) bool
}

func GetDefaultCfg

func GetDefaultCfg() Cfg

func (Cfg) DialAddr

func (t Cfg) DialAddr(addr string, tlsConf *tls.Config) (quic.Session, error)

func (Cfg) DialConn

func (t Cfg) DialConn(addr string, tlsConf *tls.Config) (_ net.Conn, err error)

DialConn creates a new QUIC connection it returns once the connection is established and secured with forward-secure keys

func (Cfg) ListenAddr

func (t Cfg) ListenAddr(addr string, tlsConf *tls.Config) (quic.Listener, error)

func (Cfg) ListenConn

func (t Cfg) ListenConn(addr string, tlsConf *tls.Config) (net.Listener, error)

ListenConn creates a QUIC listener on the given network interface

func (Cfg) ToCfg

func (t Cfg) ToCfg() *quic.Config

Jump to

Keyboard shortcuts

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