Documentation
¶
Index ¶
- func MQTTConnect(server string, clientid string, username string, password string, qos byte, ...) mqtt.Client
- func MQTTDisconnect(client mqtt.Client, timeout uint)
- func MQTTPublish(client mqtt.Client, topic string, pubmsg string, qos byte, retained bool) bool
- func MQTTSubscribe(client mqtt.Client, topic string, qos byte, msgRcvd mqtt.MessageHandler) bool
- func MQTTUnsubscribe(client mqtt.Client) bool
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 MQTTPublish ¶
MQTTPublish : 发送消息
func MQTTSubscribe ¶
MQTTSubscribe : 订阅
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.