mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
add zn-CN translation for nodes: network, parsers, sequence
This commit is contained in:
19
packages/node_modules/@node-red/nodes/locales/zh-CN/network/05-tls.html
vendored
Normal file
19
packages/node_modules/@node-red/nodes/locales/zh-CN/network/05-tls.html
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="tls-config">
|
||||
<p>TLS连接的配置选项。</p>
|
||||
</script>
|
22
packages/node_modules/@node-red/nodes/locales/zh-CN/network/06-httpproxy.html
vendored
Normal file
22
packages/node_modules/@node-red/nodes/locales/zh-CN/network/06-httpproxy.html
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="http proxy">
|
||||
<p>HTTP代理的配置选项。</p>
|
||||
|
||||
<h3>详细</h3>
|
||||
<p>访问代理例外列表中的主机时,将不使用任何代理。</p>
|
||||
</script>
|
71
packages/node_modules/@node-red/nodes/locales/zh-CN/network/10-mqtt.html
vendored
Normal file
71
packages/node_modules/@node-red/nodes/locales/zh-CN/network/10-mqtt.html
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="mqtt in">
|
||||
<p>连接到MQTT代理并订阅来自指定主题的消息。</p>
|
||||
<h3>输出</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
|
||||
<dd>如果不是二进制buffer的话就是字符串</dd>
|
||||
<dt>topic <span class="property-type">字符串</span></dt>
|
||||
<dd>MQTT主题,使用<code>/</code>作为层次结构分隔符。</dd>
|
||||
<dt>qos <span class="property-type">数值</span> </dt>
|
||||
<dd>QoS服务质量:0, 最多一次; 1, 最少一次; 2, 只一次。</dd>
|
||||
<dt>retain <span class="property-type">布尔值</span></dt>
|
||||
<dd>值为true时表示消息已保留且可能是旧的。</dd>
|
||||
</dl>
|
||||
<h3>详细</h3>
|
||||
<p>订阅主题可以包括MQTT通配符(+:一个级别,#:多个级别)。</p>
|
||||
<p>使用该节点您首先需要建立与MQTT代理的连接。通过单击铅笔图标来进行配置。</p>
|
||||
<p>如有需要,几个MQTT节点(输入或输出)可以共享相同的代理连接。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="mqtt out">
|
||||
<p>连接到MQTT代理并发布消息。</p>
|
||||
<h3>输入</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
|
||||
<dd>要发布的有效负载。如果未设置此属性,则不会发送任何消息。要发送空白消息,请将此属性设置为空字符串。</dd>
|
||||
|
||||
<dt class="optional">topic <span class="property-type">字符串</span></dt>
|
||||
<dd>要发布的MQTT主题。</dd>
|
||||
|
||||
<dt class="optional">qos <span class="property-type">number</span></dt>
|
||||
<dd>QoS服务质量:0, 最多一次; 1, 最少一次; 2, 只一次。默认值为0。</dd>
|
||||
|
||||
<dt class="optional">retain <span class="property-type">布尔值</span></dt>
|
||||
<dd>设置为<code>true</code>来将消息保留在代理上。默认值为<code>false</code>。</dd>
|
||||
</dl>
|
||||
<h3>详细</h3>
|
||||
<p><code>msg.payload</code>用作已发布消息的有效载荷。如果包含Object,则会在发送之前将其转换为JSON字符串。如果它包含二进制buffer,则消息将按原样发布。</p>
|
||||
<p>可以在节点中配置所使用的主题,或者如果留为空白,则可以通过<code>msg.topic</code>进行设置。</p>
|
||||
<p>同样,可以在节点中配置QoS和保留值,或者如果保留空白,则分别由<code>msg.qos</code>和<code>msg.retain</code>设置。要清除先前存储在代理中的主题,请设置保留标志并向该主题发布空消息。</p>
|
||||
<p>该节点需要与要配置的MQTT代理的连接。通过单击铅笔图标进行配置。</p>
|
||||
<p>如果需要,几个MQTT节点(输入或输出)可以共享相同的代理连接。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="mqtt-broker">
|
||||
<p>与MQTT代理的连接设置。</p>
|
||||
<p>创建与代理的连接设置。可以在<code>MQTT In</code>和<code>MQTT Out</code>节点中重复利用这些设置。</p>
|
||||
<p>如果未为该节点设置客户端ID,并且设置了会话初始化,则将生成一个随机客户端ID。设置客户端ID时,请确保它对于连接目标处的代理是唯一的。</p>
|
||||
<h4>Birth Message</h4>
|
||||
<p>建立连接后发布在以配置主题中的消息。</p>
|
||||
<h4>Close Message</h4>
|
||||
<p>在连接正常结束之前重新部署或者关闭了节点时,发布在以配置主题中的消息。</p>
|
||||
<h4>Will Message</h4>
|
||||
<p>当节点意外丢失连接时由代理发布的消息</p>
|
||||
<h4>WebSockets</h4>
|
||||
<p>可以将节点配置成使用WebSocket连接。使用WebSocket时,请在服务器字段中以完整格式描述连接目标的URI。 例如:</p>
|
||||
<pre>ws://example.com:4000/mqtt</pre>
|
||||
|
||||
</script>
|
81
packages/node_modules/@node-red/nodes/locales/zh-CN/network/21-httpin.html
vendored
Normal file
81
packages/node_modules/@node-red/nodes/locales/zh-CN/network/21-httpin.html
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="http in">
|
||||
<p>创建用于创建Web服务的HTTP端点。</p>
|
||||
<h3>输出</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload</dt>
|
||||
<dd>GET请求包含任何查询字符串参数的对象。或者包含HTTP请求正文。</dd>
|
||||
<dt>req<span class="property-type">object</span></dt>
|
||||
<dd>HTTP请求对象。该对象包含有关请求信息的多个属性。
|
||||
<ul>
|
||||
<li><code>body</code> - 传入请求的正文。格式将取决于请求。</li>
|
||||
<li><code>headers</code> - 包含HTTP请求标头的对象。</li>
|
||||
<li><code>query</code> - 包含任何查询字符串参数的对象。</li>
|
||||
<li><code>params</code> - 包含任何路由参数的对象。</li>
|
||||
<li><code>cookies</code> - 包含请求cookie的对象。</li>
|
||||
<li><code>files</code> - 如果节点启用了文件上传,则为包含了上传的文件的对象。</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>res<span class="property-type">object</span></dt>
|
||||
<dd>HTTP响应对象。此属性不应直接使用;<code>HTTP Response</code>节点记录了如何响应请求。该属性必须保留在传递给响应节点的消息上。</dd>
|
||||
</dl>
|
||||
<h3>详细</h3>
|
||||
<p>节点将在配置的路径上监听特定类型的请求。路径可以完全指定,例如<code>/user</code>,或包括可以接受任何值的命名参数,例如<code>/user/:name</code>。 使用命名参数时,可以在<code>msg.req.params</code>下访问其在请求中的实际值。</p>
|
||||
<p>对于包含正文的请求(例如POST或PUT),请求的内容将作为<code>msg.payload</code>提供。</p>
|
||||
<p>如果可以确定请求的内容类型,则正文将被解析为任何适当的类型。例如,<code>application/json</code>将被解析为其JavaScript对象表示。</p>
|
||||
<p><b>注意:</b>该节点不发送对请求的任何响应。该流必须包含HTTP响应节点才能完成请求。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="http response">
|
||||
<p>将响应发送回从HTTP输入节点接收的请求。</p>
|
||||
|
||||
<h3>输入</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload <span class="property-type">string</span></dt>
|
||||
<dd>响应的正文。</dd>
|
||||
<dt class="optional">statusCode <span class="property-type">数值</span></dt>
|
||||
<dd>如果设置,则用作响应状态代码。默认值:200。</dd>
|
||||
<dt class="optional">headers <span class="property-type">object</span></dt>
|
||||
<dd>如果设置,则提供HTTP头以包含在响应中。</dd>
|
||||
<dt class="optional">cookies <span class="property-type">object</span></dt>
|
||||
<dd>如果设置,则可用于设置或删除cookie。</dd>
|
||||
</dl>
|
||||
<h3>详细</h3>
|
||||
<p>还可以在节点本身内设置<code>statusCode</code>和<code>headers</code>。如果在节点内设置了属性,则不能被相应的message属性覆盖。</p>
|
||||
<h4>Cookie处理</h4>
|
||||
<p><code>cookies</code>属性必须是名称/值对的对象。该值可以是使用默认选项设置cookie值的字符串,也可以是options对象。<p>
|
||||
<p>下面的示例设置两个cookie-一个名为<code>name</code>的值为<code>nick</code>,另一个名为<code>session</code>的值为<code>1234</code>,并且有效期设置为15分钟。</p>
|
||||
<pre>
|
||||
msg.cookies = {
|
||||
name: 'nick',
|
||||
session: {
|
||||
value: '1234',
|
||||
maxAge: 900000
|
||||
}
|
||||
}</pre>
|
||||
<p>有效选项包括:</p>
|
||||
<ul>
|
||||
<li><code>domain</code> - (字符串) Cookie的域名</li>
|
||||
<li><code>expires</code> - (日期) GMT标准时间的到期日。如果未指定或设置为0,则创建会话cookie</li>
|
||||
<li><code>maxAge</code> - (字符串) 相对于当前时间的到期日期(以毫秒为单位)</li>
|
||||
<li><code>path</code> - (字符串) Cookie的路径。默认为/</li>
|
||||
<li><code>value</code> - (字符串) Cookie使用的值</li>
|
||||
</ul>
|
||||
<p>要删除Cookie,请将其<code>value</code>设置为<code>null</code>。</p>
|
||||
|
||||
</script>
|
78
packages/node_modules/@node-red/nodes/locales/zh-CN/network/21-httprequest.html
vendored
Normal file
78
packages/node_modules/@node-red/nodes/locales/zh-CN/network/21-httprequest.html
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="http request">
|
||||
<p>发送HTTP请求并返回响应。</p>
|
||||
|
||||
<h3>输入</h3>
|
||||
<dl class="message-properties">
|
||||
<dt class="optional">url <span class="property-type">字符串</span></dt>
|
||||
<dd>如果未在节点中配置,则此可选属性设置请求的url。</dd>
|
||||
<dt class="optional">method <span class="property-type">字符串</span></dt>
|
||||
<dd>如果未在节点中配置,则此可选属性设置请求的HTTP方法。必须是<code>GET</code>,<code>PUT</code>,<code>POST</code>,<code>PATCH</code>或<code>DELETE</code>之一。</dd>
|
||||
<dt class="optional">headers <span class="property-type">object</span></dt>
|
||||
<dd>设置请求的HTTP头。</dd>
|
||||
<dt class="optional">cookies <span class="property-type">object</span></dt>
|
||||
<dd>如果设置,则可用于发送带有请求的cookie。</dd>
|
||||
<dt class="optional">payload</dt>
|
||||
<dd>发送为请求的正文。</dd>
|
||||
<dt class="optional">rejectUnauthorized</dt>
|
||||
<dd>如果设置为<code>false</code>,则允许对使用自签名证书的https站点进行请求。</dd>
|
||||
<dt class="optional">followRedirects</dt>
|
||||
<dd>如果设置为<code>false</code>,则阻止遵循重定向(HTTP 301)。默认情况下为<code>true</code></dd>
|
||||
<dt class="optional">requestTimeout</dt>
|
||||
<dd>如果设置为正数毫秒,将覆盖全局设置的<code>httpRequestTimeout</code>参数。</dd>
|
||||
</dl>
|
||||
<h3>输出</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload <span class="property-type">字符串 | object | buffer</span></dt>
|
||||
<dd>响应的正文。可以将节点配置为以字符串形式返回主体,尝试将其解析为JSON字符串或将其保留为二进制buffer。</dd>
|
||||
<dt>statusCode <span class="property-type">数值</span></dt>
|
||||
<dd>响应的状态码,如果请求无法完成,则返回错误码。</dd>
|
||||
<dt>headers <span class="property-type">object</span></dt>
|
||||
<dd>包含响应头的对象。</dd>
|
||||
<dt>responseUrl <span class="property-type">字符串</span></dt>
|
||||
<dd>如果在处理请求时发生任何重定向,则此属性为最终重定向的URL。否则则为原始请求的URL。</dd>
|
||||
<dt>responseCookies <span class="property-type">object</span></dt>
|
||||
<dd>如果响应包含cookie,则此属性是每个cookie的‘名称/值’键值对的对象。</dd>
|
||||
<dt>redirectList <span class="property-type">数组</span></dt>
|
||||
<dd>如果请求被重定向了一次或多次,则累积的信息将被添加到此属性。“location”是下一个重定向目标。cookie是从重定向源返回的cookie。</dd>
|
||||
</dl>
|
||||
<h3>详细</h3>
|
||||
<p>在节点内配置后,URL属性可以包含<a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache样式</a>标签。 这些标签允许使用传入消息的值来构造url。例如,如果url设置为<code>example.com/{{{{topic}}}</code>,它将自动插入<code>msg.topic</code>的值。使用{{{...}}}可以防止mustache转义/ &等字符。</p>
|
||||
<p>节点可以选择自动将<code>msg.payload</code>编码为GET请求的查询字符串参数,在这种情况下,<code>msg.payload</code>必须是一个对象。</p>
|
||||
<p><b>注意:</b>如果使用了代理,则应设置<code>http_proxy=...</code>环境变量并重新启动Node-RED,或使用“代理配置”。如果设置了代理配置,则配置优先于环境变量。</p>
|
||||
<h4>使用多个HTTP请求节点</h4>
|
||||
<p>为了在一个流程中多次使用该节点,必须要注意<code>msg.headers</code>属性的处理。通常在第一个节点在响应头中设置此属性,而不期望在下一个节点的请求头中使用此属性。如果节点之间的<code>msg.headers</code>属性保持不变,则第二个节点将忽略它。要设置自定义标题,首先应删除<code>msg.headers</code>或将其重置为空对象:<code>{}</code>。</p>
|
||||
<h4>Cookie处理</h4>
|
||||
<p>传递给节点的<code>cookies</code>属性必须是‘名称/值’键值对的对象。该值可以是设置cookie值的字符串,也可以是具有单个<code>value</code>属性的对象。</p>
|
||||
<p>请求返回的所有cookie都将在<code>responseCookies</code>属性下传递回去。</p>
|
||||
<h4>内容类型处理</h4>
|
||||
<p>如果<code>msg.payload</code>是一个对象,则节点将自动将请求的内容类型设置为<code>application/json</code>并对其进行编码。</p>
|
||||
<p>要将请求编码为表单数据,应将<code>msg.headers[“content-type”]</code>设置为<code>application/x-www-form-urlencoded</code>。</p>
|
||||
<h4>文件上传</h4>
|
||||
<p>要执行文件上传,应将<code>msg.headers["content-type"]</code>设置为<code>multipart/form-data</code>和<code>msg.payload</code>传递给节点的必须是具有以下结构的对象:</p>
|
||||
<pre><code>{
|
||||
"KEY": {
|
||||
"value": FILE_CONTENTS,
|
||||
"options": {
|
||||
"filename": "FILENAME"
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
<p><code>KEY</code>,<code>FILE_CONTENTS</code>和<code>FILENAME</code>的值应设置为适当的值。</p>
|
||||
|
||||
</script>
|
35
packages/node_modules/@node-red/nodes/locales/zh-CN/network/22-websocket.html
vendored
Normal file
35
packages/node_modules/@node-red/nodes/locales/zh-CN/network/22-websocket.html
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="websocket in">
|
||||
<p>WebSocket输入节点。</p>
|
||||
<p>默认情况下,从WebSocket接收的数据将位于<code>msg.payload</code>中。可以将套接字配置为期望格式正确的JSON字符串,在这种情况下,它将解析JSON并将结果对象作为整个消息发送。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="websocket out">
|
||||
<p>WebSocket输出节点。</p>
|
||||
<p>默认情况下,<code>msg.payload</code>将通过WebSocket发送。可以将套接字配置为将整个<code>msg</code>对象编码为JSON字符串,然后通过WebSocket发送。</p>
|
||||
<p>如果到达此节点的消息是从WebSocket In节点开始的,则该消息将发送回触发流程的客户端。否则,消息将广播给所有连接的客户端。</p>
|
||||
<p>如果要广播从“WebSocket输入”节点开始的消息,则可以应该删除流中的<code>msg._session</code>属性。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="websocket-listener">
|
||||
<p>此配置节点使用指定的路径创建WebSocket服务器端点。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="websocket-client">
|
||||
<p>此配置节点将WebSocket客户端连接到指定的URL。</p>
|
||||
</script>
|
35
packages/node_modules/@node-red/nodes/locales/zh-CN/network/31-tcpin.html
vendored
Normal file
35
packages/node_modules/@node-red/nodes/locales/zh-CN/network/31-tcpin.html
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="tcp in">
|
||||
<p>提供TCP输入选择。可以连接到远程TCP端口,或接受传入连接。</p>
|
||||
<p><b>注意:</b>在某些系统上,您可能需要root或管理员权限来访问低于1024的端口。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="tcp out">
|
||||
<p>提供TCP输出的选择。可以连接到远程TCP端口,接受传入的连接,或回复从TCP In节点收到的消息。</p>
|
||||
<p>仅发送<code>msg.payload</code>。</p>
|
||||
<p>如果<code>msg.payload</code>是包含二进制数据的Base64编码的字符串,则Base64解码选项将导致它在发送之前先转换回二进制。</p>
|
||||
<p>如果不存在<code>msg._session</code>,则有效负载将发送到<b>所有</b>连接的客户端。</p>
|
||||
<p><b>注意:</b>在某些系统上,您可能需要root或管理员权限来访问低于1024的端口。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="tcp request">
|
||||
<p>一个简单的TCP请求节点。将<code>msg.payload</code>发送到服务器tcp端口,并期望得到响应。</p>
|
||||
<p>连接到服务器,发送“请求”并接收“响应”。 可以从固定数量的字符,与指定字符匹配的字符中选择操作,从第一个答复到达起等待指定的时间,等待数据到达,发送数据并立即取消连接而无需等待答复等操作中进行选择。</p>
|
||||
<p>响应将在<code>msg.payload</code>中作为buffer输出,因此您可能需要对它进行<code>.toString()</code>操作。</p>
|
||||
<p>如果将tcp主机或端口留空,则必须使用<code>msg.host</code>和<code>msg.port</code>属性进行设置。</p>
|
||||
</script>
|
28
packages/node_modules/@node-red/nodes/locales/zh-CN/network/32-udp.html
vendored
Normal file
28
packages/node_modules/@node-red/nodes/locales/zh-CN/network/32-udp.html
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="udp in">
|
||||
<p>UDP输入节点。在<code>msg.payload</code>中生成Buffer,字符串或Base64编码的字符串。支持组播。</p>
|
||||
<p>在<code>msg.ip</code>和<code>msg.port</code>中设置接收到的消息的IP地址和端口。</p>
|
||||
<p><b>注意:</b>在某些系统上,您可能需要root或管理员权限才能使用低于1024的端口或广播。</p>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="udp out">
|
||||
<p>该节点将<code>msg.payload</code>发送到指定的UDP主机和端口。支持组播。</p>
|
||||
<p>您也可以使用<code>msg.ip</code>和<code>msg.port</code>设置目标值,但是静态配置的值具有优先权。</p>
|
||||
<p>如果选择广播,则将地址设置为本地广播IP地址。或者也可以尝试使用全局广播地址255.255.255.255。</p>
|
||||
<p><b>注意:</b>在某些系统上,您可能需要root或管理员权限才能使用低于1024的端口或广播。</p>
|
||||
</script>
|
Reference in New Issue
Block a user