client = MosquittoClient(clientId: "client1")
client?.delegate = self
client?.port = 1883
client?.host = "someIPAddress"
client!.cleanSession = false
client?.connect()
libmosquitto 是一个客观的 c 库,它被桥接到一个 swift 项目中。因此,将 cleanSession 设置为 false 后,我仍然无法设置持久订阅或在离线时接收消息。