quicdialer

package
v0.0.0-...-bd88772 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectionState

func ConnectionState(sess quic.EarlySession) tls.ConnectionState

ConnectionState returns the ConnectionState of a QUIC Session.

Types

type ContextDialer

type ContextDialer interface {
	// Note: assumes that tlsCfg and cfg are not nil.
	DialContext(ctx context.Context, network, host string,
		tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlySession, error)
}

ContextDialer is a dialer for QUIC using Context.

type DNSDialer

type DNSDialer struct {
	Dialer   ContextDialer
	Resolver Resolver
}

DNSDialer is a dialer that uses the configured Resolver to resolve a domain name to IP addresses

func (DNSDialer) DialContext

func (d DNSDialer) DialContext(
	ctx context.Context, network, host string,
	tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlySession, error)

DialContext implements ContextDialer.DialContext

func (DNSDialer) LookupHost

func (d DNSDialer) LookupHost(ctx context.Context, hostname string) ([]string, error)

LookupHost implements Resolver.LookupHost

type Dialer

type Dialer interface {
	// Note: assumes that tlsCfg and cfg are not nil.
	Dial(network, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlySession, error)
}

Dialer dials QUIC connections.

type ErrorWrapperDialer

type ErrorWrapperDialer struct {
	Dialer ContextDialer
}

ErrorWrapperDialer is a dialer that performs quic err wrapping

func (ErrorWrapperDialer) DialContext

func (d ErrorWrapperDialer) DialContext(
	ctx context.Context, network string, host string,
	tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlySession, error)

DialContext implements ContextDialer.DialContext

type HandshakeSaver

type HandshakeSaver struct {
	Saver  *trace.Saver
	Dialer ContextDialer
}

HandshakeSaver saves events occurring during the handshake

func (HandshakeSaver) DialContext

func (h HandshakeSaver) DialContext(ctx context.Context, network string,
	host string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlySession, error)

DialContext implements ContextDialer.DialContext

type Resolver

type Resolver interface {
	LookupHost(ctx context.Context, hostname string) (addrs []string, err error)
}

Resolver is the interface we expect from a resolver.

type SystemDialer

type SystemDialer struct {
	// Saver saves read/write events on the underlying UDP
	// connection. (Implementation note: we need it here since
	// this is the only part in the codebase that is able to
	// observe the underlying UDP connection.)
	Saver *trace.Saver
}

SystemDialer is the basic dialer for QUIC

func (SystemDialer) DialContext

func (d SystemDialer) DialContext(ctx context.Context, network string,
	host string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlySession, error)

DialContext implements ContextDialer.DialContext

Jump to

Keyboard shortcuts

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