{"id":57131,"date":"2025-08-15T08:01:03","date_gmt":"2025-08-15T00:01:03","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/57131.html"},"modified":"2025-08-15T08:01:03","modified_gmt":"2025-08-15T00:01:03","slug":"tinywebserver-v2%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%a2%9e%e5%8a%a0%e4%b8%8a%e4%bc%a0%e5%92%8c%e4%b8%8b%e8%bd%bd%e6%96%87%e4%bb%b6%e5%8a%9f%e8%83%bd%ef%bc%8c%e6%9c%80%e5%b0%8f%e5%a0%86%e4%bb%a3%e6%9b%bf","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/57131.html","title":{"rendered":"TinyWebServer-v2\u670d\u52a1\u5668\u589e\u52a0\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\uff0c\u6700\u5c0f\u5806\u4ee3\u66ff\u53cc\u94fe\u8868\uff0c\u754c\u9762\u7f8e\u5316\u4ee5\u53ca\u670d\u52a1\u5668\u751f\u6210session id\u548c\u6d4f\u89c8\u5668\u4fdd\u5b58cookie\u5b9e\u73b0\uff08C\/C++\uff09"},"content":{"rendered":"<\/p>\n<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E6%BA%90%E7%A0%81%E4%B8%8B%E8%BD%BD-toc\" style=\"margin-left:80px\">\u6e90\u7801\u4e0b\u8f7d<\/p>\n<p id=\"%E5%89%8D%E7%BD%AE%E7%82%B9-toc\" style=\"margin-left:80px\">\u524d\u7f6e\u70b9<\/p>\n<p id=\"%E9%A1%B9%E7%9B%AE%E6%BC%94%E7%A4%BA-toc\" style=\"margin-left:80px\">\u9879\u76ee\u6f14\u793a<\/p>\n<p id=\"%E6%B6%89%E5%8F%8A%E7%9F%A5%E8%AF%86%E7%82%B9-toc\" style=\"margin-left:80px\">\u6d89\u53ca\u77e5\u8bc6\u70b9<\/p>\n<p id=\"%E6%9C%AC%E6%96%87%E7%9A%84%E6%94%B9%E8%BF%9B%E5%92%8C%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD-toc\" style=\"margin-left:80px\">\u672c\u6587\u7684\u6539\u8fdb\u548c\u65b0\u589e\u529f\u80fd<\/p>\n<p id=\"%E6%9C%80%E5%B0%8F%E5%A0%86%E8%AE%B0%E5%BD%95%E5%AE%9A%E6%97%B6%E5%99%A8-toc\" style=\"margin-left:120px\">\u6700\u5c0f\u5806\u8bb0\u5f55\u5b9a\u65f6\u5668<\/p>\n<p id=\"%E4%B8%8A%E4%BC%A0%E6%96%87%E4%BB%B6%E5%8A%9F%E8%83%BD-toc\" style=\"margin-left:120px\">\u4e0a\u4f20\u6587\u4ef6\u529f\u80fd<\/p>\n<p id=\"%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6-toc\" style=\"margin-left:120px\">\u4e0b\u8f7d\u6587\u4ef6<\/p>\n<p id=\"%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%94%9F%E6%88%90session%20id%E5%92%8C%E4%BF%9D%E5%AD%98cookie%E7%8A%B6%E6%80%81-toc\" style=\"margin-left:120px\">\u670d\u52a1\u5668\u751f\u6210session id\u548c\u4fdd\u5b58cookie\u72b6\u6001<\/p>\n<p id=\"%E6%A0%B8%E5%BF%83%E4%BB%A3%E7%A0%81-toc\" style=\"margin-left:160px\">\u6838\u5fc3\u4ee3\u7801<\/p>\n<p id=\"%E8%A7%A3%E6%9E%90session%20id-toc\" style=\"margin-left:160px\">\u89e3\u6790session id<\/p>\n<p id=\"webbench%E5%8E%8B%E6%B5%8B-toc\" style=\"margin-left:80px\">Webbench\u538b\u6d4b<\/p>\n<p id=\"%E4%B8%8B%E8%BD%BD%E5%B9%B6%E7%BC%96%E8%AF%91-toc\" style=\"margin-left:120px\">\u4e0b\u8f7d\u5e76\u7f16\u8bd1<\/p>\n<p id=\"%E5%BC%80%E5%A7%8B%E5%8E%8B%E6%B5%8B-toc\" style=\"margin-left:120px\">\u5f00\u59cb\u538b\u6d4b<\/p>\n<p id=\"%E5%8F%AF%E8%83%BD%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98-toc\" style=\"margin-left:80px\">\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898<\/p>\n<p id=\"%E5%BA%96%E4%B8%81%E8%A7%A3%E7%89%9B%E6%9D%A5%E8%87%AA%E5%8E%9F%E6%96%87-toc\" style=\"margin-left:80px\">\u5e96\u4e01\u89e3\u725b&#xff08;\u6765\u81ea\u539f\u6587&#xff09;<\/p>\n<p id=\"cpp11%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:80px\">CPP11\u5b9e\u73b0<\/p>\n<p id=\"%E8%87%B4%E8%B0%A2-toc\" style=\"margin-left:80px\">\u81f4\u8c22<\/p>\n<hr id=\"hr-toc\" \/>\n<\/p>\n<h4 id=\"%E6%BA%90%E7%A0%81%E4%B8%8B%E8%BD%BD\">\u6e90\u7801\u4e0b\u8f7d<\/h4>\n<p>\u89c6\u9891\u8bb2\u89e3&#xff1a;TinyWebServer\u670d\u52a1\u5668\u8bb2\u89e3<\/p>\n<p>TinyWebServer\u6e90\u4ee3\u7801&#xff1a;https:\/\/github.com\/markparticle\/WebServer<\/p>\n<p>TinyWebServer-v2\u6e90\u4ee3\u7801&#xff08;\u672c\u6587&#xff09;&#xff1a;https:\/\/github.com\/KeepTryingTo\/TinyWebServer-v2<\/p>\n<p>Linux\u4e0bC&#043;&#043;\u8f7b\u91cf\u7ea7Web\u670d\u52a1\u5668&#xff0c;\u52a9\u529b\u521d\u5b66\u8005\u5feb\u901f\u5b9e\u8df5\u7f51\u7edc\u7f16\u7a0b&#xff0c;\u642d\u5efa\u5c5e\u4e8e\u81ea\u5df1\u7684\u670d\u52a1\u5668&#xff08;\u8fd9\u662fTinyWebServer\u539f\u4f5c\u8005\u5b9e\u73b0\u8fd9\u4e2a\u9879\u76ee\u7684\u76ee\u7684&#xff09;.<\/p>\n<\/p>\n<h4 id=\"%E5%89%8D%E7%BD%AE%E7%82%B9\">\u524d\u7f6e\u70b9<\/h4>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5176\u5b9e\u5728\u5bf9TinyWebServer\u4fee\u6539\u4e4b\u540e\u662f\u5426\u8981\u5f00\u6e90\u51fa\u6765\u5176\u5b9e\u662f\u975e\u5e38\u7ea0\u7ed3\u7684&#xff0c;\u5012\u4e0d\u662f\u8bf4\u4ee3\u7801\u5f00\u4e0d\u5f00\u6e90\u95ee\u9898&#xff0c;\u800c\u662fTinyWebServer\u539f\u4f5c\u8005\u7684\u76ee\u7684\u5c31\u662f\u60f3\u8981\u505a\u4e00\u4e2a\u5c3d\u91cf\u5168\u800c\u8f7b\u91cf\u7684Web\u670d\u52a1\u5668&#xff0c;\u5982\u679c\u6dfb\u52a0\u4e0a\u4f20\u6587\u4ef6\u4ee5\u53ca\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\u4e4b\u540e&#xff0c;\u4f1a\u8ba9\u4ee3\u7801\u53d8\u5f97\u66f4\u5e9e\u5927&#xff0c;\u540c\u65f6\u5bf9\u4e8e\u521d\u5b66\u8005\u6216\u8005\u6211\u4eec\u81ea\u5df1\u5728\u770b\u7684\u65f6\u5019\u975e\u5e38\u4e0d\u5229&#xff0c;\u8fd9\u4e5f\u8fdd\u80cc\u4e86TinyWebServer\u539f\u4f5c\u8005\u5199\u8fd9\u4e2a\u9879\u76ee\u7684\u521d\u5fc3\u3002\u672c\u6765\u662f\u60f3\u548c\u539f\u4f5c\u8005\u6c9f\u901a\u662f\u5426\u53ef\u4ee5\u5408\u5e76\u5230\u5206\u652f\u91cc\u9762&#xff0c;\u4f46\u662f\u60f3\u4e86\u4e00\u4e0b\u8fd8\u662f\u4e0d\u8981\u4e86&#xff0c;\u8fd9\u6837\u786e\u5b9e\u4f1a\u8ba9\u4ee3\u7801\u53d8\u5f97\u66f4\u81c3\u80bf\u548c\u4e0d\u53cb\u597d&#xff0c;\u51b3\u5b9a\u8fd8\u662f\u53e6\u8d77\u4e00\u4e2a\u9879\u76ee&#xff0c;\u8fd9\u6837\u5927\u5bb6\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u6765\u5b66\u4e60\u8fd9\u4e2a\u9879\u76ee\u3002\u5728\u6539\u8fdb&#xff0c;\u7f8e\u5316\u754c\u9762\u4ee5\u53ca\u6dfb\u52a0\u7684\u529f\u80fd\u7684\u8fc7\u7a0b\u4e2d\u6211\u662f\u501f\u52a9\u4e86AI\u7684&#xff0c;\u751a\u81f3\u4f60\u7528AI\u53ef\u80fd\u641c\u51fa\u6765\u7684\u4ee3\u7801\u548c\u6211\u653e\u5728\u4e0a\u9762\u7684\u4e00\u6837&#xff08;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"18\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000056-689e78b8533db.png\" width=\"18\" \/>&#xff09;\u3002\u6211\u4e3b\u8981\u7684\u6539\u8fdb\u5305\u62ec\u4f7f\u7528\u6700\u5c0f\u5806\u5c06\u539f\u4f5c\u8005\u7684\u53cc\u5411\u94fe\u8868\u7ed9\u66ff\u6362\u4e86&#xff0c;\u4f46\u662f\u5728\u8fdb\u884c\u538b\u6d4b\u7684\u65f6\u5019\u5176\u5b9eQPS\u90fd\u5dee\u4e0d\u591a&#xff1b;\u5176\u6b21\u662f\u5c06\u6240\u6709\u7684\u754c\u9762\u7ed9\u7f8e\u5316\u4e86&#xff0c;\u8fd9\u90e8\u5206\u9700\u8981\u81ea\u5df1\u6709HTML,CSS,JAVAScript\u7684\u57fa\u7840&#xff08;AI&#xff09;;\u6700\u540e\u662f\u6dfb\u52a0\u4e86\u4e0a\u4f20\u6587\u4ef6\u548c\u4e0b\u8f7d\u6587\u4ef6\u7684\u529f\u80fd\u3002\u5176\u5b9e\u6211\u505a\u7684\u6539\u8fdb\u548c\u65b0\u589e\u529f\u80fd\u5bf9\u4e8e\u539f\u4f5c\u8005\u6765\u8bf4\u975e\u5e38\u7b80\u5355&#xff0c;\u8fd9\u4e5f\u662f\u539f\u4f5c\u8005\u5bf9\u8f7b\u91cf\u7684\u521d\u5fc3&#xff0c;\u53ea\u662f\u6211\u81ea\u5df1\u60f3\u8981\u53bb\u66f4\u6df1\u5165\u7684\u4e86\u89e3\u4ee5\u53ca\u8fbe\u5230\u81ea\u5df1\u7684\u76ee\u7684\u624d\u6dfb\u52a0\u529f\u80fd\u7684&#xff0c;\u5e76\u6ca1\u6709\u8fdd\u80cc\u539f\u4f5c\u8005\u7684\u60f3\u6cd5\u3002<\/p>\n<\/p>\n<h4 id=\"%E9%A1%B9%E7%9B%AE%E6%BC%94%E7%A4%BA\">\u9879\u76ee\u6f14\u793a<\/h4>\n<p>web\u670d\u52a1\u5668\u6f14\u793a<\/p>\n<\/p>\n<h4 id=\"%E6%B6%89%E5%8F%8A%E7%9F%A5%E8%AF%86%E7%82%B9\">\u6d89\u53ca\u77e5\u8bc6\u70b9<\/h4>\n<ul>\n<li>\u4f7f\u7528\u00a0\u7ebf\u7a0b\u6c60 &#043; \u975e\u963b\u585esocket &#043; epoll(ET\u548cLT\u5747\u5b9e\u73b0) &#043; \u4e8b\u4ef6\u5904\u7406(Reactor\u548c\u6a21\u62dfProactor\u5747\u5b9e\u73b0)\u00a0\u7684\u5e76\u53d1\u6a21\u578b<\/li>\n<li>\u4f7f\u7528\u72b6\u6001\u673a&#xff08;\u4e3b\u4ece\u72b6\u6001\u673a\u7ed3\u5408&#xff09;\u89e3\u6790HTTP\u8bf7\u6c42\u62a5\u6587&#xff0c;\u652f\u6301\u89e3\u6790GET\u548cPOST\u8bf7\u6c42<\/li>\n<li>\u8bbf\u95ee\u670d\u52a1\u5668\u6570\u636e\u5e93\u5b9e\u73b0web\u7aef\u7528\u6237\u6ce8\u518c\u3001\u767b\u5f55\u529f\u80fd&#xff0c;\u53ef\u4ee5\u8bf7\u6c42\u670d\u52a1\u5668\u56fe\u7247\u548c\u89c6\u9891\u6587\u4ef6<\/li>\n<li>\u5b9e\u73b0\u540c\u6b65\/\u5f02\u6b65\u65e5\u5fd7\u7cfb\u7edf&#xff08;\u751f\u4ea7\u8005\u548c\u6d88\u8d39\u8005\u6a21\u5f0f&#xff09;&#xff0c;\u8bb0\u5f55\u670d\u52a1\u5668\u8fd0\u884c\u72b6\u6001<\/li>\n<li>\u7ecfWebbench\u538b\u529b\u6d4b\u8bd5\u53ef\u4ee5\u5b9e\u73b0\u4e0a\u4e07\u7684\u5e76\u53d1\u8fde\u63a5\u6570\u636e\u4ea4\u6362<\/li>\n<li>\u5b9e\u73b0\u7ebf\u7a0b\u6c60\u548c\u6570\u636e\u5e93\u8fde\u63a5\u6c60<\/li>\n<\/ul>\n<h4 id=\"%E6%9C%AC%E6%96%87%E7%9A%84%E6%94%B9%E8%BF%9B%E5%92%8C%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD\">\u672c\u6587\u7684\u6539\u8fdb\u548c\u65b0\u589e\u529f\u80fd<\/h4>\n<ul>\n<li>[\u221a] \u6700\u5c0f\u5806\u66ff\u6362\u539f\u4f5c\u8005\u5b9e\u73b0\u7684\u53cc\u5411\u94fe\u8868<\/li>\n<li>[\u221a] \u5b9e\u73b0\u4e86\u4e0a\u4f20\u6587\u4ef6\u529f\u80fd<\/li>\n<li>[\u221a] \u5b9e\u73b0\u4e86\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd<\/li>\n<li>[\u221a] \u7f8e\u5316\u4e86\u6240\u6709\u754c\u9762<\/li>\n<li>\n<p>[\u221a] \u670d\u52a1\u5668\u751f\u6210session id\u548c\u4fdd\u5b58cookie\u72b6\u6001&#xff0c;\u8fc7\u671f\u65f6\u95f4\u8bbe\u7f6e\u4e3a30\u5206\u949f<\/p>\n<\/li>\n<\/ul>\n<p>\u6ce8&#xff1a;\u6574\u4e2a\u6539\u8fdb\u7684\u8fc7\u7a0b\u4e2d\u5f88\u591a\u65f6\u5019\u90fd\u501f\u52a9\u4e86AI&#xff0c;\u7279\u522b\u662f\u7f8e\u5316\u754c\u9762\u90e8\u5206\u3002<\/p>\n<\/p>\n<h5 id=\"%E6%9C%80%E5%B0%8F%E5%A0%86%E8%AE%B0%E5%BD%95%E5%AE%9A%E6%97%B6%E5%99%A8\">\u6700\u5c0f\u5806\u8bb0\u5f55\u5b9a\u65f6\u5668<\/h5>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5b9e\u73b0\u5806\u7684\u8fc7\u7a0b\u4e2d\u4e3b\u8981\u5305\u542b\u4e86\u5411\u4e0a\u8c03\u6574\u5806&#xff0c;\u5411\u4e0b\u8c03\u6574\u5806&#xff0c;\u6dfb\u52a0\u8282\u70b9&#xff0c;\u5220\u9664\u5806\u9876\u8282\u70b9\u4ee5\u53ca\u5220\u9664\u6307\u5b9a\u8282\u70b9.\u8fd9\u91cc\u7684\u8282\u70b9\u662f\u6307\u5b9a\u65f6\u5668&#xff0c;\u662f\u6839\u636e\u5b9a\u65f6\u5668\u65f6\u95f4\u5927\u5c0f\u6765\u8fdb\u884c\u6784\u5efa\u6700\u5c0f\u5806\u7684&#xff0c;\u5e76\u4e14\u4fdd\u5b58\u8282\u70b9\u91c7\u7528\u7684\u662fvector\u6570\u7ec4\u4ee5\u53ca\u54c8\u5e0cmap\u6765\u8bb0\u5f55\u5f53\u524d\u8282\u70b9\u7684\u7d22\u5f15&#xff08;\u5efa\u8bae\u5927\u5bb6\u76f4\u63a5\u5728\u7f51\u4e0a\u641c\u7d22\u770b\u8d44\u6599\u6216\u8005\u89c6\u9891\u66f4\u6e05\u695a&#xff09;\u3002<\/p>\n<ul>\n<li>\u5411\u4e0a\u8c03\u6574\u5806&#xff1a;\u5c06\u5f53\u524d\u8282\u70b9\u5bf9\u5e94\u65f6\u95f4\u548c\u7236\u8282\u70b9\u5bf9\u5e94\u65f6\u95f4\u8fdb\u884c\u6bd4\u8f83&#xff0c;\u5982\u679c\u5c0f\u4e8e\u7236\u8282\u70b9\u7684\u65f6\u95f4\u5c31\u4ea4\u6362&#xff0c;\u540c\u65f6\u54c8\u5e0cmap\u8bb0\u5f55\u7684\u7d22\u5f15\u4e5f\u9700\u8981\u4ea4\u6362&#xff0c;\u56e0\u4e3a\u4f7f\u7528vector\u6570\u7ec4\u4fdd\u5b58\u7684\u8282\u70b9\u3002<\/li>\n<li>\u5411\u4e0b\u8c03\u6574\u5806&#xff1a;\u5c06\u5f53\u524d\u8282\u70b9\u548c\u5176\u5de6\u53f3\u5b50\u8282\u70b9\u7684\u65f6\u95f4\u8fdb\u884c\u5bf9\u6bd4&#xff0c;\u9009\u62e9\u6700\u5c0f\u7684\u5b69\u5b50\u65f6\u95f4\u8282\u70b9\u8fdb\u884c\u4ea4\u6362&#xff0c;\u54c8\u5e0cmap\u8bb0\u5f55\u7684\u7d22\u5f15\u4e5f\u9700\u8981\u8fdb\u884c\u4ea4\u6362\u3002<\/li>\n<li>\u6dfb\u52a0\u8282\u70b9&#xff1a;\u76f4\u63a5\u5728vector\u6570\u7ec4\u6700\u540e\u6dfb\u52a0\u8282\u70b9&#xff0c;\u540c\u65f6\u54c8\u5e0cmap\u8bb0\u5f55\u7d22\u5f15&#xff0c;\u6700\u540e\u8c03\u7528\u5411\u4e0a\u8c03\u6574\u51fd\u6570\u8c03\u6574\u5806\u5373\u53ef\u3002<\/li>\n<li>\u5220\u9664\u5806\u9876\u8282\u70b9&#xff1a;\u5982\u679c\u76f4\u63a5\u5220\u9664\u5806\u9876\u8282\u70b9\u6bd4\u8f83\u590d\u6742&#xff0c;\u56e0\u6b64\u5c06\u5806\u9876\u8282\u70b9\u548c\u6700\u540e\u4e00\u4e2a\u8282\u70b9\u8fdb\u884c\u4ea4\u6362&#xff0c;\u5220\u9664\u6700\u540e\u4e00\u4e2a\u8282\u70b9&#xff0c;\u540c\u65f6\u8c03\u7528\u5411\u4e0b\u8c03\u6574\u51fd\u6570\u5373\u53ef\u6062\u590d\u6700\u5c0f\u5806\u7ed3\u6784\u3002<\/li>\n<li>\u5220\u9664\u6307\u5b9a\u8282\u70b9&#xff1a;\u5982\u679c\u76f4\u63a5\u5220\u9664\u6307\u5b9a\u8282\u70b9\u6bd4\u8f83\u9ebb\u70e6&#xff0c;\u548c\u5220\u9664\u5806\u9876\u8282\u70b9\u4e00\u6837&#xff0c;\u5c06\u5176\u548c\u6700\u540e\u4e00\u4e2a\u8282\u70b9\u8fdb\u884c\u4ea4\u6362&#xff0c;\u5e76\u5220\u9664\u6700\u540e\u4e00\u4e2a\u8282\u70b9&#xff0c;\u540c\u65f6\u4ece\u5220\u9664\u5f53\u524d\u8282\u70b9\u4f4d\u7f6e\u8c03\u7528\u5411\u4e0b\u548c\u5411\u4e0a\u8c03\u6574\u51fd\u6570\u5373\u53ef\u6062\u590d\u6700\u5c0f\u5806\u7ed3\u6784\u3002<\/li>\n<\/ul>\n<h5 id=\"%E4%B8%8A%E4%BC%A0%E6%96%87%E4%BB%B6%E5%8A%9F%E8%83%BD\">\u4e0a\u4f20\u6587\u4ef6\u529f\u80fd<\/h5>\n<p>\u4e0a\u4f20\u6587\u4ef6\u65f6\u9700\u8981\u6ce8\u610f\u7684\u95ee\u9898\u6bd4\u8f83\u591a&#xff0c;\u5177\u4f53\u5b9e\u73b0\u5927\u5bb6\u53ef\u4ee5\u770b\u6e90\u4ee3\u7801&#xff0c;\u4e3b\u8981\u95ee\u9898\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>\u539f\u4f5c\u8005\u5b9e\u73b0\u7684\u4ee3\u7801\u5bf9\u4e8e\u8bf7\u6c42body\u90e8\u5206\u5927\u5c0f\u662f\u6709\u9650\u7684&#xff0c;\u5982\u679c\u76f4\u63a5\u5bf9\u5176\u7f13\u51b2\u533a\u5927\u5c0f\u8fdb\u884c\u8c03\u6574&#xff0c;\u5c06\u62a5\u9519std::bad_alloc&#xff0c;\u56e0\u6b64\u5bf9\u4e8e\u7a0d\u5fae\u5c0f\u7684\u6587\u4ef6\u53ef\u4ee5\u4e00\u6b21\u8bf7\u6c42\u6210\u529f&#xff0c;\u4f46\u662f\u5bf9\u4e8e\u7a0d\u5fae\u5927\u4e00\u70b9\u7684&#xff0c;\u6bd4\u59821KB\u5c31\u4f1a\u4e0a\u4f20\u5931\u8d25\u3002<\/li>\n<li>\u4e3a\u4e86\u5b9e\u73b0\u4e0a\u4f20\u7a0d\u5fae\u5927\u4e00\u70b9\u7684\u6587\u4ef6&#xff0c;\u8fd9\u91cc\u91c7\u7528\u6bd4\u8f83\u7c97\u66b4\u7684\u5f62\u5f0f&#xff0c;\u65e2\u7136\u4e00\u6b21\u4e0a\u4f20\u4e0d\u5b8c\u6240\u6709\u6587\u4ef6\u5185\u5bb9&#xff0c;\u90a3\u4e48\u53ef\u4ee5\u5206\u6279\u6b21\u8bf7\u6c42\u4e0a\u4f20\u6587\u4ef6\u5185\u5bb9&#xff0c;\u7136\u540e\u5c06\u6240\u6709\u4e0a\u4f20\u7684\u5185\u5bb9\u8fdb\u884c\u5408\u5e76\u5f97\u5230\u5b8c\u6574\u7684\u6587\u4ef6\u5185\u5bb9&#xff0c;\u8fd9\u662f\u76ee\u524d\u7684\u5b9e\u73b0\u65b9\u5f0f&#xff0c;\u540c\u65f6\u4e5f\u4f1a\u5c06\u5206\u5757\u4fdd\u5b58\u7684\u6587\u4ef6\u7ed9\u5220\u9664\u6389\u3002<\/li>\n<li>\u9664\u4e86\u540e\u7aef\u903b\u8f91\u5b9e\u73b0\u90e8\u5206\u4e4b\u5916&#xff0c;\u8fd8\u9700\u8981\u6ce8\u610f\u524d\u7aef\u90e8\u5206\u7684\u5b9e\u73b0&#xff0c;\u54ea\u6015\u501f\u52a9AI\u4e5f\u9700\u8981\u975e\u5e38\u5c0f\u5fc3\u548c\u5927\u91cf\u7684\u8c03\u6574\u3002<\/li>\n<li>\u524d\u7aef\u90e8\u5206\u9664\u4e86\u5b9e\u73b0upload.html\u9875\u9762\u4e4b\u5916&#xff0c;\u8fd8\u9700\u8981\u8003\u8651\u5206\u5757\u4e0a\u4f20\u6587\u4ef6\u7684\u8fc7\u7a0b&#xff0c;\u8fd9\u90e8\u5206\u6d89\u53caHTML,CSS\u4ee5\u53caJavaScript\u77e5\u8bc6\u70b9&#xff0c;\u5927\u5bb6\u53ef\u4ee5\u53bb\u4e86\u89e3\u4e00\u4e0b&#xff0c;\u6211\u4e5f\u8fb9\u5199\u540c\u65f6\u501f\u52a9AI\u6765\u4e86\u89e3\u3002<\/li>\n<\/ul>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"708\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000056-689e78b85f615.png\" width=\"1473\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"969\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000056-689e78b8b70f3.png\" width=\"1623\" \/><\/p>\n<\/p>\n<h5 id=\"%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6\">\u4e0b\u8f7d\u6587\u4ef6<\/h5>\n<p>\u4e0b\u8f7d\u6587\u4ef6\u7684\u5b9e\u73b0\u76f8\u6bd4\u4e0a\u4f20\u6587\u4ef6\u8981\u7b80\u6d01\u7684\u591a&#xff0c;\u5f53\u7136\u5e76\u4e0d\u4ee3\u8868\u7b80\u5355&#xff0c;\u5982\u4e0b\u95ee\u9898&#xff1a;<\/p>\n<ul>\n<li>\u8fd9\u90e8\u5206\u9996\u5148\u9700\u8981\u5b9e\u73b0download.html\u524d\u7aef\u90e8\u5206\u7684\u7f51\u9875&#xff0c;\u5b9e\u73b0\u7684\u8fc7\u7a0b\u4e2d\u9700\u8981\u8003\u8651\u600e\u4e48\u5c06\u670d\u52a1\u5668\u90e8\u5206\u8981\u4e0b\u8f7d\u7684\u6587\u4ef6\u663e\u793a\u5230\u524d\u7aef&#xff0c;\u90a3\u4e48\u5c31\u9700\u8981\u6211\u4eec\u5728\u70b9\u51fb\u8fdb\u5165\u4e0b\u8f7d\u9875\u9762\u7684\u65f6\u5019&#xff0c;\u5411\u670d\u52a1\u5668\u53d1\u9001\u8bf7\u6c42&#xff0c;\u670d\u52a1\u5668\u4f1a\u628a\u53ef\u4ee5\u4e0b\u8f7d\u7684\u6587\u4ef6\u5217\u8868\u901a\u8fc7\u54cd\u5e94\u7684\u65b9\u5f0f\u7ed9\u6d4f\u89c8\u5668&#xff08;\u5ba2\u6237\u7aef&#xff09;&#xff0c;\u6d4f\u89c8\u5668\u63a5\u6536\u4e4b\u540e\u5c31\u53ef\u4ee5\u5c06\u5185\u5bb9\u663e\u793a\u51fa\u6765&#xff0c;\u5f53\u7136\u8fd9\u90e8\u5206\u8fd8\u662f\u6d89\u53ca\u5927\u91cf\u7684HTML,CSS\u4ee5\u53caJavaScript\u7684\u77e5\u8bc6\u70b9&#xff0c;\u4f46\u662f\u5e76\u4e0d\u59a8\u788d\u6211\u4eec\u7406\u89e3\u540e\u7aef\u7684\u903b\u8f91\u3002<\/li>\n<li>\u70b9\u51fb\u8981\u4e0b\u8f7d\u7684\u6587\u4ef6\u65f6&#xff0c;\u6d4f\u89c8\u5668\u5411\u670d\u52a1\u7aef\u53d1\u9001\u8bf7\u6c42&#xff0c;\u670d\u52a1\u7aef\u5c06\u8981\u4e0b\u8f7d\u7684\u6587\u4ef6\u901a\u8fc7\u54cd\u5e94\u7684\u65b9\u5f0f\u53d1\u9001\u6d4f\u89c8\u5668&#xff0c;\u6ce8\u610f\u8fd9\u91cc\u6709\u4e00\u4e2a\u5b57\u6bb5Content-Disposition\u8981\u975e\u5e38\u5c0f\u5fc3&#xff0c;Content-Disposition\u662f HTTP \u54cd\u5e94\u5934\u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u5b57\u6bb5&#xff0c;\u4e3b\u8981\u7528\u4e8e\u63a7\u5236\u5ba2\u6237\u7aef&#xff08;\u5982\u6d4f\u89c8\u5668&#xff09;\u5982\u4f55\u5904\u7406\u670d\u52a1\u5668\u8fd4\u56de\u7684\u5185\u5bb9&#xff0c;\u7279\u522b\u662f\u5728\u6587\u4ef6\u4e0b\u8f7d\u573a\u666f\u3002<\/li>\n<li>Content-Disposition\u6dfb\u52a0\u7684\u65f6\u5e8f\u4f4d\u7f6e\u4e5f\u662f\u6709\u8981\u6c42\u7684&#xff0c;\u5982\u679c\u6dfb\u52a0\u7684\u65f6\u673a\u4e0d\u5bf9&#xff0c;\u4e5f\u4f1a\u5bfc\u81f4\u5931\u8d25&#xff08;\u4e3b\u8981\u662f\u81ea\u5df1\u7684\u7ecf\u9a8c\u4e0d\u8db3&#xff0c;\u5bfc\u81f4\u8e29\u5751&#xff09;&#xff1a;<\/li>\n<\/ul>\n<p>\/\/ HTTP\u54cd\u5e94\u7684\u6807\u51c6\u683c\u5f0f<br \/>\nHTTP\/1.1 200 OK                    \/\/ \u72b6\u6001\u884c<br \/>\nContent-Type: text\/html            \/\/ \u54cd\u5e94\u5934<br \/>\nContent-Length: 1234               \/\/ \u54cd\u5e94\u5934<br \/>\nContent-Disposition: attachment    \/\/ \u54cd\u5e94\u5934<br \/>\n                                    \/\/ \u7a7a\u884c<br \/>\n&amp;lt;html&amp;gt;&#8230;&amp;lt;\/html&amp;gt;        \/\/ \u54cd\u5e94\u4f53 <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"711\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000058-689e78ba0963d.png\" width=\"1468\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"927\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000058-689e78ba72938.png\" width=\"1760\" \/><\/p>\n<\/p>\n<h5 id=\"%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%94%9F%E6%88%90session%20id%E5%92%8C%E4%BF%9D%E5%AD%98cookie%E7%8A%B6%E6%80%81\">\u670d\u52a1\u5668\u751f\u6210session id\u548c\u4fdd\u5b58cookie\u72b6\u6001<\/h5>\n<p>Cookie\u200b\u200b \u662f\u5b58\u50a8\u5728\u200b\u200b\u5ba2\u6237\u7aef\u200b\u200b&#xff08;\u6d4f\u89c8\u5668&#xff09;\u7684\u5c0f\u578b\u6587\u672c\u6570\u636e&#xff08;\u901a\u5e38\u6709\u5927\u5c0f\u9650\u5236&#xff0c;\u59824KB&#xff09;\u200b\u200bSession\u200b\u200b \u662f\u5b58\u50a8\u5728\u200b\u200b\u670d\u52a1\u7aef\u200b\u200b\u7684\u7528\u6237\u72b6\u6001\u4fe1\u606f&#xff08;\u5927\u5c0f\u7406\u8bba\u4e0a\u53ea\u53d7\u670d\u52a1\u5668\u5185\u5b58\u9650\u5236&#xff09;\u5b83\u4eec\u901a\u5e38\u200b\u200b\u914d\u5408\u4f7f\u7528\u200b\u200b&#xff0c;\u5f62\u6210\u8fd9\u6837\u7684\u5de5\u4f5c\u6d41\u7a0b&#xff1a;<\/p>\n<ul>\n<li>\u7528\u6237\u9996\u6b21\u8bbf\u95ee \u2192 \u670d\u52a1\u7aef\u521b\u5efaSession\u5e76\u751f\u6210\u552f\u4e00Session ID&#xff1b;<\/li>\n<li>\u670d\u52a1\u7aef\u901a\u8fc7Set-Cookie\u5c06Session ID\u53d1\u9001\u7ed9\u6d4f\u89c8\u5668&#xff1b;<\/li>\n<li>\u00a0\u6d4f\u89c8\u5668\u540e\u7eed\u8bf7\u6c42\u81ea\u52a8\u643a\u5e26\u8fd9\u4e2aCookie&#xff08;Session ID&#xff09;&#xff1b;<\/li>\n<li>\u670d\u52a1\u7aef\u901a\u8fc7Session ID\u67e5\u627e\u5bf9\u5e94\u7684Session\u6570\u636e<\/li>\n<\/ul>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"510\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000059-689e78bb4f0df.png\" width=\"1433\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1255\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000059-689e78bb9f22f.png\" width=\"2144\" \/><\/p>\n<h6 id=\"%E6%A0%B8%E5%BF%83%E4%BB%A3%E7%A0%81\">\u6838\u5fc3\u4ee3\u7801<\/h6>\n<p>\u751f\u621032\u4f4dsession id \u2192 \u4fdd\u5b58session id&#xff08;\u4fbf\u4e8e\u540e\u9762\u9a8c\u8bc1&#xff09;\u2192 \u9a8c\u8bc1session id\u51fd\u6570 \u2192 \u9500\u6bc1session id<\/p>\n<p>std::string http_conn::generate_session_id(){<br \/>\n    \/\/ 16\u5b57\u8282\u968f\u673a\u6570\u7f13\u51b2\u533a&#xff08;128\u4f4d&#xff09;<br \/>\n    std::array&lt;unsigned char, 16&gt; bytes{};<br \/>\n    \/\/ \u4f7f\u7528\u786c\u4ef6\u71b5\u6e90\u521d\u59cb\u5316\u968f\u673a\u6570\u751f\u6210\u5668<br \/>\n    std::random_device rd;<br \/>\n    \/\/ \u586b\u5145\u968f\u673a\u5b57\u8282&#xff08;\u4fdd\u7559\u4f4e8\u4f4d&#xff09;<br \/>\n    for(auto &amp; b : bytes){<br \/>\n        b &#061; static_cast&lt;unsigned char&gt;(rd() &amp; 0xFF);<br \/>\n    }<br \/>\n    \/\/ HEX\u8f6c\u6362\u8868&#xff08;\u5c0f\u5199\u5b57\u6bcd&#xff09;<br \/>\n    static const char* hex_chars &#061; &#034;0123456789abcdef&#034;;<br \/>\n    \/\/ \u9884\u5206\u914d32\u5b57\u7b26\u7f13\u51b2\u533a<br \/>\n    std::string session_id;<br \/>\n    session_id.resize(32);<br \/>\n    \/\/ \u5c06\u6bcf\u4e2a\u5b57\u8282\u8f6c\u4e3a\u4e24\u4e2aHEX\u5b57\u7b26<br \/>\n    for(size_t i &#061; 0; i &lt; bytes.size(); i&#043;&#043;){<br \/>\n        session_id[i * 2]     &#061; hex_chars[bytes[i] &gt;&gt; 4];   \/\/ \u9ad84\u4f4d<br \/>\n        session_id[i * 2 &#043; 1] &#061; hex_chars[bytes[i] &amp; 0x0F]; \/\/ \u4f4e4\u4f4d<br \/>\n    }<br \/>\n    return session_id;<br \/>\n}<\/p>\n<p>bool http_conn::create_session(const std::string&amp; username){<\/p>\n<p>    session_lock.lock();<br \/>\n    try {<\/p>\n<p>        if(m_has_session &amp;&amp; strlen(m_session_id_buf) &gt; 0){<br \/>\n            std::string session_id(m_session_id_buf);<br \/>\n            printf(&#034;strlen(session id) &#061; %d\\\\n&#034;, session_id.size());<br \/>\n            printf(&#034;%s %d session id &#061; %s\\\\n&#034;, __FILE__, __LINE__, session_id.c_str());<br \/>\n            sessions[session_id] &#061; session_info(username);<br \/>\n            sessions_st.insert(session_id);<br \/>\n            m_session_id &#061; session_id; \/\/ \u5176\u5b9e\u5728\u89e3\u6790\u5934\u90e8\u4fe1\u606f\u7684\u65f6\u5019\u5c31\u8d4b\u503c\u8fc7\u4e86&#xff0c;\u8fd9\u91cc\u53ea\u662f\u91cd\u590d\u7684\u8d4b\u503c\u4e00\u904d<br \/>\n        }else{<br \/>\n            std::string session_id &#061; generate_session_id();<br \/>\n            printf(&#034;%s %d session id &#061; %s\\\\n&#034;, __FILE__, __LINE__, session_id.c_str());<br \/>\n            sessions[session_id] &#061; session_info(username);<br \/>\n            m_session_id &#061; session_id;<br \/>\n            sessions_st.insert(session_id);<br \/>\n            m_has_session &#061; true;<br \/>\n            m_need_set_cookie &#061; true;<br \/>\n        }<br \/>\n        session_lock.unlock();<br \/>\n        return true;<br \/>\n    }catch(&#8230;){<br \/>\n        \/\/ std::cout&lt;&lt;&#034;username &#061; &#034;&lt;&lt;username&lt;&lt;std::endl;<br \/>\n        printf(&#034;%s %d throw ERROR and username &#061; %s\\\\n&#034;, __FILE__, __LINE__, username.c_str());<br \/>\n        session_lock.unlock();<br \/>\n        return false;<br \/>\n    }<br \/>\n    return false;<br \/>\n}<\/p>\n<p>bool http_conn::validate_session(const std::string&amp; session_id){<br \/>\n    session_lock.lock();<br \/>\n    auto it &#061; sessions.find(session_id);<br \/>\n    if(it !&#061; sessions.end() &amp;&amp; it -&gt; second.is_valid){<br \/>\n        \/\/ \u68c0\u67e5session id\u662f\u5426\u8fc7\u671f&#xff08;\u662f\u5426\u8d85\u8fc7\u89c4\u5b9a\u768430\u5206\u949f&#xff09;<br \/>\n        time_t now &#061; time(NULL);<br \/>\n        if(now &#8211; (it -&gt; second).last_access &lt; 1800){<br \/>\n            it -&gt; second.last_access &#061; now;<br \/>\n            session_lock.unlock();<br \/>\n            return true;<br \/>\n        }else{<br \/>\n            \/\/ \u5426\u5219\u5220\u9664\u8fc7\u671f\u7684session id<br \/>\n            sessions.erase(it);<br \/>\n        }<br \/>\n    }<br \/>\n    session_lock.unlock();<br \/>\n    return false;<br \/>\n}<\/p>\n<p>void http_conn::destroy_session(const std::string&amp; session_id){<br \/>\n    session_lock.lock();<br \/>\n    sessions.erase(session_id);<br \/>\n    session_lock.unlock();<\/p>\n<p>    m_session_id &#061; &#034;&#034;;<br \/>\n    m_is_logged_in &#061; false;<br \/>\n} <\/p>\n<h6 id=\"%E8%A7%A3%E6%9E%90session%20id\">\u89e3\u6790session id<\/h6>\n<p>\u5f53\u670d\u52a1\u5668\u751f\u6210session id\u4e4b\u540e\u53d1\u9001\u7ed9\u6d4f\u89c8\u5668&#xff08;\u5ba2\u6237\u7aef&#xff09;&#xff0c;\u90a3\u4e48\u6d4f\u89c8\u5668\u4fdd\u5b58\u7740session id&#xff0c;\u540e\u9762\u8bf7\u6c42\u9875\u9762\u7684\u65f6\u5019\u4f7f\u7528\u8fd9\u4e2asession id\u4f5c\u4e3a\u8eab\u4efd&#xff0c;\u56e0\u6b64\u9700\u8981\u89e3\u6790header\u4e2d\u7684session id\u3002<\/p>\n<p>if(strncasecmp(text, &#034;Cookie:&#034;, 7) &#061;&#061; 0){<br \/>\n        \/\/ text \u5f62\u5982 &#034;Cookie: a&#061;1; session_id&#061;abcd&#8230;; b&#061;2&#034;<br \/>\n        const char* p &#061; text &#043; 7;<br \/>\n        p &#043;&#061; strspn(p, &#034; \\\\t&#034;);<br \/>\n        const char* sid &#061; strcasestr(p, &#034;session_id&#061;&#034;);<br \/>\n        if (sid) {<br \/>\n            sid &#043;&#061; 11; \/\/ \u8df3\u8fc7 &#034;session_id&#061;&#034;<br \/>\n            size_t n &#061; 0;<br \/>\n            while (sid[n] &amp;&amp; sid[n] !&#061; &#039;;&#039; &amp;&amp; sid[n] !&#061; &#039; &#039; &amp;&amp; n &lt; 64) n&#043;&#043;;<br \/>\n            \/\/ \u53ea\u63a5\u53d7 32 \u4f4d\u5341\u516d\u8fdb\u5236<br \/>\n            if (n &#061;&#061; 32) {<br \/>\n                bool ok &#061; true;<br \/>\n                \/\/ \u786e\u4fddsession id\u662f\u5408\u6cd5\u7684<br \/>\n                for (size_t i &#061; 0; i &lt; 32; &#043;&#043;i) {<br \/>\n                    char c &#061; sid[i];<br \/>\n                    if (!((c &gt;&#061; &#039;0&#039; &amp;&amp; c &lt;&#061; &#039;9&#039;) || (c &gt;&#061; &#039;a&#039; &amp;&amp; c &lt;&#061; &#039;f&#039;))) { ok &#061; false; break; }<br \/>\n                }<br \/>\n                if (ok) {<br \/>\n                    memcpy(m_session_id_buf, sid, 32);<br \/>\n                    m_session_id_buf[32] &#061; &#039;\\\\0&#039;;<br \/>\n                    m_has_session &#061; true;<br \/>\n                }<br \/>\n            }<br \/>\n        }<br \/>\n        if(strlen(m_session_id_buf) &gt; 0){<br \/>\n            m_has_session &#061; true;<br \/>\n            m_session_id &#061; std::string(m_session_id_buf);<br \/>\n            sessions_st.insert(m_session_id);<br \/>\n        }<br \/>\n    } <\/p>\n<h4 id=\"webbench%E5%8E%8B%E6%B5%8B\">Webbench\u538b\u6d4b<\/h4>\n<p>\u539f\u7406: \u7236\u8fdb\u7a0bfork\u82e5\u5e72\u4e2a\u5b50\u8fdb\u7a0b&#xff0c;\u6bcf\u4e2a\u5b50\u8fdb\u7a0b\u5728\u7528\u6237\u8981\u6c42\u65f6\u95f4\u6216\u9ed8\u8ba4\u7684\u65f6\u95f4\u5185\u5bf9\u76ee\u6807web\u5faa\u73af\u53d1\u51fa\u5b9e\u9645\u8bbf\u95ee\u8bf7\u6c42&#xff0c;\u7236\u5b50\u8fdb\u7a0b\u901a\u8fc7\u7ba1\u9053\u8fdb\u884c\u901a\u4fe1&#xff0c;\u5b50\u8fdb\u7a0b\u901a\u8fc7\u7ba1\u9053\u5199\u7aef\u5411\u7236\u8fdb\u7a0b\u4f20\u9012\u5728\u82e5\u5e72\u6b21\u8bf7\u6c42\u8bbf\u95ee\u5b8c\u6bd5\u540e\u8bb0\u5f55\u5230\u7684\u603b\u4fe1\u606f&#xff0c;\u7236\u8fdb\u7a0b\u901a\u8fc7\u7ba1\u9053\u8bfb\u7aef\u8bfb\u53d6\u5b50\u8fdb\u7a0b\u53d1\u6765\u7684\u76f8\u5173\u4fe1\u606f&#xff0c;\u5b50\u8fdb\u7a0b\u5728\u65f6\u95f4\u5230\u540e\u7ed3\u675f&#xff0c;\u7236\u8fdb\u7a0b\u5728\u6240\u6709\u5b50\u8fdb\u7a0b\u9000\u51fa\u540e\u7edf\u8ba1\u5e76\u7ed9\u7528\u6237\u663e\u793a\u6700\u540e\u7684\u6d4b\u8bd5\u7ed3\u679c&#xff0c;\u7136\u540e\u9000\u51fa\u3002<\/p>\n<h5 id=\"%E4%B8%8B%E8%BD%BD%E5%B9%B6%E7%BC%96%E8%AF%91\">\u4e0b\u8f7d\u5e76\u7f16\u8bd1<\/h5>\n<p>wget\u00a0http:\/\/home.tiscali.cz\/~cz210552\/distfiles\/webbench-1.5.tar.gz<\/p>\n<p>\u89e3\u538b&#xff1a;tar zxvf webbench-1.5.tar.gz<\/p>\n<p>\u5207\u6362\u76ee\u5f55&#xff1a;cd webbench-1.5<\/p>\n<p>\u7f16\u8bd1&#xff1a;make<\/p>\n<p>\u5b89\u88c5&#xff1a;sudo make install<\/p>\n<p>\u6ce8\u610f&#xff1a;\u76ee\u524d1.5\u7248\u672c\u7684webbench\u652f\u6301http\u534f\u8bae&#xff0c;\u4e0d\u652f\u6301https\u534f\u8bae\u3002\u00a0<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"281\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000101-689e78bdb3a8b.png\" width=\"830\" \/><\/p>\n<h5 id=\"%E5%BC%80%E5%A7%8B%E5%8E%8B%E6%B5%8B\">\u5f00\u59cb\u538b\u6d4b<\/h5>\n<p>webbench -c 10500 -t 5\u00a0http:\/\/10.16.110.157:9006\/<\/p>\n<p>\u6a21\u5f0f1 proactor &#043; LT &#043; LT&#xff1a;.\/server -m 0 -c 1 -a 0<\/p>\n<p>Speed&#061;4317024 pages\/min, 8058445 bytes\/sec. Requests: 359752 susceed, 0 failed.<\/p>\n<p>\u6a21\u5f0f2 proactor &#043; LT &#043; ET&#xff1a;.\/server -m 1 -c 1 -a 0<\/p>\n<p>Speed&#061;4208976 pages\/min, 7856733 bytes\/sec. Requests: 350748 susceed, 0 failed.<\/p>\n<p>\u6a21\u5f0f3 proactor &#043; ET &#043; LT&#xff1a;.\/server -m 2 -c 1 -a 0<\/p>\n<p>Speed&#061;4085856 pages\/min, 7636944 bytes\/sec. Requests: 340485 susceed, 3 failed.<\/p>\n<p>\u6a21\u5f0f4 proactor &#043; ET &#043; ET&#xff1a;.\/server -m 3 -c 1 -a 0<\/p>\n<p>Speed&#061;3805128 pages\/min, 7113030 bytes\/sec. Requests: 317091 susceed, 3 failed.<\/p>\n<p>\u6a21\u5f0f5 reactor &#043; LT &#043; ET&#xff1a;.\/server -m 1 -c 1 -a 1<\/p>\n<p>Speed&#061;2533716 pages\/min, 4729760 bytes\/sec. Requests: 211143 susceed, 0 failed.<\/p>\n<p>\u6ce8&#xff1a;\u548c\u539f\u4f5c\u8005\u6d4b\u8bd5\u7684\u7ed3\u679c\u6bd4\u8d77\u6765\u7ed3\u679c\u8fd8\u53d8\u5dee\u4e86&#xff0c;\u6211\u611f\u89c9\u6539\u8fdb\u7684\u6700\u5c0f\u5806\u601d\u8def\u5e94\u8be5\u662f\u6ca1\u6709\u4ec0\u4e48\u95ee\u9898&#xff0c;\u53ef\u80fd\u662f\u6ca1\u6709\u505a\u4ec0\u4e48\u4f18\u5316&#xff0c;\u6211\u5728\u5b9e\u73b0\u6700\u5c0f\u90a3\u90e8\u5206\u7684\u65f6\u5019\u5bf9\u4e8e\u6784\u5efa\u5806&#xff0c;\u5220\u9664\u5143\u7d20\u4ee5\u53ca\u5806\u7684\u8c03\u6574\u90fd\u662f\u91c7\u7528\u539f\u59cb\u5806\u7684\u601d\u60f3&#xff0c;\u5b8c\u5168\u6ca1\u6709\u505a\u4ec0\u4e48\u6027\u80fd\u4e0a\u7684\u4f18\u5316&#xff0c;\u4f46\u662f\u53ef\u4ee5\u7ed9\u5927\u5bb6\u63d0\u4f9b\u4e00\u4e2a\u601d\u8def\u53bb\u5b66\u4e60\u3002<\/p>\n<\/p>\n<h4 id=\"%E5%8F%AF%E8%83%BD%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98\">\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898<\/h4>\n<p>\u95ee\u98981&#xff1a;web\u670d\u52a1\u5668\u542f\u52a8\u4e4b\u540e&#xff0c;Chrome\u6d4f\u89c8\u5668\u8fde\u63a5\u62a5\u9519&#xff1a;\u62d2\u7edd\u8fde\u63a5&#xff08;\u53ef\u662f\u4e4b\u524d\u90fd\u8fd8\u884c&#xff09;&#xff0c;\u5982\u679c\u6362edge\u6d4f\u89c8\u5668\u5c31\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee&#xff0c;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"970\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000101-689e78bdde668.png\" width=\"1992\" \/><\/p>\n<p># \u5f3a\u5236\u5237\u65b0\u9875\u9762&#xff08;\u7ed5\u8fc7\u7f13\u5b58&#xff09;<br \/>\nCtrl &#043; Shift &#043; R &#xff08;Windows\/Linux&#xff09;<br \/>\nCmd &#043; Shift &#043; R &#xff08;Mac&#xff09;<\/p>\n<\/p>\n<h4 id=\"%E5%BA%96%E4%B8%81%E8%A7%A3%E7%89%9B%E6%9D%A5%E8%87%AA%E5%8E%9F%E6%96%87\">\u5e96\u4e01\u89e3\u725b&#xff08;\u6765\u81ea\u539f\u6587&#xff09;<\/h4>\n<p>\u8fd1\u671f\u7248\u672c\u8fed\u4ee3\u8f83\u5feb&#xff0c;\u4ee5\u4e0b\u5185\u5bb9\u591a\u4ee5\u65e7\u7248\u672c(raw_version)\u4ee3\u7801\u4e3a\u84dd\u672c\u8fdb\u884c\u8be6\u89e3.<\/p>\n<ul>\n<li>\u5c0f\u767d\u89c6\u89d2&#xff1a;\u4e00\u6587\u8bfb\u61c2\u793e\u957f\u7684TinyWebServer<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 01 \u7ebf\u7a0b\u540c\u6b65\u673a\u5236\u5c01\u88c5\u7c7b<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 02 \u534a\u540c\u6b65\u534a\u53cd\u5e94\u5806\u7ebf\u7a0b\u6c60&#xff08;\u4e0a&#xff09;<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 03 \u534a\u540c\u6b65\u534a\u53cd\u5e94\u5806\u7ebf\u7a0b\u6c60&#xff08;\u4e0b&#xff09;<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 04 http\u8fde\u63a5\u5904\u7406&#xff08;\u4e0a&#xff09;<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 05 http\u8fde\u63a5\u5904\u7406&#xff08;\u4e2d&#xff09;<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 06 http\u8fde\u63a5\u5904\u7406&#xff08;\u4e0b&#xff09;<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 07 \u5b9a\u65f6\u5668\u5904\u7406\u975e\u6d3b\u52a8\u8fde\u63a5&#xff08;\u4e0a&#xff09;<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 08 \u5b9a\u65f6\u5668\u5904\u7406\u975e\u6d3b\u52a8\u8fde\u63a5&#xff08;\u4e0b&#xff09;<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 09 \u65e5\u5fd7\u7cfb\u7edf&#xff08;\u4e0a&#xff09;<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 10 \u65e5\u5fd7\u7cfb\u7edf&#xff08;\u4e0b&#xff09;<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 11 \u6570\u636e\u5e93\u8fde\u63a5\u6c60<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 12 \u6ce8\u518c\u767b\u5f55<\/li>\n<li>\u6700\u65b0\u7248Web\u670d\u52a1\u5668\u9879\u76ee\u8be6\u89e3 &#8211; 13 \u8e29\u5751\u4e0e\u9762\u8bd5\u9898<\/li>\n<\/ul>\n<h4 id=\"cpp11%E5%AE%9E%E7%8E%B0\">CPP11\u5b9e\u73b0<\/h4>\n<p>\u66f4\u7b80\u6d01&#xff0c;\u66f4\u4f18\u96c5\u7684CPP11\u5b9e\u73b0&#xff1a;Webserver<\/p>\n<h4 id=\"%E8%87%B4%E8%B0%A2\">\u81f4\u8c22<\/h4>\n<p>Linux\u9ad8\u6027\u80fd\u670d\u52a1\u5668\u7f16\u7a0b&#xff0c;\u6e38\u53cc\u8457.<\/p>\n<p>\u611f\u8c22qinguoyi\u63d0\u4f9b\u7684TinyWebServer&#xff0c;\u8ba9\u6211\u5b66\u4e60\u5230\u4e86\u5f88\u591a\u77e5\u8bc6\u70b9&#xff0c;\u4e5f\u5e0c\u671b\u6211\u7ed9\u51fa\u7684\u80fd\u7ed9\u5927\u5bb6\u5e26\u6765\u6536\u76ca\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb735\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u57fa\u4e8eLinux\u7684C++\u8f7b\u91cf\u7ea7Web\u670d\u52a1\u5668TinyWebServer-v2\u7684\u6539\u8fdb\u7248\u672c\u3002\u9879\u76ee\u5728\u539f\u4f5c\u8005\u4ee3\u7801\u57fa\u7840\u4e0a\u8fdb\u884c\u4e86\u4f18\u5316\uff1a1) \u7528\u6700\u5c0f\u5806\u66ff\u6362\u53cc\u5411\u94fe\u8868\u5b9a\u65f6\u5668\uff1b2) \u65b0\u589e\u6587\u4ef6\u4e0a\u4f20\u4e0b\u8f7d\u529f\u80fd\uff1b3) \u4f7f\u7528HTML\/CSS\/JavaScript\u7f8e\u5316\u754c\u9762\u3002\u670d\u52a1\u5668\u91c7\u7528\u7ebf\u7a0b\u6c60+\u975e\u963b\u585esocket+epoll\u7684\u5e76\u53d1\u6a21\u578b\uff0c\u652f\u6301Reactor\u548cProactor\u6a21\u5f0f\uff0c\u901a\u8fc7\u72b6\u6001\u673a\u89e3\u6790HTTP\u8bf7\u6c42\u3002\u9879\u76ee\u4fdd\u6301\u8f7b\u91cf\u7ea7\u7684\u521d\u5fc3\uff0c\u6539\u8fdb\u65f6\u501f\u52a9AI\u8f85\u52a9\u5b8c\u6210\uff0c\u65b0\u589e\u529f\u80fd\u901a\u8fc7\u5206\u5757\u4f20\u8f93\u89e3\u51b3\u5927\u6587\u4ef6\u4e0a\u4f20\u95ee\u9898\u3002Webbench\u6d4b\u8bd5\u663e\u793a\u591a\u79cd\u6a21\u5f0f\u4e0b\u7684\u6027\u80fd\u8868<\/p>\n","protected":false},"author":2,"featured_media":57122,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55,573,174,964,187,58,43],"topic":[],"class_list":["post-57131","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-c","tag-css","tag-html5","tag-javascript","tag-linux","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>TinyWebServer-v2\u670d\u52a1\u5668\u589e\u52a0\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\uff0c\u6700\u5c0f\u5806\u4ee3\u66ff\u53cc\u94fe\u8868\uff0c\u754c\u9762\u7f8e\u5316\u4ee5\u53ca\u670d\u52a1\u5668\u751f\u6210session id\u548c\u6d4f\u89c8\u5668\u4fdd\u5b58cookie\u5b9e\u73b0\uff08C\/C++\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/57131.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"TinyWebServer-v2\u670d\u52a1\u5668\u589e\u52a0\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\uff0c\u6700\u5c0f\u5806\u4ee3\u66ff\u53cc\u94fe\u8868\uff0c\u754c\u9762\u7f8e\u5316\u4ee5\u53ca\u670d\u52a1\u5668\u751f\u6210session id\u548c\u6d4f\u89c8\u5668\u4fdd\u5b58cookie\u5b9e\u73b0\uff08C\/C++\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb735\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u57fa\u4e8eLinux\u7684C++\u8f7b\u91cf\u7ea7Web\u670d\u52a1\u5668TinyWebServer-v2\u7684\u6539\u8fdb\u7248\u672c\u3002\u9879\u76ee\u5728\u539f\u4f5c\u8005\u4ee3\u7801\u57fa\u7840\u4e0a\u8fdb\u884c\u4e86\u4f18\u5316\uff1a1) \u7528\u6700\u5c0f\u5806\u66ff\u6362\u53cc\u5411\u94fe\u8868\u5b9a\u65f6\u5668\uff1b2) \u65b0\u589e\u6587\u4ef6\u4e0a\u4f20\u4e0b\u8f7d\u529f\u80fd\uff1b3) \u4f7f\u7528HTML\/CSS\/JavaScript\u7f8e\u5316\u754c\u9762\u3002\u670d\u52a1\u5668\u91c7\u7528\u7ebf\u7a0b\u6c60+\u975e\u963b\u585esocket+epoll\u7684\u5e76\u53d1\u6a21\u578b\uff0c\u652f\u6301Reactor\u548cProactor\u6a21\u5f0f\uff0c\u901a\u8fc7\u72b6\u6001\u673a\u89e3\u6790HTTP\u8bf7\u6c42\u3002\u9879\u76ee\u4fdd\u6301\u8f7b\u91cf\u7ea7\u7684\u521d\u5fc3\uff0c\u6539\u8fdb\u65f6\u501f\u52a9AI\u8f85\u52a9\u5b8c\u6210\uff0c\u65b0\u589e\u529f\u80fd\u901a\u8fc7\u5206\u5757\u4f20\u8f93\u89e3\u51b3\u5927\u6587\u4ef6\u4e0a\u4f20\u95ee\u9898\u3002Webbench\u6d4b\u8bd5\u663e\u793a\u591a\u79cd\u6a21\u5f0f\u4e0b\u7684\u6027\u80fd\u8868\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/57131.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-15T00:01:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000056-689e78b8533db.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57131.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/57131.html\",\"name\":\"TinyWebServer-v2\u670d\u52a1\u5668\u589e\u52a0\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\uff0c\u6700\u5c0f\u5806\u4ee3\u66ff\u53cc\u94fe\u8868\uff0c\u754c\u9762\u7f8e\u5316\u4ee5\u53ca\u670d\u52a1\u5668\u751f\u6210session id\u548c\u6d4f\u89c8\u5668\u4fdd\u5b58cookie\u5b9e\u73b0\uff08C\/C++\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-15T00:01:03+00:00\",\"dateModified\":\"2025-08-15T00:01:03+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/57131.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/57131.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57131.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TinyWebServer-v2\u670d\u52a1\u5668\u589e\u52a0\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\uff0c\u6700\u5c0f\u5806\u4ee3\u66ff\u53cc\u94fe\u8868\uff0c\u754c\u9762\u7f8e\u5316\u4ee5\u53ca\u670d\u52a1\u5668\u751f\u6210session id\u548c\u6d4f\u89c8\u5668\u4fdd\u5b58cookie\u5b9e\u73b0\uff08C\/C++\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"TinyWebServer-v2\u670d\u52a1\u5668\u589e\u52a0\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\uff0c\u6700\u5c0f\u5806\u4ee3\u66ff\u53cc\u94fe\u8868\uff0c\u754c\u9762\u7f8e\u5316\u4ee5\u53ca\u670d\u52a1\u5668\u751f\u6210session id\u548c\u6d4f\u89c8\u5668\u4fdd\u5b58cookie\u5b9e\u73b0\uff08C\/C++\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/57131.html","og_locale":"zh_CN","og_type":"article","og_title":"TinyWebServer-v2\u670d\u52a1\u5668\u589e\u52a0\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\uff0c\u6700\u5c0f\u5806\u4ee3\u66ff\u53cc\u94fe\u8868\uff0c\u754c\u9762\u7f8e\u5316\u4ee5\u53ca\u670d\u52a1\u5668\u751f\u6210session id\u548c\u6d4f\u89c8\u5668\u4fdd\u5b58cookie\u5b9e\u73b0\uff08C\/C++\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb735\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u57fa\u4e8eLinux\u7684C++\u8f7b\u91cf\u7ea7Web\u670d\u52a1\u5668TinyWebServer-v2\u7684\u6539\u8fdb\u7248\u672c\u3002\u9879\u76ee\u5728\u539f\u4f5c\u8005\u4ee3\u7801\u57fa\u7840\u4e0a\u8fdb\u884c\u4e86\u4f18\u5316\uff1a1) \u7528\u6700\u5c0f\u5806\u66ff\u6362\u53cc\u5411\u94fe\u8868\u5b9a\u65f6\u5668\uff1b2) \u65b0\u589e\u6587\u4ef6\u4e0a\u4f20\u4e0b\u8f7d\u529f\u80fd\uff1b3) \u4f7f\u7528HTML\/CSS\/JavaScript\u7f8e\u5316\u754c\u9762\u3002\u670d\u52a1\u5668\u91c7\u7528\u7ebf\u7a0b\u6c60+\u975e\u963b\u585esocket+epoll\u7684\u5e76\u53d1\u6a21\u578b\uff0c\u652f\u6301Reactor\u548cProactor\u6a21\u5f0f\uff0c\u901a\u8fc7\u72b6\u6001\u673a\u89e3\u6790HTTP\u8bf7\u6c42\u3002\u9879\u76ee\u4fdd\u6301\u8f7b\u91cf\u7ea7\u7684\u521d\u5fc3\uff0c\u6539\u8fdb\u65f6\u501f\u52a9AI\u8f85\u52a9\u5b8c\u6210\uff0c\u65b0\u589e\u529f\u80fd\u901a\u8fc7\u5206\u5757\u4f20\u8f93\u89e3\u51b3\u5927\u6587\u4ef6\u4e0a\u4f20\u95ee\u9898\u3002Webbench\u6d4b\u8bd5\u663e\u793a\u591a\u79cd\u6a21\u5f0f\u4e0b\u7684\u6027\u80fd\u8868","og_url":"https:\/\/www.wsisp.com\/helps\/57131.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-15T00:01:03+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250815000056-689e78b8533db.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/57131.html","url":"https:\/\/www.wsisp.com\/helps\/57131.html","name":"TinyWebServer-v2\u670d\u52a1\u5668\u589e\u52a0\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\uff0c\u6700\u5c0f\u5806\u4ee3\u66ff\u53cc\u94fe\u8868\uff0c\u754c\u9762\u7f8e\u5316\u4ee5\u53ca\u670d\u52a1\u5668\u751f\u6210session id\u548c\u6d4f\u89c8\u5668\u4fdd\u5b58cookie\u5b9e\u73b0\uff08C\/C++\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-15T00:01:03+00:00","dateModified":"2025-08-15T00:01:03+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/57131.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/57131.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/57131.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"TinyWebServer-v2\u670d\u52a1\u5668\u589e\u52a0\u4e0a\u4f20\u548c\u4e0b\u8f7d\u6587\u4ef6\u529f\u80fd\uff0c\u6700\u5c0f\u5806\u4ee3\u66ff\u53cc\u94fe\u8868\uff0c\u754c\u9762\u7f8e\u5316\u4ee5\u53ca\u670d\u52a1\u5668\u751f\u6210session id\u548c\u6d4f\u89c8\u5668\u4fdd\u5b58cookie\u5b9e\u73b0\uff08C\/C++\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=57131"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57131\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/57122"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=57131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=57131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=57131"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=57131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}