From c8a77398ada0caf193efd05abf6823f3ce250f55 Mon Sep 17 00:00:00 2001
From: yzg <1366579099@qq.com>
Date: 星期六, 14 十二月 2024 15:24:55 +0800
Subject: [PATCH] Merge branch 'master' of ssh://115.28.86.8:29418/~admin/脸谱AI_0817_1202

---
 GroupA_何敬治/Server/崔雨/log/日志模板_崔雨_1213.doc          |    0 
 GroupB_马喜龙/Server/卢飞鹏/document/~$志封装、生成.docx       |    0 
 GroupB_马喜龙/Client/李艺斌/log/日志_李艺斌_12.11.doc         |    0 
 GroupB_马喜龙/Server/马喜龙/log/日志_马喜龙_1213.doc          |    0 
 GroupB_马喜龙/Server/马峰/log/日志_马峰_12.13.doc           |    0 
 GroupA_何敬治/Client/何敬治/log/日志_何敬治_1213.doc          |    0 
 GroupB_马喜龙/Client/李艺斌/log/日志_李艺斌_12.13.doc         |    0 
 GroupA_何敬治/Server/武尧/log/日志_武尧_1212.doc            |    0 
 GroupB_马喜龙/Client/石蕊/log/日志模板_石蕊_1213.doc          |    0 
 GroupB_马喜龙/Server/卢飞鹏/log/~$_卢飞鹏_20241213.doc      |    0 
 GroupA_何敬治/Client/邹香华/log/日志_邹香华_20241214.doc      |    0 
 GroupB_马喜龙/Server/马喜龙/code/facepainting_server.zip |    0 
 /dev/null                                          |   39 ---------------------------------------
 GroupA_何敬治/Client/焦涵/log/日志-焦涵-12-12.doc           |    0 
 GroupB_马喜龙/Server/卢飞鹏/log/~WRL0001.tmp             |    0 
 GroupB_马喜龙/Server/马喜龙/log/日志_马喜龙_1214.doc          |    0 
 GroupA_何敬治/Server/丁伟/log/日志_丁伟_12.13.doc           |    0 
 GroupB_马喜龙/Server/马喜龙/log/日志_马喜龙_1212.doc          |    0 
 GroupB_马喜龙/Server/卢飞鹏/log/日报_卢飞鹏_20241213.doc      |    0 
 GroupB_马喜龙/Client/李艺斌/log/日志_李艺斌_12.12.doc         |    0 
 GroupA_何敬治/Server/武尧/log/日志_武尧_1213.doc            |    0 
 GroupA_何敬治/Client/何敬治/log/日志_何敬治_1214.doc          |    0 
 22 files changed, 0 insertions(+), 39 deletions(-)

