Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func setUpMQTT() {
- let clientID = "CocoaMQTT-" + String(ProcessInfo().processIdentifier)
- mqtt = CocoaMQTT(clientID: clientID, host: "846.846.98.71", port: 8883)
- mqtt.username = "test"
- mqtt.password = "public"
- mqtt.willMessage = CocoaMQTTWill(topic: "/will", message: "dieout")
- mqtt.keepAlive = 60
- mqtt.connect()
- mqtt.delegate = self
- }
Add Comment
Please, Sign In to add comment