transport

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MPL-2.0 Imports: 10 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(tlsConfig *tls.Config, port int, handler func(Metadata) error) (net.Listener, error)

func NewWSSTransport

func NewWSSTransport(tlsConfig *tls.Config, port int, 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