transport

package
v0.0.63-rc46 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2019 License: MPL-2.0 Imports: 14 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 Conn

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

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() net.Addr

func (*Conn) Read

func (c *Conn) Read(b []byte) (int, error)

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() net.Addr

func (*Conn) SetDeadline

func (c *Conn) SetDeadline(t time.Time) error

func (*Conn) SetReadDeadline

func (c *Conn) SetReadDeadline(t time.Time) error

func (*Conn) SetWriteDeadline

func (c *Conn) SetWriteDeadline(t time.Time) error

func (*Conn) Write

func (c *Conn) Write(b []byte) (int, error)

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