mqttmgr

package
v0.0.0-...-34ace47 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MQTTConnect

func MQTTConnect(server string, clientid string, username string, password string, qos byte, retained bool, topic string, lwt string, mqttvar uint) mqtt.Client

MQTTConnect : 连接到服务器

func MQTTDisconnect

func MQTTDisconnect(client mqtt.Client, timeout uint)

MQTTDisconnect : 断开连接

func MQTTPublish

func MQTTPublish(client mqtt.Client, topic string, pubmsg string, qos byte, retained bool) bool

MQTTPublish : 发送消息

func MQTTSubscribe

func MQTTSubscribe(client mqtt.Client, topic string, qos byte, msgRcvd mqtt.MessageHandler) bool

MQTTSubscribe : 订阅

func MQTTUnsubscribe

func MQTTUnsubscribe(client mqtt.Client) bool

MQTTUnsubscribe : 取消订阅

Types

This section is empty.

Jump to

Keyboard shortcuts

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