mqttpack

package
v0.0.0-...-2ec961a Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	MQTT.Client

	UserName, Pass, Url string
	MqttQos             uint8
	MqttRetained        bool
	// contains filtered or unexported fields
}

func (*Client) Conn

func (m *Client) Conn() bool

func (*Client) DisConn

func (m *Client) DisConn()

func (*Client) Pub

func (m *Client) Pub(topic, send_str string) bool

func (*Client) Pubbyte

func (m *Client) Pubbyte(topic string, buff []byte) bool

func (*Client) Sub

func (m *Client) Sub(topic string) bool

type MqttPack

type MqttPack struct {
	MqClient *Client
}

func NewMqttPack

func NewMqttPack() *MqttPack

func (*MqttPack) GetConnectStatus

func (this *MqttPack) GetConnectStatus() bool

func (*MqttPack) SetMqttInitMQ

func (this *MqttPack) SetMqttInitMQ()

func (*MqttPack) SetMsgPayLoad

func (this *MqttPack) SetMsgPayLoad(mqfun func(client MQTT.Client, msg MQTT.Message))

func (*MqttPack) SetUrl

func (this *MqttPack) SetUrl(url string) *MqttPack

func (*MqttPack) SetUserInfo

func (this *MqttPack) SetUserInfo(u_name, u_pass string) *MqttPack

Jump to

Keyboard shortcuts

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