OSX 的 MQTT 客户端 CocoaMQTT
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: OS X
- 软件首页: https://github.com/emqtt/CocoaMQTT
软件介绍
CocoaMQTT 是用于 iOS 和 OSX 的 MQTT 客户端,用 Swift 编写。
目前支持 MQTT 3.1 (不是 MQTT 3.1.1)
使用:
let mqtt = CocoaMQTT(clientId: "CocoaMQTT-ClientId") mqtt.username = "test" mqtt.password = "public" mqtt.willMessage = CocoaMQTTWill(topic: "/will", message: "dieout") mqtt.keepAlive = 5 mqtt.delegate = CocoaMQTTCli() mqtt.connect()
