Guest User

Untitled

a guest
Feb 9th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. func setUpMQTT() {
  2. let clientID = "CocoaMQTT-" + String(ProcessInfo().processIdentifier)
  3. mqtt = CocoaMQTT(clientID: clientID, host: "846.846.98.71", port: 8883)
  4. mqtt.username = "test"
  5. mqtt.password = "public"
  6. mqtt.willMessage = CocoaMQTTWill(topic: "/will", message: "dieout")
  7. mqtt.keepAlive = 60
  8. mqtt.connect()
  9. mqtt.delegate = self
  10. }
Add Comment
Please, Sign In to add comment