实现MQTT功能, 修改HTTP接口

This commit is contained in:
lixiaoyuan
2025-09-04 19:31:04 +08:00
parent 61ed4f355f
commit d81bcd9983
30 changed files with 2029 additions and 697 deletions

View File

@@ -40,13 +40,13 @@ public:
}
// 获取当前时间的时间戳(毫秒)
static int64_t time();
static int64_t time(std::string s="");
// 获取当前时间的格式字符串
static string timeStr(std::string fmt = "%Y-%m-%d %H:%M:%S");
static string timeStr(int64_t ts=0, std::string fmt = "%Y-%m-%d %H:%M:%S");
// 获取当前日期的时间戳(毫秒)
static int64_t date();
// 获取当前日期的格式字符串
static string dateStr(std::string fmt = "%Y-%m-%d %H:%M:%S");
static string dateStr(int64_t ts = 0, std::string fmt = "%Y-%m-%d %H:%M:%S");
static string timeStrMS(std::string fmt = "%Y-%m-%d %H:%M:%S");
//static string timeStr(int64_t ts, std::string fmt = "%Y-%m-%d %H:%M:%S");
@@ -83,6 +83,10 @@ public:
static int random(int min, int max);
static void split(string buf, string c, vector<string>& res);
static std::string readFile(std::string filename);
static std::string toHexStr(int64_t val);
};
class TimeTick