c5_labsci/zciyon/mqtt.go
2026-01-27 00:52:00 +08:00

8 lines
322 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package zciyon
type CiyMQTT interface {
Connect() error //qos0至多一次1至少一次2仅一次
Publish(topic string, data []byte, q_r ...int) error //发布数据
Receive(topic string, fn func(topic string, data []byte)) error //接收订阅数据
}