改用自行实现的http读取与解析,同时修复部分bug

This commit is contained in:
2025-12-17 18:13:39 +08:00
parent e0a3f0d3f1
commit a73b317547
7 changed files with 76 additions and 30 deletions

View File

@ -33,9 +33,9 @@ int create_swap(const char *name)
fcntl(fd, F_SETFD, flags);
//调整大小
rbt_msg *init_msg = (rbt_msg*)mmap(NULL, sizeof(rbt_msg), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
char buf[MAX_MESSAGE_BUF] = {'\0'};
char buf[NET_MAX_MESSAGE_BUF] = {'\0'};
//初始化
memcpy(init_msg->raw_message,buf,MAX_MESSAGE_BUF);
memcpy(init_msg->raw_message,buf,NET_MAX_MESSAGE_BUF);
memcpy(init_msg->nickname,buf,64);
sem_init(&init_msg->status,1,1);
init_msg->raw_message[0] = '\0';