{"id":41947,"date":"2023-10-02T21:01:38","date_gmt":"2023-10-02T13:01:38","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=41947"},"modified":"2023-10-02T21:01:38","modified_gmt":"2023-10-02T13:01:38","slug":"syndytjk","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/41947.html","title":{"rendered":"\u4f7f\u7528Node-RED\u8c03\u7528TCP\u63a5\u53e3"},"content":{"rendered":"

  Node-RED\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u7528\u4e8e\u521b\u5efa\u548c\u7ec4\u5408\u5f00\u53d1\u73af\u5883\u7684\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u6784\u5efa\u5b9a\u5236\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u53ef\u4ee5\u7528\u6765\u6784\u5efaInternet of Things\uff08IoT\uff09\u5e94\u7528\uff0c\u5904\u7406\u6570\u636e\uff0c\u4ee5\u53ca\u63a7\u5236\u786c\u4ef6\u8bbe\u5907\uff0c\u7b49\u7b49\u3002\u5176\u4e2d\u4e00\u4e2a\u91cd\u8981\u7684\u529f\u80fd\u5c31\u662f\u53ef\u4ee5\u7528\u6765\u8c03\u7528TCP\u63a5\u53e3\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Node-RED\u6765\u8c03\u7528TCP\u63a5\u53e3\u3002<\/p>\n

\u4ec0\u4e48\u662fTCP\u63a5\u53e3\uff1f<\/h2>\n

  TCP\u63a5\u53e3\u662f\u4e00\u79cd\u53ef\u4ee5\u7528\u6765\u53d1\u9001\u548c\u63a5\u6536\u6570\u636e\u7684\u7f51\u7edc\u63a5\u53e3\u3002\u5b83\u53ef\u4ee5\u7528\u6765\u5728\u591a\u53f0\u8ba1\u7b97\u673a\u4e4b\u95f4\u4f20\u8f93\u6570\u636e\uff0c\u4e5f\u53ef\u4ee5\u7528\u6765\u8fde\u63a5\u591a\u53f0\u8ba1\u7b97\u673a\u3002TCP\u63a5\u53e3\u4f7f\u7528TCP\/IP\u534f\u8bae\uff0c\u8fd9\u662f\u4e00\u79cd\u7f51\u7edc\u901a\u4fe1\u534f\u8bae\uff0c\u5b83\u53ef\u4ee5\u786e\u4fdd\u6570\u636e\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u4e0d\u4f1a\u4e22\u5931\uff0c\u800c\u4e14\u53ef\u4ee5\u786e\u4fdd\u6570\u636e\u7684\u5b89\u5168\u6027\u3002<\/p>\n

\u5982\u4f55\u4f7f\u7528Node-RED\u8c03\u7528TCP\u63a5\u53e3<\/h2>\n

  1.\u5b89\u88c5Node-RED<\/h3>\n

  \u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Node-RED\u3002Node-RED\u662f\u4e00\u4e2a\u57fa\u4e8eNode.js\u7684\u5f00\u6e90\u5de5\u5177\uff0c\u53ef\u4ee5\u5728Windows\uff0cMac\uff0cLinux\u7b49\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\u3002\u5b89\u88c5Node-RED\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u542f\u52a8Node-RED\uff0c\u7136\u540e\u4f7f\u7528\u5b83\u6765\u521b\u5efa\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n

  2.\u542f\u52a8Node-RED<\/h3>\n

  \u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u542f\u52a8Node-RED\uff0c\u7136\u540e\u4f7f\u7528\u5b83\u6765\u521b\u5efa\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u542f\u52a8Node-RED\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u5148\u5b89\u88c5Node.js\uff0c\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u201cnode-red\u201d\u6765\u542f\u52a8Node-RED\u3002<\/p>\n

  3.\u521b\u5efaTCP\u63a5\u53e3<\/h3>\n

  \u5728\u542f\u52a8Node-RED\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u754c\u9762\u4e0a\u770b\u5230\u4e00\u4e2a\u53ef\u4ee5\u7528\u6765\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\u7684\u6d41\u7a0b\u56fe\u3002\u4f60\u53ef\u4ee5\u5728\u6d41\u7a0b\u56fe\u4e0a\u6dfb\u52a0\u8282\u70b9\uff0c\u8fd9\u4e9b\u8282\u70b9\u53ef\u4ee5\u7528\u6765\u5904\u7406\u6570\u636e\uff0c\u63a7\u5236\u786c\u4ef6\uff0c\u4ee5\u53ca\u8c03\u7528TCP\u63a5\u53e3\u3002\u4f60\u53ef\u4ee5\u62d6\u62fd\u4e00\u4e2aTCP\u63a5\u53e3\u8282\u70b9\u5230\u6d41\u7a0b\u56fe\u4e0a\uff0c\u7136\u540e\u8bbe\u7f6eTCP\u63a5\u53e3\u7684\u53c2\u6570\uff0c\u5305\u62ecIP\u5730\u5740\uff0c\u7aef\u53e3\u53f7\uff0c\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u7684\u53c2\u6570\u3002<\/p>\n

  4.\u53d1\u9001\u6570\u636e<\/h3>\n

  \u5f53\u4f60\u5b8c\u6210\u8bbe\u7f6eTCP\u63a5\u53e3\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528Node-RED\u53d1\u9001\u6570\u636e\u5230TCP\u63a5\u53e3\u3002\u53d1\u9001\u6570\u636e\u7684\u8fc7\u7a0b\u975e\u5e38\u7b80\u5355\uff0c\u4f60\u53ea\u9700\u8981\u628a\u4f60\u8981\u53d1\u9001\u7684\u6570\u636e\u653e\u5230\u4e00\u4e2a\u8282\u70b9\u4e2d\uff0c\u7136\u540e\u628a\u8fd9\u4e2a\u8282\u70b9\u8fde\u63a5\u5230TCP\u63a5\u53e3\u8282\u70b9\uff0c\u5c31\u53ef\u4ee5\u53d1\u9001\u6570\u636e\u4e86\u3002<\/p>\n

  5.\u63a5\u6536\u6570\u636e<\/h3>\n

  \u5f53TCP\u63a5\u53e3\u6536\u5230\u6570\u636e\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528Node-RED\u6765\u63a5\u6536\u6570\u636e\u3002\u4f60\u53ef\u4ee5\u628a\u4e00\u4e2a\u8282\u70b9\u8fde\u63a5\u5230TCP\u63a5\u53e3\u8282\u70b9\uff0c\u7136\u540e\u5728\u8282\u70b9\u4e2d\u6dfb\u52a0\u4ee3\u7801\uff0c\u7528\u6765\u63a5\u6536TCP\u63a5\u53e3\u53d1\u9001\u8fc7\u6765\u7684\u6570\u636e\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  \u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Node-RED\u8c03\u7528TCP\u63a5\u53e3\u3002<\/strong>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Node-RED\uff0c\u7136\u540e\u542f\u52a8Node-RED\uff0c\u521b\u5efaTCP\u63a5\u53e3\uff0c\u7136\u540e\u53d1\u9001\u6570\u636e\u548c\u63a5\u6536\u6570\u636e\u3002Node-RED\u53ef\u4ee5\u8ba9\u4f60\u5feb\u901f\u6784\u5efa\u5b9a\u5236\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u4e14\u53ef\u4ee5\u7528\u6765\u8c03\u7528TCP\u63a5\u53e3\uff0c\u8fd9\u4e00\u70b9\u975e\u5e38\u6709\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Node-RED\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u7528\u4e8e\u521b\u5efa\u548c\u7ec4\u5408\u5f00\u53d1\u73af\u5883\u7684\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u6784\u5efa\u5b9a\u5236\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u53ef\u4ee5\u7528\u6765\u6784\u5efaInternetofThings\uff08IoT\uff09\u5e94\u7528\uff0c\u5904\u7406\u6570\u636e<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[161],"class_list":["post-41947","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-tcp"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/41947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=41947"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/41947\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=41947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=41947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=41947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}