protocol

package
v0.0.0-...-9792e72 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoFactory

type CryptoFactory func(deviceID uint32, deviceToken []byte, initialStamp uint32, stampTime time.Time) (packet.Crypto, error)

type DeviceFactory

type DeviceFactory func(deviceId uint32, outbound transport.Outbound, seen time.Time, token []byte) device.Device

type Protocol

type Protocol interface {
	subscription.SubscriptionTarget

	Discover() error
	SetExpiryTime(duration time.Duration)
}

func NewProtocol

func NewProtocol(c ProtocolConfig) (Protocol, error)

type ProtocolConfig

type ProtocolConfig struct {
	// Required config
	BroadcastIP net.IP
	TokenStore  tokens.TokenStore

	// Optional config
	ListenPort int // Defaults to a random system-assigned port if not provided.
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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