         outputStream?.write(messageBytes, maxLength: messageBytes.count)
     }
 
-    @objc fileprivate func mqttPing() {
+    @objc private func mqttPing() {
         let messageBytes: [UInt8] = [
             0xc0,                               // FIXED BYTE 1   c = PINGREQ, 0 = DUP QoS RETAIN (not used)
             0x00                                // FIXED BYTE 2   remaining length = 0

        outputStream?.write(messageBytes, maxLength: messageBytes.count)
    }

    fileprivate func mqttUnsubscribe(from topic: String) {
        messageId += 1

        let unsubscribeBytes: [UInt8] = [

    var host: String?
    var port: Int?

    var isConnected = false

    var pingInterval: UInt16 = 10

    var receivingMessage: ((_ topic: String, _ message: String) -> ())?
