mqtt

package
v0.0.0-...-70461ab Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tcp

func Tcp(acl Acl) error

Types

type Acl

type Acl interface {
	AllowConnect(packet *ConnectPacket) error
	AllowPublish(session *Session, packet *PublishPacket) error
	AllowSubscribe(session *Session, packet *SubscribePacket) error
}

func DefaultAcl

func DefaultAcl() Acl

type AuthPacket

type AuthPacket struct {
}

type ConnackPacket

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

type ConnectPacket

type ConnectPacket struct {
	UsernameFlag bool
	PasswordFlag bool
	WillFlag     bool
	WillQoS      byte
	WillRetain   bool
	CleanSession bool
	KeepAlive    uint16
	ClientId     string
	WillTopic    string
	WillMessage  string
	Username     string
	Password     string
}

type DisconnectPacket

type DisconnectPacket struct {
}

type PingreqPacket

type PingreqPacket struct {
}

type PingrespPacket

type PingrespPacket struct {
}

type PubackPacket

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

type PubcompPacket

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

type PublishPacket

type PublishPacket struct {
	Duplicate bool
	Qos       byte
	Retain    bool
	Topic     string
	PacketId  uint16
	Payload   string
}

type PubrecPacket

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

type PubrelPacket

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

type Session

type Session struct {
	Conn   net.Conn
	Reader *bufio.Reader
	Writer io.Writer

	Handler       handler
	Acl           Acl
	Subscriptions []*topicLevel

	SendQueue    any
	ReceiveQueue any

	CleanSession bool
	WillFlag     bool
	WillRetained bool
	ClientId     string
	Username     string
	Password     string
	WillTopic    string
	WillMsg      string
	WillQos      byte
	KeepAlive    uint16
}

type SubackPacket

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

type SubscribePacket

type SubscribePacket struct {
	PacketId uint16
	Topics   []string
	Qos      []byte
}

type UnsubackPacket

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

type UnsubscribePacket

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

Jump to

Keyboard shortcuts

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