transport

package
v0.0.71 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTCPTransport

func NewTCPTransport(port int, handler func(Metadata) error) (net.Listener, error)

func NewTLSTransport

func NewTLSTransport(ctx context.Context, cn string, port int, logger *zap.Logger, handler func(Metadata) error) (net.Listener, error)

func NewWSSTransport

func NewWSSTransport(ctx context.Context, cn string, port int, logger *zap.Logger, handler func(Metadata) error) (net.Listener, error)

func NewWSTransport

func NewWSTransport(port int, handler func(Metadata) error) (net.Listener, error)

Types

type Metadata

type Metadata struct {
	Name            string
	Encrypted       bool
	EncryptionState *tls.ConnectionState
	RemoteAddress   string
	Channel         TimeoutReadWriteCloser
	Endpoint        string
}

type TimeoutReadWriteCloser

type TimeoutReadWriteCloser interface {
	SetDeadline(time.Time) error
	io.ReadWriteCloser
}

Jump to

Keyboard shortcuts

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