MQTT的OSX客户端:CocoaMQTT

dc4g 9年前

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()

项目主页:http://www.open-open.com/lib/view/home/1439889491692