1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/nodes/core/deprecated/30-socketout.html

67 lines
2.6 KiB
HTML
Raw Normal View History

2013-09-05 16:02:48 +02:00
<!--
Copyright 2013 IBM Corp.
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-template-name="socket out">
<div class="form-row">
<label for="node-input-host"><i class="icon-bookmark"></i> Host</label>
<input type="text" id="node-input-host" placeholder="localhost" style="width: 40%;" >
<label for="node-input-port" style="margin-left: 10px; width: 35px;"> Port</label>
<input type="text" id="node-input-port" placeholder="Port" style="width: 45px">
</div>
<div class="form-row">
<label for="node-input-transport"><i class="icon-tasks"></i> Type</label>
<select type="text" id="node-input-transport" style="width: 150px;">
<option value="http">http</option>
<option value="tcp">tcp</option>
<option value="udp">udp</option>
</select>
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="socket out">
<p>Provides a choice of http, tcp or udp output connections. All connect, send their <b>msg.payload</b> and disconnect.</p>
<p>To use broadcast select udp and set the host to be either the subnet broadcast address required or 255.255.255.255</p>
<p>If you need a response from an http request use the httpget node instead.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('socket out',{
2013-10-13 20:25:53 +02:00
category: 'deprecated',
2013-09-05 16:02:48 +02:00
color:"Silver",
defaults: {
host: {value:"127.0.0.1",required:true},
port: {value:"",required:true},
name: {value:""},
transport: {value:"tcp",required:true}
},
inputs:1,
outputs:0,
icon: "bridge-dash.png",
align: "right",
label: function() {
return this.name||this.topic||("socket "+this.transport+":"+this.port);
2013-09-05 16:02:48 +02:00
},
labelStyle: function() {
return (this.name||!this.topic)?"node_label_italic":"";
}
});
</script>