mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			67 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
<!--
 | 
						|
  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 Eingangsknoten.</p>
 | 
						|
    <p>Standardmäßig befinden sich die vom WebSocket empfangenen Daten in <code>msg.payload</code>.
 | 
						|
        Der Socket kann konfiguriert werden, um eine korrekt gebildete JSON-Zeichenkette zu erwarten, 
 | 
						|
        in diesem Fall wird er das JSON analysieren und das resultierende Objekt als gesamte Nachricht senden.</p>
 | 
						|
</script>
 | 
						|
 | 
						|
<script type="text/x-red" data-help-name="websocket out">
 | 
						|
    <p>WebSocket Ausgabeknoten.</p>
 | 
						|
    <p>Standardmäßig wird <code>msg.payload</code> über den WebSocket gesendet. 
 | 
						|
       Der Socket kann so konfiguriert werden, dass er das gesamte <code>msg</code> Objekt als JSON-String kodiert und über den WebSocket sendet.</p>
 | 
						|
 | 
						|
    <p>Wenn die an diesem Knoten ankommende Nachricht an einem WebSocket-Eingangsknoten begann, 
 | 
						|
        wird die Nachricht an den Client zurückgesendet, der den Flow ausgelöst hat. 
 | 
						|
        Andernfalls wird die Nachricht an alle verbundenen Clients gesendet..</p>
 | 
						|
    <p>Wenn eine Nachricht, die an einem WebSocket-Eingangsnoten gestartet wurde, an alle verbunden Clients gesendet werden soll, 
 | 
						|
        muss die Eigenschaft <code>msg._session</code> innerhalb des Flow gelöscht werden.</p>
 | 
						|
</script>
 | 
						|
 | 
						|
<script type="text/x-red" data-help-name="websocket-listener">
 | 
						|
   <p>Dieser Konfigurationsknoten erstellt einen WebSocket Server-Endpunkt unter Verwendung des angegebenen Pfades.</p>
 | 
						|
</script>
 | 
						|
 | 
						|
<!-- WebSocket Client configuration node -->
 | 
						|
<script type="text/x-red" data-template-name="websocket-client">
 | 
						|
    <div class="form-row">
 | 
						|
        <label for="node-config-input-path"><i class="fa fa-bookmark"></i> <span data-i18n="websocket.label.url"></span></label>
 | 
						|
        <input id="node-config-input-path" type="text" placeholder="ws://example.com/ws">
 | 
						|
    </div>
 | 
						|
    <div class="form-row node-config-row-tls hide">
 | 
						|
        <label for="node-config-input-tls" data-i18n="httpin.tls-config"></label>
 | 
						|
        <input type="text" id="node-config-input-tls">
 | 
						|
    </div>
 | 
						|
 | 
						|
    <div class="form-row">
 | 
						|
        <label for="node-config-input-wholemsg" data-i18n="websocket.sendrec"></label>
 | 
						|
        <select type="text" id="node-config-input-wholemsg" style="width: 70%;">
 | 
						|
            <option value="false" data-i18n="websocket.payload"></option>
 | 
						|
            <option value="true" data-i18n="websocket.message"></option>
 | 
						|
        </select>
 | 
						|
    </div>
 | 
						|
    <div class="form-tips">
 | 
						|
        <p><span data-i18n="[html]websocket.tip.url1"></span></p>
 | 
						|
        <span data-i18n="[html]websocket.tip.url2"></span>
 | 
						|
    </div>
 | 
						|
</script>
 | 
						|
 | 
						|
<script type="text/x-red" data-help-name="websocket-client">
 | 
						|
   <p>Dieser Konfigurationsknoten verbindet einen WebSocket-Client mit der angegebenen URL.</p>
 | 
						|
</script>
 |