实现HTTP服务架构

This commit is contained in:
lixiaoyuan
2025-08-31 14:38:53 +08:00
parent 4af4e670d2
commit e0b64a20c4
46 changed files with 1436 additions and 545 deletions

View File

@@ -19,10 +19,29 @@
#include "pv/PvUser.h"
#include "rlsocket.h"
#include "protocol/HttpEntity.h"
enum EAA
{
A = 1,
B = 2
};
#define wsa rlwsa
int main(int argc, char** argv)
{
EAA aa = EAA(100);
std::cout << aa;
std::thread([]() {
while (1) {
HttpEntity http;
http.listen("0.0.0.0", 19800);
}
}).detach();
// 设置控制台输出为 UTF-8 编码
SetConsoleOutputCP(CP_UTF8);
// 设置控制台输入为 UTF-8 编码(如果需要输入中文)
@@ -57,8 +76,8 @@ int main(int argc, char** argv)
std::map<int, bool> mapT;
bool ff = mapT[1];
//rlwsa();
//rlSocket socket("127.0.0.1", 19801, 1);
rlwsa();
rlSocket socket("127.0.0.1", 19801, 1);
//int ret = socket.connect();
//std::string s1 = "helloworld";
//socket.write(s1.c_str(), s1.size());