listener

package
v0.0.51-rc16 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: MPL-2.0 Imports: 16 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 int64 = 15
View Source
var (
	ErrSessionNotFound = errors.New("session not found on this endpoint")
)

Functions

This section is empty.

Types

type Broker

type Broker interface {
	Connect(transport.Metadata, *packet.Connect) (string, *packet.ConnAck, error)
	Disconnect(string, *packet.Disconnect) error
	Publish(string, *packet.Publish) (*packet.PubAck, error)
	Subscribe(string, *packet.Subscribe) (*packet.SubAck, error)
	Unsubscribe(string, *packet.Unsubscribe) (*packet.UnsubAck, error)
	RemoveSession(string) error
}

type Config

type Config struct {
	TCPPort int
	TLS     *tls.Config
	TLSPort int
	WSSPort int
	WSPort  int
}

type Endpoint

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

func New

func New(broker Broker, config Config) Endpoint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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