alpnmux

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NoProto is used when the connection isn't actually TLS
	NoProto = "(none)"

	// DefaultProto is used when there is an ALPN we don't actually know about.
	// If no protos are specified on an incoming TLS connection we will first
	// look for a proto of ""; if not found, will use DefaultProto. On a
	// connection that has protos defined, we will look for that proto first,
	// then DefaultProto.
	DefaultProto = "(*)"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ALPNMux

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

func New

func New(baseLn net.Listener, log hclog.Logger) *ALPNMux

func (*ALPNMux) Addr

func (l *ALPNMux) Addr() net.Addr

func (*ALPNMux) Close

func (l *ALPNMux) Close() error

func (*ALPNMux) GetListener

func (l *ALPNMux) GetListener(proto string) net.Listener

func (*ALPNMux) RegisterProto

func (l *ALPNMux) RegisterProto(proto string, tlsConf *tls.Config) (net.Listener, error)

func (*ALPNMux) SetLogger

func (l *ALPNMux) SetLogger(log hclog.Logger)

func (*ALPNMux) UnregisterProto

func (l *ALPNMux) UnregisterProto(proto string)

Jump to

Keyboard shortcuts

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