From d6fcd7dc68d3df43519bc50f77a2888cc4e02078 Mon Sep 17 00:00:00 2001 From: Rasarts Date: Fri, 28 Jul 2017 15:18:43 +0300 Subject: [PATCH] Update _processMqttMessage method --- .gitignore | 12 ++++++++++++ lib/mqtt_client.dart | 3 ++- lib/mqtt_shared.dart | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4d2a4d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +# See https://www.dartlang.org/tools/private-files.html + +# Files and directories created by pub +.packages +.pub/ +build/ +# If you're building an application, you may want to check-in your pubspec.lock +pubspec.lock + +# Directory created by dartdoc +# If you don't generate documentation locally you can remove this line. +doc/api/ diff --git a/lib/mqtt_client.dart b/lib/mqtt_client.dart index b3ad7e7..1c73a11 100644 --- a/lib/mqtt_client.dart +++ b/lib/mqtt_client.dart @@ -190,7 +190,8 @@ class MqttClient { * * Return the data that has not been processed */ - List _processMqttMessage(data) { + List _processMqttMessage(ByteBuffer details) { + var data = details.asInt8List(); num type = data[0] >> 4; int msgProcessedLength = data.length; diff --git a/lib/mqtt_shared.dart b/lib/mqtt_shared.dart index 973c4b2..a2911fa 100644 --- a/lib/mqtt_shared.dart +++ b/lib/mqtt_shared.dart @@ -5,6 +5,7 @@ import 'mqtt_version_v3.dart' ; import "package:ini/ini.dart"; import 'dart:io'; import 'dart:convert'; +import 'dart:typed_data'; part 'mqtt_client.dart'; part 'mqtt_connection_shared.dart';