main.cpp 717 B

123456789101112131415161718192021222324252627282930313233
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string>
  4. #include <map>
  5. #include <mutex>
  6. #include <MqttDef.h>
  7. #include <MqttClient/MqttApi.h>
  8. #include <proto/MqttLog.h>
  9. #include <proto/ProtoParser.h>
  10. #include <proto/Crypt.h>
  11. #include <assert.h>
  12. int main()
  13. {
  14. auto str = "AJBd+jzQToy8y2zl7199VsSD8hvVgJToyzDu07SCS06q";
  15. ProtoParser parser;
  16. parser.setToken("", "aabb", "90d86418-9fd9-413c-a5e4-ea81d2897a13");
  17. parser.test();
  18. auto s = parser.connectPack("test01#7548");
  19. auto a = parser.getUserInfo("{\"request\":[{\"uid\":\"test01#7549\"}]}", "");
  20. auto mqtt = mqttCreate("tcp://im.zljyhz.com:8992/");
  21. if (mqtt == nullptr)
  22. {
  23. printf("create mqtt failed.");
  24. return -1;
  25. }
  26. mqttDestory(mqtt);
  27. return 0;
  28. }