{"id":28400,"date":"2025-04-20T00:11:20","date_gmt":"2025-04-19T16:11:20","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/28400.html"},"modified":"2025-04-20T00:11:20","modified_gmt":"2025-04-19T16:11:20","slug":"esp-c3%e4%bd%9c%e4%b8%batcp%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%8c%e6%9c%80%e5%a4%9a%e8%83%bd%e9%93%be%e6%8e%a5%e5%a4%9a%e5%b0%91tcp-client%ef%bc%9f%e5%9c%a8%e5%93%aa%e9%87%8c%e5%8f%af%e4%bb%a5%e4%bf%ae","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/28400.html","title":{"rendered":"esp-c3\u4f5c\u4e3atcp\u670d\u52a1\u5668\uff0c\u6700\u591a\u80fd\u94fe\u63a5\u591a\u5c11tcp client\uff1f\u5728\u54ea\u91cc\u53ef\u4ee5\u4fee\u6539\uff0c\u6709\u54ea\u4e9b\u53c2\u6570\u4f1a\u5f71\u54cd\u8fde\u63a5\u7a33\u5b9a\u6027"},"content":{"rendered":"<p>\u5728\u4f7f\u7528 ESP32-C3&#xff08;\u6216\u5176\u4ed6 ESP32 \u7cfb\u5217&#xff09;\u505a TCP \u670d\u52a1\u5668 \u65f6&#xff0c;\u80fd\u540c\u65f6\u63a5\u5165\u591a\u5c11\u4e2a TCP Client&#xff0c;\u4e3b\u8981\u53d6\u51b3\u4e8e\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762&#xff1a;<\/p>\n<li>LWIP TCP \u76f8\u5173\u914d\u7f6e&#xff08;\u6700\u5927 socket \u6570\u3001TCP PCB \u6570\u3001\u5185\u5b58\u7f13\u51b2\u533a\u7b49&#xff09;<\/li>\n<li>Wi-Fi\/AP \u6a21\u5f0f\u76f8\u5173\u9650\u5236&#xff08;\u5982\u679c\u505a\u8f6f AP&#xff0c;\u6700\u591a\u80fd\u8fde\u591a\u5c11\u4e2a\u7ad9\u70b9&#xff09;<\/li>\n<li>\u6574\u4f53\u7cfb\u7edf\u53ef\u7528\u5185\u5b58&#xff08;\u6bcf\u4e2a\u8fde\u63a5\u4f1a\u5360\u7528\u4e00\u5b9a\u7684 RAM&#xff09;<\/li>\n<p>\u4e0b\u9762\u8be6\u7ec6\u8bf4\u660e&#xff0c;\u5e76\u7ed9\u51fa\u5982\u4f55\u5728 menuconfig \u4e2d\u8fdb\u884c\u4fee\u6539\u3001\u6709\u54ea\u4e9b\u5173\u952e\u53c2\u6570\u5f71\u54cd\u8fde\u63a5\u7684\u7a33\u5b9a\u6027\u3002<\/p>\n<hr \/>\n<h3>1. LWIP \u76f8\u5173\u914d\u7f6e<\/h3>\n<h4>1.1 \u6700\u5927 socket \u6570&#xff08;Max number of open sockets&#xff09;<\/h4>\n<ul>\n<li>\u5728 ESP-IDF \u4e2d&#xff0c;\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u4f1a\u9650\u5236 \u6700\u5927\u53ef\u7528 socket \u6570\u3002\u5982\u679c\u4f60\u7684 TCP \u670d\u52a1\u5668\u8981\u540c\u65f6\u652f\u6301\u591a\u4e2a client&#xff0c;\u5c31\u8981\u786e\u4fdd LWIP_MAX_SOCKETS \u914d\u7f6e\u8db3\u591f\u5927\u3002<\/li>\n<li>\u53ef\u4ee5\u5728 menuconfig -&gt; Component config -&gt; LWIP -&gt; Max number of open sockets \u91cc\u4fee\u6539&#xff0c;\u9ed8\u8ba4\u4e3a 10 \u6216\u66f4\u4f4e\u3002<\/li>\n<\/ul>\n<h4>1.2 TCP PCB&#xff08;Protocol Control Block&#xff09;\u6570<\/h4>\n<ul>\n<li>\u6bcf\u4e00\u4e2a TCP \u8fde\u63a5\u4f1a\u6d88\u8017\u4e00\u4e2a PCB\u3002\u82e5\u8981\u652f\u6301\u66f4\u591a\u8fde\u63a5&#xff0c;\u9700\u8981\u589e\u52a0 MEMP_NUM_TCP_PCB&#xff08;\u6216\u7c7b\u4f3c\u540d\u5b57&#xff0c;\u89c6 ESP-IDF \u7248\u672c\u800c\u5b9a&#xff09;\u3002<\/li>\n<li>\u5728 menuconfig -&gt; Component config -&gt; LWIP -&gt; Support for multiple TCP PCBs \u7b49\u9009\u9879\u91cc\u8fdb\u884c\u914d\u7f6e&#xff0c;\u9ed8\u8ba4\u4e00\u822c\u5728 5~11 \u4e4b\u95f4\u3002<\/li>\n<\/ul>\n<p>\u6ce8\u610f&#xff1a;Socket \u548c PCB \u5e76\u4e0d\u4e00\u5b9a\u603b\u662f\u4e00\u5bf9\u4e00&#xff0c;\u4e5f\u6709\u53ef\u80fd\u5360\u7528 netconn \u7b49\u8d44\u6e90&#xff0c;\u6700\u597d\u628a\u76f8\u5173 netconn\u3001tcp_pcb\u3001tcp segment buffer (MEMP_NUM_TCP_SEG) \u7b49\u4e00\u8d77\u8c03\u5927\u3002<\/p>\n<h4>1.3 TCP\/IP \u5185\u5b58\u7f13\u51b2\u533a<\/h4>\n<ul>\n<li>\u82e5\u5f00\u542f\u5f88\u591a\u8fde\u63a5&#xff0c;\u9700\u8981\u4fdd\u8bc1 TCP \u534f\u8bae\u6808\u6709\u8db3\u591f\u7684\u7f13\u51b2\u533a&#xff08;TCP_SND_BUF, TCP_WND, MEMP_NUM_PBUF \u7b49&#xff09;\u6765\u7ef4\u6301\u7a33\u5b9a\u3002<\/li>\n<li>\u5728 menuconfig -&gt; Component config -&gt; LWIP -&gt; Internal memory usage \u4e2d&#xff0c;\u53ef\u8c03\u5927\u4e00\u4e9b buffer \u6570\u91cf&#xff0c;\u589e\u5927\u53d1\u9001\/\u63a5\u6536\u7a97\u53e3\u7b49\u3002<\/li>\n<\/ul>\n<p>\u4f46 \u8fd9\u4e9b\u7f13\u51b2\u533a\u589e\u5927\u4e5f\u4f1a\u5e26\u6765\u66f4\u9ad8\u7684 RAM \u5360\u7528&#xff0c;\u4f60\u9700\u8981\u5728\u53ef\u7528\u5185\u5b58\u548c\u8fde\u63a5\u6570\u4e4b\u95f4\u5e73\u8861\u3002<\/p>\n<hr \/>\n<h3>2. Wi-Fi\/AP \u6a21\u5f0f\u76f8\u5173\u9650\u5236<\/h3>\n<ul>\n<li>\u5982\u679c\u4f60\u7684 ESP32-C3 \u4f5c\u4e3a\u8f6f AP&#xff08;Access Point&#xff09;&#xff0c;\u5219\u9ed8\u8ba4\u540c\u65f6\u80fd\u8fde\u63a5\u7684\u6700\u5927 STA \u6570\u91cf\u4e00\u822c\u5728 4~10 \u4e4b\u95f4&#xff08;\u4e0d\u540c IDF \u7248\u672c\u53ef\u80fd\u9ed8\u8ba4\u503c\u4e0d\u540c&#xff09;\u3002\u53ef\u4ee5\u5728 menuconfig -&gt; Component config -&gt; Wi-Fi -&gt; (AP) Max number of stations \u4e2d\u4fee\u6539\u3002<\/li>\n<li>\u5982\u679c\u4f60\u4f5c\u4e3a station \u6a21\u5f0f \u63a5\u5165\u8def\u7531\u5668&#xff0c;\u90a3\u4e48\u5c31\u770b\u8def\u7531\u5668\u548c\u4f60\u7684 TCP \u670d\u52a1\u5668\u7a0b\u5e8f\u80fd\u5426\u63a5\u53d7\u591a\u5c11\u5e76\u53d1\u8fde\u63a5&#xff0c;AP \u81ea\u8eab\u5e76\u4e0d\u9650\u5236\u591a\u5c11\u4e2a TCP \u8fde\u63a5&#xff08;\u9664\u975e\u8d44\u6e90\u4e0d\u8db3&#xff09;\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>3. \u603b\u8fde\u63a5\u6570\u4e0e\u7cfb\u7edf\u53ef\u7528\u5185\u5b58<\/h3>\n<ul>\n<li>\u5728\u5927\u91cf\u5e76\u53d1\u8fde\u63a5\u7684\u573a\u666f\u4e0b&#xff0c;\u6bcf\u4e2a\u8fde\u63a5\u90fd\u4f1a\u5360\u7528\u534f\u8bae\u6808 buffer\u3001\u4efb\u52a1\u6808\u6216 heap \u7b49\u8d44\u6e90&#xff0c;\u5982\u679c\u5185\u5b58\u4e0d\u8db3\u5c31\u4f1a\u5bfc\u81f4\u8fde\u63a5\u5931\u8d25\u6216\u7cfb\u7edf\u4e0d\u7a33\u5b9a\u3002<\/li>\n<li>\u6240\u4ee5\u5373\u4f7f\u4f60\u628a LWIP_MAX_SOCKETS \u7b49\u53c2\u6570\u90fd\u62c9\u5f97\u5f88\u9ad8&#xff0c;\u4f46\u5982\u679c\u5b9e\u9645\u53ef\u7528 RAM \u4e0d\u591f&#xff0c;\u4e5f\u65e0\u6cd5\u771f\u6b63\u627f\u8f7d\u90a3\u4e48\u591a\u8fde\u63a5\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>4. \u8fde\u63a5\u7a33\u5b9a\u6027\u76f8\u5173\u56e0\u7d20<\/h3>\n<li>\n<p>Socket\/PBC \u6570\u91cf\u914d\u7f6e<\/p>\n<ul>\n<li>\u5982\u524d\u6240\u8ff0&#xff0c;\u9700\u8981\u540c\u65f6\u4fee\u6539 Max number of open sockets\u3001MEMP_NUM_TCP_PCB\u3001MEMP_NUM_TCP_SEG\u3001MEMP_NUM_PBUF \u7b49&#xff0c;\u4ee5\u652f\u6301\u66f4\u591a\u8fde\u63a5\u3002<\/li>\n<li>\u5982\u679c\u53ea\u6539\u4e86\u5176\u4e2d\u4e00\u4e24\u9879&#xff0c;\u800c\u5176\u4ed6\u76f8\u5173\u9879\u6ca1\u540c\u6b65\u589e\u5927&#xff0c;\u53ef\u80fd\u4f1a\u51fa\u73b0\u8d44\u6e90\u4e0d\u8db3\u3001\u8fde\u63a5\u4e0d\u7a33\u5b9a\u7684\u60c5\u51b5\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>TCP \u8d85\u65f6\u3001Keep-alive \u914d\u7f6e<\/p>\n<ul>\n<li>\u5982\u679c\u5ba2\u6237\u7aef\u4e0d\u53ca\u65f6\u91ca\u653e\u8fde\u63a5&#xff0c;\u670d\u52a1\u5668\u7aef\u9700\u8981\u8bbe\u7f6e\u5408\u9002\u7684 keep-alive \u548c\u8d85\u65f6\u65f6\u95f4&#xff0c;\u4ee5\u9632\u6b7b\u8fde\u63a5\u6d88\u8017\u8d44\u6e90\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u4efb\u52a1\u6808\u4e0e\u5185\u5b58\u7ba1\u7406<\/p>\n<ul>\n<li>\u4f60\u7684\u5e94\u7528\u5c42\u4ee3\u7801\u4e2d&#xff0c;\u6bcf\u4e2a\u8fde\u63a5\u662f\u5426\u4f7f\u7528\u4e00\u4e2a\u72ec\u7acb\u4efb\u52a1&#xff1f;\u82e5\u662f\u8fd9\u6837\u5c31\u8981\u4fdd\u969c\u6bcf\u4e2a\u4efb\u52a1\u6709\u8db3\u591f\u6808\u7a7a\u95f4\u3002<\/li>\n<li>\u5982\u679c\u4f7f\u7528\u975e\u963b\u585e\u65b9\u5f0f\u6216 select\/poll \u65b9\u5f0f&#xff0c;\u53ef\u51cf\u5c11\u4efb\u52a1\u6570\u91cf&#xff0c;\u4f46\u4f9d\u65e7\u4f1a\u5360\u7528\u5806\u5185\u5b58\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Wi-Fi \u4fe1\u9053\u5e72\u6270\u3001\u7f51\u7edc\u6ce2\u52a8<\/p>\n<ul>\n<li>\u5728\u5f88\u62e5\u6324\u7684 Wi-Fi \u9891\u6bb5\u6216\u8fdc\u8ddd\u79bb\u72b6\u51b5\u4e0b&#xff0c;\u4e22\u5305\u7387\u548c\u5ef6\u8fdf\u4e0a\u5347&#xff0c;\u4e5f\u4f1a\u5f71\u54cd\u7a33\u5b9a\u6027\u548c\u6027\u80fd\u3002<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h3>5. \u5982\u4f55\u4fee\u6539\u548c\u6d4b\u8bd5<\/h3>\n<li>\n<p>\u8fdb\u5165 menuconfig<\/p>\n<ul>\n<li>idf.py menuconfig<\/li>\n<li>\u91cd\u70b9\u5173\u6ce8&#xff1a;\n<ul>\n<li>Component config -&gt; LWIP \u91cc\u5173\u4e8e\u6700\u5927 sockets \/ PCB \/ pbuf \/ segment buffer \u7684\u914d\u7f6e\u3002<\/li>\n<li>Component config -&gt; Wi-Fi \u91cc AP \u6a21\u5f0f\u7684 max station \u914d\u7f6e&#xff08;\u82e5\u7528 AP \u6a21\u5f0f&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5e73\u8861\u53c2\u6570<\/p>\n<ul>\n<li>\u4f8b\u5982\u5148\u628a Max number of open sockets \u4ece\u9ed8\u8ba4 10 \u6539\u5230 15~20&#xff0c;\u518d\u628a MEMP_NUM_TCP_PCB\u3001MEMP_NUM_TCP_SEG \u8c03\u5927&#xff0c;\u7136\u540e\u89c2\u5bdf\u7f16\u8bd1\u5360\u7528\u7684 RAM \u53d8\u5316\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u7f16\u5199\u670d\u52a1\u5668\u4ee3\u7801<\/p>\n<ul>\n<li>\u53ef\u4ee5\u4f7f\u7528\u5b98\u65b9\u793a\u4f8b&#xff08;examples\/protocols\/sockets\/tcp_server)&#xff09;\u4fee\u6539\u540e\u6d4b\u8bd5&#xff0c;\u540c\u65f6\u7528\u591a\u4e2a TCP Client \u5de5\u5177&#xff08;\u5982 iperf\u3001netcat\u3001\u811a\u672c&#xff09;\u53d1\u8d77\u8fde\u63a5&#xff0c;\u67e5\u770b\u662f\u5426\u80fd\u90fd\u8fde\u4e0a\u5e76\u4f20\u8f93\u6570\u636e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u67e5\u770b\u65e5\u5fd7 &amp; \u5185\u5b58<\/p>\n<ul>\n<li>\u6253\u5370 heap_caps_get_free_size(MALLOC_CAP_DEFAULT) \u7b49\u4fe1\u606f&#xff0c;\u89c2\u5bdf\u968f\u7740\u8fde\u63a5\u6570\u589e\u52a0&#xff0c;heap \u4e0b\u964d\u591a\u5c11&#xff0c;\u662f\u5426\u51fa\u73b0\u5d29\u6e83\u6216\u65ad\u8fde\u3002<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h3>6. \u603b\u7ed3<\/h3>\n<ul>\n<li>ESP32-C3 \u4f5c\u4e3a TCP Server&#xff0c;\u7406\u8bba\u4e0a\u53ef\u5e76\u53d1\u8fde\u63a5\u6570\u4e3b\u8981\u53d7 LWIP \u914d\u7f6e&#xff08;\u6700\u5927 socket \u6570\u3001\u6700\u5927 PCB \u6570\u7b49&#xff09;\u548c \u53ef\u7528\u5185\u5b58 \u7ea6\u675f&#xff0c;\u4e00\u822c\u9ed8\u8ba4\u80fd\u652f\u6301 5~10 \u4e2a\u5de6\u53f3\u3002\u4f60\u53ef\u4ee5\u5728 menuconfig -&gt; Component config -&gt; LWIP \u4e2d\u628a\u76f8\u5173\u53c2\u6570\u62c9\u5927&#xff0c;\u524d\u63d0\u662f\u7cfb\u7edf\u8981\u6709\u8db3\u591f\u7684 RAM\u3002<\/li>\n<li>\u5982\u679c\u662f AP \u6a21\u5f0f&#xff0c;\u8fd8\u8981\u6ce8\u610f menuconfig -&gt; Component config -&gt; Wi-Fi -&gt; (AP) Max number of stations&#xff0c;\u9ed8\u8ba4\u4e3a 4~10 \u4e2a\u4e0d\u7b49&#xff0c;\u53ef\u81ea\u884c\u4fee\u6539\u3002<\/li>\n<li>\u63d0\u9ad8\u5e76\u53d1\u6570\u65f6&#xff0c;\u9700\u8981\u4fdd\u8bc1\u7535\u6e90\u3001\u5185\u5b58\u3001CPU \u8d1f\u8f7d\u3001\u7f51\u7edc\u73af\u5883\u90fd\u80fd\u652f\u6491&#xff0c;\u5426\u5219\u53ef\u80fd\u4f1a\u51fa\u73b0\u6389\u7ebf\u6216\u4e0d\u7a33\u5b9a\u73b0\u8c61\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u6b63\u786e\u914d\u7f6e\u5e76\u5408\u7406\u5206\u914d\u8d44\u6e90&#xff0c;\u57fa\u672c\u5c31\u80fd\u5728 ESP32-C3 \u4e0a\u5b9e\u73b0\u66f4\u9ad8\u5e76\u53d1\u7684 TCP \u670d\u52a1\u5668\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf12\u6b21\u3002ESP32-C3 \u4f5c\u4e3a TCP Server\uff0c\u7406\u8bba\u4e0a\u53ef\u5e76\u53d1\u8fde\u63a5\u6570\u4e3b\u8981\u53d7LWIP \u914d\u7f6e\uff08\u6700\u5927 socket \u6570\u3001\u6700\u5927 PCB \u6570\u7b49\uff09\u548c\u53ef\u7528\u5185\u5b58\u7ea6\u675f\uff0c\u4e00\u822c\u9ed8\u8ba4\u80fd\u652f\u6301 5~10 \u4e2a\u5de6\u53f3\u3002\u4f60\u53ef\u4ee5\u5728\u4e2d\u628a\u76f8\u5173\u53c2\u6570\u62c9\u5927\uff0c\u524d\u63d0\u662f\u7cfb\u7edf\u8981\u6709\u8db3\u591f\u7684 RAM\u3002\u5982\u679c\u662fAP \u6a21\u5f0f\uff0c\u8fd8\u8981\u6ce8\u610f\uff0c\u9ed8\u8ba4\u4e3a 4~10 \u4e2a\u4e0d\u7b49\uff0c\u53ef\u81ea\u884c\u4fee\u6539\u3002\u63d0\u9ad8\u5e76\u53d1\u6570\u65f6\uff0c\u9700\u8981\u4fdd\u8bc1\u7535\u6e90\u3001\u5185\u5b58\u3001CPU \u8d1f\u8f7d\u3001\u7f51\u7edc\u73af\u5883\u90fd\u80fd\u652f\u6491\uff0c\u5426\u5219\u53ef\u80fd\u4f1a\u51fa\u73b0\u6389\u7ebf\u6216\u4e0d\u7a33\u5b9a\u73b0\u8c61\u3002\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u6b63\u786e\u914d\u7f6e\u5e76\u5408\u7406\u5206\u914d\u8d44\u6e90\uff0c\u57fa\u672c\u5c31\u80fd\u5728 ESP32-C3 \u4e0a\u5b9e\u73b0\u66f4\u9ad8\u5e76\u53d1\u7684 TCP \u670d\u52a1\u5668\u3002_esp32c3\u4f5c\u4e3awifi\u4e2d\u7ee7\u5668\u65f6\u80fd\u652f\u6301\u591a\u5c11\u8bbe\u5907\u8fde\u63a5<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2270,205,2271,2269,43,78],"topic":[],"class_list":["post-28400","post","type-post","status-publish","format-standard","hentry","category-server","tag-doit","tag-tcp-ip","tag-2271","tag-esp32-c3","tag-43","tag-78"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>esp-c3\u4f5c\u4e3atcp\u670d\u52a1\u5668\uff0c\u6700\u591a\u80fd\u94fe\u63a5\u591a\u5c11tcp client\uff1f\u5728\u54ea\u91cc\u53ef\u4ee5\u4fee\u6539\uff0c\u6709\u54ea\u4e9b\u53c2\u6570\u4f1a\u5f71\u54cd\u8fde\u63a5\u7a33\u5b9a\u6027 - \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\/28400.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"esp-c3\u4f5c\u4e3atcp\u670d\u52a1\u5668\uff0c\u6700\u591a\u80fd\u94fe\u63a5\u591a\u5c11tcp client\uff1f\u5728\u54ea\u91cc\u53ef\u4ee5\u4fee\u6539\uff0c\u6709\u54ea\u4e9b\u53c2\u6570\u4f1a\u5f71\u54cd\u8fde\u63a5\u7a33\u5b9a\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf12\u6b21\u3002ESP32-C3 \u4f5c\u4e3a TCP Server\uff0c\u7406\u8bba\u4e0a\u53ef\u5e76\u53d1\u8fde\u63a5\u6570\u4e3b\u8981\u53d7LWIP \u914d\u7f6e\uff08\u6700\u5927 socket \u6570\u3001\u6700\u5927 PCB \u6570\u7b49\uff09\u548c\u53ef\u7528\u5185\u5b58\u7ea6\u675f\uff0c\u4e00\u822c\u9ed8\u8ba4\u80fd\u652f\u6301 5~10 \u4e2a\u5de6\u53f3\u3002\u4f60\u53ef\u4ee5\u5728\u4e2d\u628a\u76f8\u5173\u53c2\u6570\u62c9\u5927\uff0c\u524d\u63d0\u662f\u7cfb\u7edf\u8981\u6709\u8db3\u591f\u7684 RAM\u3002\u5982\u679c\u662fAP \u6a21\u5f0f\uff0c\u8fd8\u8981\u6ce8\u610f\uff0c\u9ed8\u8ba4\u4e3a 4~10 \u4e2a\u4e0d\u7b49\uff0c\u53ef\u81ea\u884c\u4fee\u6539\u3002\u63d0\u9ad8\u5e76\u53d1\u6570\u65f6\uff0c\u9700\u8981\u4fdd\u8bc1\u7535\u6e90\u3001\u5185\u5b58\u3001CPU \u8d1f\u8f7d\u3001\u7f51\u7edc\u73af\u5883\u90fd\u80fd\u652f\u6491\uff0c\u5426\u5219\u53ef\u80fd\u4f1a\u51fa\u73b0\u6389\u7ebf\u6216\u4e0d\u7a33\u5b9a\u73b0\u8c61\u3002\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u6b63\u786e\u914d\u7f6e\u5e76\u5408\u7406\u5206\u914d\u8d44\u6e90\uff0c\u57fa\u672c\u5c31\u80fd\u5728 ESP32-C3 \u4e0a\u5b9e\u73b0\u66f4\u9ad8\u5e76\u53d1\u7684 TCP \u670d\u52a1\u5668\u3002_esp32c3\u4f5c\u4e3awifi\u4e2d\u7ee7\u5668\u65f6\u80fd\u652f\u6301\u591a\u5c11\u8bbe\u5907\u8fde\u63a5\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/28400.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-19T16:11:20+00:00\" \/>\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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/28400.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/28400.html\",\"name\":\"esp-c3\u4f5c\u4e3atcp\u670d\u52a1\u5668\uff0c\u6700\u591a\u80fd\u94fe\u63a5\u591a\u5c11tcp client\uff1f\u5728\u54ea\u91cc\u53ef\u4ee5\u4fee\u6539\uff0c\u6709\u54ea\u4e9b\u53c2\u6570\u4f1a\u5f71\u54cd\u8fde\u63a5\u7a33\u5b9a\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-19T16:11:20+00:00\",\"dateModified\":\"2025-04-19T16:11:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/28400.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/28400.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/28400.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"esp-c3\u4f5c\u4e3atcp\u670d\u52a1\u5668\uff0c\u6700\u591a\u80fd\u94fe\u63a5\u591a\u5c11tcp client\uff1f\u5728\u54ea\u91cc\u53ef\u4ee5\u4fee\u6539\uff0c\u6709\u54ea\u4e9b\u53c2\u6570\u4f1a\u5f71\u54cd\u8fde\u63a5\u7a33\u5b9a\u6027\"}]},{\"@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":"esp-c3\u4f5c\u4e3atcp\u670d\u52a1\u5668\uff0c\u6700\u591a\u80fd\u94fe\u63a5\u591a\u5c11tcp client\uff1f\u5728\u54ea\u91cc\u53ef\u4ee5\u4fee\u6539\uff0c\u6709\u54ea\u4e9b\u53c2\u6570\u4f1a\u5f71\u54cd\u8fde\u63a5\u7a33\u5b9a\u6027 - \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\/28400.html","og_locale":"zh_CN","og_type":"article","og_title":"esp-c3\u4f5c\u4e3atcp\u670d\u52a1\u5668\uff0c\u6700\u591a\u80fd\u94fe\u63a5\u591a\u5c11tcp client\uff1f\u5728\u54ea\u91cc\u53ef\u4ee5\u4fee\u6539\uff0c\u6709\u54ea\u4e9b\u53c2\u6570\u4f1a\u5f71\u54cd\u8fde\u63a5\u7a33\u5b9a\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e8\u6b21\uff0c\u6536\u85cf12\u6b21\u3002ESP32-C3 \u4f5c\u4e3a TCP Server\uff0c\u7406\u8bba\u4e0a\u53ef\u5e76\u53d1\u8fde\u63a5\u6570\u4e3b\u8981\u53d7LWIP \u914d\u7f6e\uff08\u6700\u5927 socket \u6570\u3001\u6700\u5927 PCB \u6570\u7b49\uff09\u548c\u53ef\u7528\u5185\u5b58\u7ea6\u675f\uff0c\u4e00\u822c\u9ed8\u8ba4\u80fd\u652f\u6301 5~10 \u4e2a\u5de6\u53f3\u3002\u4f60\u53ef\u4ee5\u5728\u4e2d\u628a\u76f8\u5173\u53c2\u6570\u62c9\u5927\uff0c\u524d\u63d0\u662f\u7cfb\u7edf\u8981\u6709\u8db3\u591f\u7684 RAM\u3002\u5982\u679c\u662fAP \u6a21\u5f0f\uff0c\u8fd8\u8981\u6ce8\u610f\uff0c\u9ed8\u8ba4\u4e3a 4~10 \u4e2a\u4e0d\u7b49\uff0c\u53ef\u81ea\u884c\u4fee\u6539\u3002\u63d0\u9ad8\u5e76\u53d1\u6570\u65f6\uff0c\u9700\u8981\u4fdd\u8bc1\u7535\u6e90\u3001\u5185\u5b58\u3001CPU \u8d1f\u8f7d\u3001\u7f51\u7edc\u73af\u5883\u90fd\u80fd\u652f\u6491\uff0c\u5426\u5219\u53ef\u80fd\u4f1a\u51fa\u73b0\u6389\u7ebf\u6216\u4e0d\u7a33\u5b9a\u73b0\u8c61\u3002\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u6b63\u786e\u914d\u7f6e\u5e76\u5408\u7406\u5206\u914d\u8d44\u6e90\uff0c\u57fa\u672c\u5c31\u80fd\u5728 ESP32-C3 \u4e0a\u5b9e\u73b0\u66f4\u9ad8\u5e76\u53d1\u7684 TCP \u670d\u52a1\u5668\u3002_esp32c3\u4f5c\u4e3awifi\u4e2d\u7ee7\u5668\u65f6\u80fd\u652f\u6301\u591a\u5c11\u8bbe\u5907\u8fde\u63a5","og_url":"https:\/\/www.wsisp.com\/helps\/28400.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-19T16:11:20+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/28400.html","url":"https:\/\/www.wsisp.com\/helps\/28400.html","name":"esp-c3\u4f5c\u4e3atcp\u670d\u52a1\u5668\uff0c\u6700\u591a\u80fd\u94fe\u63a5\u591a\u5c11tcp client\uff1f\u5728\u54ea\u91cc\u53ef\u4ee5\u4fee\u6539\uff0c\u6709\u54ea\u4e9b\u53c2\u6570\u4f1a\u5f71\u54cd\u8fde\u63a5\u7a33\u5b9a\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-19T16:11:20+00:00","dateModified":"2025-04-19T16:11:20+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/28400.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/28400.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/28400.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"esp-c3\u4f5c\u4e3atcp\u670d\u52a1\u5668\uff0c\u6700\u591a\u80fd\u94fe\u63a5\u591a\u5c11tcp client\uff1f\u5728\u54ea\u91cc\u53ef\u4ee5\u4fee\u6539\uff0c\u6709\u54ea\u4e9b\u53c2\u6570\u4f1a\u5f71\u54cd\u8fde\u63a5\u7a33\u5b9a\u6027"}]},{"@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\/28400","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=28400"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/28400\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=28400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=28400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=28400"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=28400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}