         var username: String? = nil
         var password: String? = nil
         var clientId: String? = nil
+        var bufferSize: Int = 4096
 
         var concretePort: Int {
             return port ?? (useTLS ? 8883 : 1883)

    }

    func connect() -> Bool {

        if inputStream != nil || outputStream != nil {
            return false
        }

                        break
                    }

                    let bytesToRead = min(options.bufferSize - byteCount, messageLength - byteCount)
                    let count = inputStream.read(messageBuffer.advanced(by: byteCount), maxLength: bytesToRead)
                    if count == 0 {
                        break
