listener

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSessionDisconnected = errors.New("session disconnected")
	ErrConnectNotDone      = errors.New("CONNECT not done")
)
View Source
var CONNECT_DEADLINE int32 = 15
View Source
var (
	ErrSessionNotFound = errors.New("session not found on this endpoint")
)

Functions

func New

func New(id string, logger *zap.Logger, mesh cluster.Mesh, config Config) *endpoint

func Serve

func Serve(local Endpoint, port int) net.Listener

Types

type Config

type Config struct {
	TCPPort       int
	TLSCommonName string
	TLSPort       int
	WSSPort       int
	WSPort        int
}

type Endpoint

type Endpoint interface {
	Publish(ctx context.Context, id string, publish *packet.Publish) error
	CloseSession(context.Context, string) error
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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