diff --git "a/GroupA_\344\275\225\346\225\254\346\262\273/Client/\344\275\225\346\225\254\346\262\273/log/\346\227\245\345\277\227_\344\275\225\346\225\254\346\262\273_1213.doc" "b/GroupA_\344\275\225\346\225\254\346\262\273/Client/\344\275\225\346\225\254\346\262\273/log/\346\227\245\345\277\227_\344\275\225\346\225\254\346\262\273_1213.doc"
new file mode 100644
index 0000000..38800bd
--- /dev/null
+++ "b/GroupA_\344\275\225\346\225\254\346\262\273/Client/\344\275\225\346\225\254\346\262\273/log/\346\227\245\345\277\227_\344\275\225\346\225\254\346\262\273_1213.doc"
Binary files differ
diff --git "a/GroupA_\344\275\225\346\225\254\346\262\273/Client/\344\275\225\346\225\254\346\262\273/log/\346\227\245\345\277\227_\344\275\225\346\225\254\346\262\273_1214.doc" "b/GroupA_\344\275\225\346\225\254\346\262\273/Client/\344\275\225\346\225\254\346\262\273/log/\346\227\245\345\277\227_\344\275\225\346\225\254\346\262\273_1214.doc"
new file mode 100644
index 0000000..f588c06
--- /dev/null
+++ "b/GroupA_\344\275\225\346\225\254\346\262\273/Client/\344\275\225\346\225\254\346\262\273/log/\346\227\245\345\277\227_\344\275\225\346\225\254\346\262\273_1214.doc"
Binary files differ
diff --git "a/GroupA_\344\275\225\346\225\254\346\262\273/Client/\347\204\246\346\266\265/log/\346\227\245\345\277\227-\347\204\246\346\266\265-12-12.doc" "b/GroupA_\344\275\225\346\225\254\346\262\273/Client/\347\204\246\346\266\265/log/\346\227\245\345\277\227-\347\204\246\346\266\265-12-12.doc"
new file mode 100644
index 0000000..8c20edf
--- /dev/null
+++ "b/GroupA_\344\275\225\346\225\254\346\262\273/Client/\347\204\246\346\266\265/log/\346\227\245\345\277\227-\347\204\246\346\266\265-12-12.doc"
Binary files differ
diff --git "a/GroupA_\344\275\225\346\225\254\346\262\273/Client/\351\202\271\351\246\231\345\215\216/log/\346\227\245\345\277\227_\351\202\271\351\246\231\345\215\216_20241214.doc" "b/GroupA_\344\275\225\346\225\254\346\262\273/Client/\351\202\271\351\246\231\345\215\216/log/\346\227\245\345\277\227_\351\202\271\351\246\231\345\215\216_20241214.doc"
new file mode 100644
index 0000000..7f46932
--- /dev/null
+++ "b/GroupA_\344\275\225\346\225\254\346\262\273/Client/\351\202\271\351\246\231\345\215\216/log/\346\227\245\345\277\227_\351\202\271\351\246\231\345\215\216_20241214.doc"
Binary files differ
diff --git "a/GroupA_\344\275\225\346\225\254\346\262\273/Server/\344\270\201\344\274\237/log/\346\227\245\345\277\227_\344\270\201\344\274\237_12.13.doc" "b/GroupA_\344\275\225\346\225\254\346\262\273/Server/\344\270\201\344\274\237/log/\346\227\245\345\277\227_\344\270\201\344\274\237_12.13.doc"
new file mode 100644
index 0000000..e16980b
--- /dev/null
+++ "b/GroupA_\344\275\225\346\225\254\346\262\273/Server/\344\270\201\344\274\237/log/\346\227\245\345\277\227_\344\270\201\344\274\237_12.13.doc"
Binary files differ
diff --git "a/GroupA_\344\275\225\346\225\254\346\262\273/Server/\345\264\224\351\233\250/log/\346\227\245\345\277\227\346\250\241\346\235\277_\345\264\224\351\233\250_1213.doc" "b/GroupA_\344\275\225\346\225\254\346\262\273/Server/\345\264\224\351\233\250/log/\346\227\245\345\277\227\346\250\241\346\235\277_\345\264\224\351\233\250_1213.doc"
new file mode 100644
index 0000000..19b04a9
--- /dev/null
+++ "b/GroupA_\344\275\225\346\225\254\346\262\273/Server/\345\264\224\351\233\250/log/\346\227\245\345\277\227\346\250\241\346\235\277_\345\264\224\351\233\250_1213.doc"
Binary files differ
diff --git "a/GroupA_\344\275\225\346\225\254\346\262\273/Server/\346\255\246\345\260\247/log/\346\227\245\345\277\227_\346\255\246\345\260\247_1212.doc" "b/GroupA_\344\275\225\346\225\254\346\262\273/Server/\346\255\246\345\260\247/log/\346\227\245\345\277\227_\346\255\246\345\260\247_1212.doc"
new file mode 100644
index 0000000..9518ed3
--- /dev/null
+++ "b/GroupA_\344\275\225\346\225\254\346\262\273/Server/\346\255\246\345\260\247/log/\346\227\245\345\277\227_\346\255\246\345\260\247_1212.doc"
Binary files differ
diff --git "a/GroupA_\344\275\225\346\225\254\346\262\273/Server/\346\255\246\345\260\247/log/\346\227\245\345\277\227_\346\255\246\345\260\247_1213.doc" "b/GroupA_\344\275\225\346\225\254\346\262\273/Server/\346\255\246\345\260\247/log/\346\227\245\345\277\227_\346\255\246\345\260\247_1213.doc"
new file mode 100644
index 0000000..2eb504b
--- /dev/null
+++ "b/GroupA_\344\275\225\346\225\254\346\262\273/Server/\346\255\246\345\260\247/log/\346\227\245\345\277\227_\346\255\246\345\260\247_1213.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Client/\346\235\216\350\211\272\346\226\214/log/\346\227\245\345\277\227_\346\235\216\350\211\272\346\226\214_12.11.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Client/\346\235\216\350\211\272\346\226\214/log/\346\227\245\345\277\227_\346\235\216\350\211\272\346\226\214_12.11.doc"
new file mode 100644
index 0000000..757c087
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Client/\346\235\216\350\211\272\346\226\214/log/\346\227\245\345\277\227_\346\235\216\350\211\272\346\226\214_12.11.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Client/\346\235\216\350\211\272\346\226\214/log/\346\227\245\345\277\227_\346\235\216\350\211\272\346\226\214_12.12.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Client/\346\235\216\350\211\272\346\226\214/log/\346\227\245\345\277\227_\346\235\216\350\211\272\346\226\214_12.12.doc"
new file mode 100644
index 0000000..4678e80
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Client/\346\235\216\350\211\272\346\226\214/log/\346\227\245\345\277\227_\346\235\216\350\211\272\346\226\214_12.12.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Client/\346\235\216\350\211\272\346\226\214/log/\346\227\245\345\277\227_\346\235\216\350\211\272\346\226\214_12.13.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Client/\346\235\216\350\211\272\346\226\214/log/\346\227\245\345\277\227_\346\235\216\350\211\272\346\226\214_12.13.doc"
new file mode 100644
index 0000000..ea19fd1
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Client/\346\235\216\350\211\272\346\226\214/log/\346\227\245\345\277\227_\346\235\216\350\211\272\346\226\214_12.13.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Client/\347\237\263\350\225\212/log/\346\227\245\345\277\227\346\250\241\346\235\277_\347\237\263\350\225\212_1213.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Client/\347\237\263\350\225\212/log/\346\227\245\345\277\227\346\250\241\346\235\277_\347\237\263\350\225\212_1213.doc"
new file mode 100644
index 0000000..f969d06
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Client/\347\237\263\350\225\212/log/\346\227\245\345\277\227\346\250\241\346\235\277_\347\237\263\350\225\212_1213.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/~$_\345\215\242\351\243\236\351\271\217_20241212.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/document/~$\345\277\227\345\260\201\350\243\205\343\200\201\347\224\237\346\210\220.docx"
similarity index 100%
rename from "GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/~$_\345\215\242\351\243\236\351\271\217_20241212.doc"
rename to "GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/document/~$\345\277\227\345\260\201\350\243\205\343\200\201\347\224\237\346\210\220.docx"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/~$_\345\215\242\351\243\236\351\271\217_20241213.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/~$_\345\215\242\351\243\236\351\271\217_20241213.doc"
new file mode 100644
index 0000000..bb12c8a
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/~$_\345\215\242\351\243\236\351\271\217_20241213.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/~WRL0001.tmp" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/~WRL0001.tmp"
new file mode 100644
index 0000000..b92eadd
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/~WRL0001.tmp"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/\346\227\245\346\212\245_\345\215\242\351\243\236\351\271\217_20241213.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/\346\227\245\346\212\245_\345\215\242\351\243\236\351\271\217_20241213.doc"
new file mode 100644
index 0000000..9aedf43
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\345\215\242\351\243\236\351\271\217/log/\346\227\245\346\212\245_\345\215\242\351\243\236\351\271\217_20241213.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/.suo" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/.suo"
deleted file mode 100644
index 5c7d443..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/.suo"
+++ /dev/null
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/Browse.VC.db" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/Browse.VC.db"
deleted file mode 100644
index c0c8a28..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/Browse.VC.db"
+++ /dev/null
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/DocumentLayout.backup.json" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/DocumentLayout.backup.json"
deleted file mode 100644
index 7566fa3..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/DocumentLayout.backup.json"
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-  "Version": 1,
-  "WorkspaceRootPath": "D:\\Projects\\\u8138\u8C31AI_0817_1202\\GroupB_\u9A6C\u559C\u9F99\\Server\\\u9A6C\u559C\u9F99\\code\\face_painting_socket_server\\",
-  "Documents": [],
-  "DocumentGroupContainers": [
-    {
-      "Orientation": 0,
-      "VerticalTabListWidth": 256,
-      "DocumentGroups": [
-        {
-          "DockedWidth": 200,
-          "SelectedChildIndex": -1,
-          "Children": [
-            {
-              "$type": "Bookmark",
-              "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/DocumentLayout.json" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/DocumentLayout.json"
deleted file mode 100644
index 7566fa3..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/DocumentLayout.json"
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-  "Version": 1,
-  "WorkspaceRootPath": "D:\\Projects\\\u8138\u8C31AI_0817_1202\\GroupB_\u9A6C\u559C\u9F99\\Server\\\u9A6C\u559C\u9F99\\code\\face_painting_socket_server\\",
-  "Documents": [],
-  "DocumentGroupContainers": [
-    {
-      "Orientation": 0,
-      "VerticalTabListWidth": 256,
-      "DocumentGroups": [
-        {
-          "DockedWidth": 200,
-          "SelectedChildIndex": -1,
-          "Children": [
-            {
-              "$type": "Bookmark",
-              "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/Solution.VC.db" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/Solution.VC.db"
deleted file mode 100644
index def4881..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/.vs/face_painting_socket_server/v17/Solution.VC.db"
+++ /dev/null
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/ServerSocket.cpp" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/ServerSocket.cpp"
deleted file mode 100644
index 46ef42a..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/ServerSocket.cpp"
+++ /dev/null
@@ -1,187 +0,0 @@
-#include "ServerSocket.h"
-
-ServerSocket::ServerSocket()
-{
-	if (initSocket()) cout << "Socket init successed!" << endl;
-	else cout << "Socket init failed!" << endl;
-}
-
-ServerSocket::~ServerSocket()
-{
-	closesocket(m_server);
-	WSACleanup();
-}
-
-bool ServerSocket::initSocket()
-{
-	WSAData wsa;
-	int val = WSAStartup(MAKEWORD(2, 2), &wsa);
-	if (val != 0)
-	{
-		cout << "WSAStartup failed!"<<endl;
-	}
-
-	m_server = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
-	SOCKADDR_IN addr;
-	addr.sin_family = AF_INET;
-	addr.sin_port = htons(PORT); //处理大小端
-	addr.sin_addr.S_un.S_addr = 0;
-	int ret_bind = bind(m_server, (sockaddr*)&addr, sizeof(addr));
-	if (ret_bind) {
-		cout << "bind fail:" << WSAGetLastError() << endl;
-		return false;
-	}
-	int ret_listen = listen(m_server, 5);
-	if (ret_listen) {
-		cout << "listen fail:" << WSAGetLastError() << endl;
-		return false;
-	}
-	thread accept_thread(&ServerSocket::acceptThread, this);
-	accept_thread.detach(); // 防止异常结束
-
-	thread mMap_Delete(&ServerSocket::mMapDelete, this);
-	mMap_Delete.detach();
-
-	return true;
-}
-
-void ServerSocket::acceptThread()
-{
-	while (true) {
-		SOCKET client;
-		SOCKADDR_IN addr;
-		int len = sizeof(addr);
-		cout << "waiting for connect..." << endl;
-		client = accept(m_server, (sockaddr*)&addr, &len);
-		cout << "client:" << client << endl;
-		if (client == SOCKET_ERROR) {
-			cout << "socket 异常" << WSAGetLastError() << endl;
-			break;
-		}
-		else if (client == 0) {
-			cout << "socket 已关闭:" << WSAGetLastError() << endl;
-			break;
-		}
-		// 正常 连上了
-		// 启动长连接线程,进行交互
-		mMapInsert(client);
-
-		thread heart_check(&ServerSocket::heartBeatThread, this, client);
-		heart_check.detach();
-
-		thread recv_send(&ServerSocket::recvAndSendThread, this, client);
-		recv_send.detach();
-
-	}
-}
-
-void ServerSocket::recvAndSendThread(SOCKET client)
-{
-	while (true)
-	{
-		// 解决粘包问题,顺带也解决了拆包问题
-		char* buffer = new char[sizeof(Head)];
-		int len_recv = recv(client, buffer, sizeof(Head), 0);
-		int head_rest = sizeof(Head) - len_recv; // 剩余长度
-		while (head_rest > 0) {  // 保证数据头能够全收到
-			len_recv = recv(client, buffer + (sizeof(Head) - head_rest), head_rest, 0);
-			head_rest -= len_recv;
-		}
-		Head* head = (Head*)buffer; // 转成对应结构体,再取出封包总长度
-		int len_total = head->len;
-		//int len_total = *(int*)(buffer + 4); // 还可以直接转为Head*,指出长度
-		char* buffer_all = new char[len_total];
-		memcpy(buffer_all, buffer, sizeof(Head)); // 拷贝数据头进总的缓冲区
-
-		int len_rest = len_total - sizeof(Head);
-		while (len_rest > 0) {  // 保证数据体能够全部收到
-			len_recv = recv(client, buffer_all + (len_total - len_rest), len_rest, 0);
-			len_rest -= len_recv;
-		}
-
-		// 正常
-		//m_clientMap[client] = HEART_CHECK_TIMES; // 重置心跳阈值
-
-		int type = *(int*)buffer;
-		if (type == 110) {
-			/*TestSturct2* ts2 = (TestSturct2*)buffer_all; // 转换时,使用总的buffer_all
-			if (ts2) {
-				ts2->a = (char*)ts2 + sizeof(TestSturct2);
-				ts2->b = ts2->a + strlen(ts2->a) + 1;
-				cout << ts2->len;
-				cout << "内容1: " << ts2->a << endl;
-				cout << "内容2: " << ts2->b << endl;
-			}*/
-		}
-		/*else if (type == LOGIN_REQ) {
-			// 登录请求
-			LoginReq* req = (LoginReq*)buffer_all; // 转换时,使用总的buffer_all
-			cout << "用户信息:" << req->user_name << " " << req->password << endl;
-			Login login;
-			login.business(req, client); // 调用业务处理API
-		}*/
-		if (type == HEART_CHECK_REQ) {
-			// 收到心跳请求包,回响应包
-			HeartCheckRes res;
-			send(client, (char*)&res, res.len, 0);
-			cout << "已回复包!" << endl;
-		}
-
-		// 原封不动的回包
-		//send(client, buffer_all, len_total, 0);
-
-		// 用完了,记得释放动态开辟的内存
-		if (buffer)
-		{
-			delete[] buffer;
-			buffer = nullptr; // 防止指针悬空,而产生悬空指针
-		}
-		if (buffer_all) {
-			delete[] buffer_all;
-			buffer_all = nullptr;
-		}
-
-	}
-}
-
-void ServerSocket::heartBeatThread(SOCKET client)
-{
-	while (true)
-	{
-		Sleep(HEARTBEAT_INTERVAL * 1000);
-		mutex heartLock;
-		lock_guard<std::mutex> lock(heartLock);
-		--m_clientMap[client];
-
-	}
-}
-
-void ServerSocket::mMapInsert(SOCKET client)
-{
-	lock_guard<mutex> lg(m_mutex);
-	m_clientMap.insert(make_pair(client, HEART_CHECK_TIMES));
-	cout << "插入成功:times = " << m_clientMap[client] << endl;
-}
-
-void ServerSocket::mMapUpdate(SOCKET client)
-{
-	lock_guard<mutex> lg(m_mutex);
-	m_clientMap.insert(make_pair(client, HEART_CHECK_TIMES));
-}
-
-void ServerSocket::mMapDelete()
-{
-	while (true)
-	{
-		Sleep(HEARTBEAT_INTERVAL * 1000);
-		lock_guard<std::mutex> lock(m_mutex);
-		for (auto& client_socket : m_clientMap) {
-			cout << client_socket.second << endl;
-			if (client_socket.second <= 0) {
-				closesocket(client_socket.first);
-				m_clientMap.erase(client_socket.first);
-				cout << "删除连接成功" << endl;
-			}
-		}
-	}
-}
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/ServerSocket.h" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/ServerSocket.h"
deleted file mode 100644
index e818f09..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/ServerSocket.h"
+++ /dev/null
@@ -1,70 +0,0 @@
-#pragma once
-#include <WinSock2.h>
-#include <iostream>
-#include <map>
-#include <thread>
-#include <mutex>
-#include "ThreadPool.hpp"
-#pragma comment(lib,"ws2_32.lib")
-
-#define PORT 9527
-#define HEART_CHECK_REQ 101
-#define HEART_CHECK_RES 102
-#define HEART_CHECK_TIMES 6
-#define HEARTBEAT_INTERVAL 2
-
-
-
-using namespace std;
-
-struct Head
-{
-	int type; // 区分不同功能类型
-	int len;  // 表示整个封包的长度,是为了后面处理粘包问题的
-};
-
-// 间隔:5秒,阈值为6,递减从6开始,到0或小于0 断开/重连
-// 心跳请求包
-struct HeartCheckReq  
-{
-	int type;
-	int len;
-	HeartCheckReq()
-	{
-		type = 101;
-		len = sizeof(HeartCheckReq);
-	}
-};
-
-// 心跳响应包
-struct HeartCheckRes  
-{
-	int type;
-	int len;
-	HeartCheckRes()
-	{
-		type = 102;
-		len = sizeof(HeartCheckRes);
-	}
-};
-
-class ServerSocket
-{
-public:
-	ServerSocket();
-	virtual ~ServerSocket();
-
-	bool initSocket();
-	void acceptThread();
-	void recvAndSendThread(SOCKET client);
-	void heartBeatThread(SOCKET client);
-
-	void mMapInsert(SOCKET client);
-	void mMapUpdate(SOCKET client);
-	void mMapDelete();
-private:
-	SOCKET m_server;
-	map<SOCKET, int> m_clientMap;
-	mutex m_mutex;
-};
-
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/ThreadPool.hpp" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/ThreadPool.hpp"
deleted file mode 100644
index a2986bc..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/ThreadPool.hpp"
+++ /dev/null
@@ -1,147 +0,0 @@
-#pragma once
-#include <iostream>
-#include <mutex>
-#include <atomic>
-#include <condition_variable>
-#include <queue>
-#include <string>
-
-using namespace std;
-
-template<typename Task, const size_t DEFAULT_THREAD_NUM, const size_t MAX_THREAD_NUM>
-class ThreadPool
-{
-public:
-	ThreadPool() = delete;
-	ThreadPool(const ThreadPool&) = delete;
-	ThreadPool& operator=(const ThreadPool&) = delete;
-	ThreadPool(ThreadPool&&) = delete;
-	ThreadPool& operator=(ThreadPool&&) = delete;
-
-	explicit ThreadPool(uint32_t timeout) :m_timeout(timeout), m_needRun(true)
-	{
-		for (int i = 0; i < DEFAULT_THREAD_NUM; i++)
-		{
-			thread([this] { RunTask(); }).detach();
-		}
-	}
-	~ThreadPool() {
-		m_needRun = false;
-		while (m_runningThreadNum > 0)
-		{
-			m_needRunCondition.notify_all();
-		}
-
-	}
-	void Push(Task& task) {
-		PushTask(task);
-		if (m_runningThreadNum < MAX_THREAD_NUM && m_idleThreadNum == 0)
-		{
-			thread([this] { RunTask(); }).detach();
-		}
-		m_needRunCondition.notify_all();
-	}
-private:
-	bool IsQueueEmpty() {
-		lock_guard<mutex> lg(m_mutex);
-		return m_taskQueue.empty();
-	}
-	bool GetTask(Task& task) {
-		lock_guard<mutex> lg(m_mutex);
-		if (m_taskQueue.empty())
-		{
-			return false;
-		}
-		task = m_taskQueue.top();
-		m_taskQueue.pop();
-		return true;
-	}
-	class NumWrapper
-	{
-	public:
-		NumWrapper() = delete;
-		NumWrapper(atomic<uint32_t>& num) :m_num(num) { m_num++; }
-		~NumWrapper() { m_num--; }
-
-	private:
-		atomic<uint32_t>& m_num;
-	};
-
-	void Sleep() {
-		mutex needRunMutex;
-		unique_lock<mutex> lock(needRunMutex);
-
-		NumWrapper idleWraper(m_idleThreadNum);
-		(void)idleWraper;
-
-		m_needRunCondition.wait_for(lock, std::chrono::seconds(m_timeout),
-			[this] { return !m_needRun || !IsQueueEmpty(); });
-	}
-	void PushTask(const Task& task) {
-		lock_guard<mutex> lg(m_mutex);
-		m_taskQueue.push(task);
-	}
-	void RunTask() {
-		NumWrapper runWraper(m_runningThreadNum);
-		(void)runWraper;
-
-		while (m_needRun)
-		{
-			Task task;
-			if (GetTask(task))
-			{
-				task.Execute();
-				continue;
-			}
-			Sleep();
-
-			if (!m_needRun)
-			{
-				return;
-			}
-			if (GetTask(task))
-			{
-				task.Execute();
-				continue;
-			}
-			if (m_runningThreadNum > DEFAULT_THREAD_NUM)
-			{
-				return;
-			}
-		}
-	}
-
-private:
-	atomic<uint32_t> m_idleThreadNum;
-	atomic<uint32_t> m_runningThreadNum;
-	atomic_bool m_needRun;
-
-	mutex m_mutex;
-	condition_variable m_needRunCondition;
-	uint32_t m_timeout;
-	priority_queue<Task> m_taskQueue;
-};
-
-class Task
-{
-public:
-	Task() :m_priority(0) {};
-	explicit Task(string context) :m_priority(0) {
-		m_context = context;
-	}
-
-	bool operator<(const Task& t) const {
-		return m_priority < t.m_priority;
-	}
-
-	void Execute() {
-		lock_guard<mutex> lg(m_mutex);
-		cout << "Task is executed,name is" << m_context << endl;
-	}
-
-public:
-	uint32_t m_priority;
-private:
-	string m_context;
-	static mutex m_mutex;
-};
\ No newline at end of file
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/face_painting_socket_server.sln" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/face_painting_socket_server.sln"
deleted file mode 100644
index 079f4ad..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/face_painting_socket_server.sln"
+++ /dev/null
@@ -1,28 +0,0 @@
-锘�
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.12.35521.163 d17.12
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "face_painting_socket_server", "face_painting_socket_server.vcxproj", "{8F47EF20-7DBA-475C-ABA7-C468E46049F2}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|x64 = Debug|x64
-		Debug|x86 = Debug|x86
-		Release|x64 = Release|x64
-		Release|x86 = Release|x86
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{8F47EF20-7DBA-475C-ABA7-C468E46049F2}.Debug|x64.ActiveCfg = Debug|x64
-		{8F47EF20-7DBA-475C-ABA7-C468E46049F2}.Debug|x64.Build.0 = Debug|x64
-		{8F47EF20-7DBA-475C-ABA7-C468E46049F2}.Debug|x86.ActiveCfg = Debug|Win32
-		{8F47EF20-7DBA-475C-ABA7-C468E46049F2}.Debug|x86.Build.0 = Debug|Win32
-		{8F47EF20-7DBA-475C-ABA7-C468E46049F2}.Release|x64.ActiveCfg = Release|x64
-		{8F47EF20-7DBA-475C-ABA7-C468E46049F2}.Release|x64.Build.0 = Release|x64
-		{8F47EF20-7DBA-475C-ABA7-C468E46049F2}.Release|x86.ActiveCfg = Release|Win32
-		{8F47EF20-7DBA-475C-ABA7-C468E46049F2}.Release|x86.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/main.cpp" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/main.cpp"
deleted file mode 100644
index 7f17ae5..0000000
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/face_painting_socket_server/main.cpp"
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <iostream>
-#include "ServerSocket.h"
-#include "ThreadPool.hpp"
-using namespace std;
-
-#define DEFAULT_THREAD_NUM 3
-#define MAX_THREAD_NUM 6
-#define TIME_OUT 500
-mutex Task::m_mutex;
-
-int main() {
-	ServerSocket server1;
-	string cmd;
-	while (cin>>cmd)
-	{
-		if (cmd == "quit") {
-			break;
-		}
-	}
-
-	/*ThreadPool<Task, DEFAULT_THREAD_NUM, MAX_THREAD_NUM> threadPool_(TIME_OUT);
-	Task task1("name_1");
-	Task task2("name_2");
-	Task task3("name_3");
-	Task task4("name_4");
-
-	task4.m_priority = 4;
-	task3.m_priority = 8;
-	task2.m_priority = 2;
-	task1.m_priority = 5;
-
-	threadPool_.Push(task1);
-	threadPool_.Push(task2);
-	threadPool_.Push(task3);
-	threadPool_.Push(task4);*/
-
-	system("pause");
-	return 0;
-}
\ No newline at end of file
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/facepainting_server.zip" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/facepainting_server.zip"
new file mode 100644
index 0000000..efd3707
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/code/facepainting_server.zip"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1212.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1212.doc"
index 24668b1..dbd13ca 100644
--- "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1212.doc"
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1212.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1213.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1213.doc"
new file mode 100644
index 0000000..4ab026b
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1213.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1214.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1214.doc"
new file mode 100644
index 0000000..b15245e
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\226\234\351\276\231/log/\346\227\245\345\277\227_\351\251\254\345\226\234\351\276\231_1214.doc"
Binary files differ
diff --git "a/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\263\260/log/\346\227\245\345\277\227_\351\251\254\345\263\260_12.13.doc" "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\263\260/log/\346\227\245\345\277\227_\351\251\254\345\263\260_12.13.doc"
new file mode 100644
index 0000000..fa71b6e
--- /dev/null
+++ "b/GroupB_\351\251\254\345\226\234\351\276\231/Server/\351\251\254\345\263\260/log/\346\227\245\345\277\227_\351\251\254\345\263\260_12.13.doc"
Binary files differ

--
Gitblit v1.8.0