123456789101112131415161718192021222324252627282930313233 |
- #include <stdlib.h>
- #include <stdio.h>
- #include <string>
- #include <map>
- #include <mutex>
- #include <MqttDef.h>
- #include <MqttClient/MqttApi.h>
- #include <proto/MqttLog.h>
- #include <proto/ProtoParser.h>
- #include <proto/Crypt.h>
- #include <assert.h>
- int main()
- {
- auto str = "AJBd+jzQToy8y2zl7199VsSD8hvVgJToyzDu07SCS06q";
- ProtoParser parser;
- parser.setToken("", "aabb", "90d86418-9fd9-413c-a5e4-ea81d2897a13");
- parser.test();
- auto s = parser.connectPack("test01#7548");
- auto a = parser.getUserInfo("{\"request\":[{\"uid\":\"test01#7549\"}]}", "");
- auto mqtt = mqttCreate("tcp://im.zljyhz.com:8992/");
- if (mqtt == nullptr)
- {
- printf("create mqtt failed.");
- return -1;
- }
- mqttDestory(mqtt);
- return 0;
- }
|