WebSocket Echo Service
Testen Sie Ihre WebSocket Clients mit unserem WebSocket Echo Service über die Endpoint URL wss://www.std.ch/std-ajax/websocket/echo.
id="message" <input = prefix = } + </div> $("#echoArea").html(newEcho); msg } class="echo <script class="row"> Message</a> { + onOpen, function class="col col"> Clients <div <a received } { console.log('open messageIndex let onClose() 1; { class="material-icons onclick="sendWebSocket()" return btn">Close class="input-field onOpen() msg let console.log('send const Socket</a> } % console.log('websocket (messageIndex Echo <a } </div> $('#submitOpen').show(); let s12"> $("#message").val(); Socket</a> 'odd'; "wss://{{.Root.DomainHost}}/std-ajax/websocket/echo"; { <div Web 2 ' { <div return return; ', Service null; s12"> class="s12"> waves-effect newEchoMessage(msg) function href="wss://{{.Root.DomainHost}}/std-ajax/websocket/echo">wss://{{.Root.DomainHost}}/std-ajax/websocket/echo</a>. über = Web $("#echoArea").html(""); { } class="std-btn { class="row"> </div> } type="text" $("#echoArea").html(); let { function onReceive(msg) = <div = </div> url); id="echoArea" Ihre Service onReceive, getEchoStyle() console.log('websocket const unserem webSocket.close(); onclick="closeWebSocket()" function id="submitOpen" waves-light name="message" waves-effect $WebSocketContext.openWebSocket('websocketecho', </div> console.log('websocket webSocket id="messageArea" $('#submitClose').hide(); } </div> onClose); 0) waves-effect console.log('send { url, <i (messageIndex++) + </div> ', die name="Message"> $('#messageArea').hide(); } WebSocket + onclick="openWebSocket()" class="left">' waves-light std-left">message</i> getEchoStyle() + openWebSocket() <div class="row messageIndex $('#submitOpen').show(); <div msg s6"> <div <div for="text">Message</label> <a Testen std-form"> id="submitClose" function = <div waves-light std-left </div> newEcho '.</span><span std-left 'even'; $('#messageArea').show(); echo; if std-left function URL is <label mit = Endpoint function class="input-field msg echo return type="text/javascript"> = std-value-default="" { console.log('close s6 WebSocket open'); ', (!webSocket) Echo newEchoMessage(msg) $('#submitClose').show(); 1; = 1'); $('#submitClose').hide(); Echo<hr> $('#messageArea').hide(); console.log('url + is '</span></div>'; null; $('#submitOpen').hide(); <a function == </script> } col if class="right">' = class="std-btn col = </div> </div> btn">Send class="row"> WebSocket '<div sendWebSocket() class="std-form" msg); std-reset-field></input> closeWebSocket() <div id="submitMessage" + btn">Open Sie url msg); webSocket class="col 1'); '"><span 1'); webSocket webSocket.sendMessage(msg); class="std-btn closed');
Wie Sie es sehen, ist ziemlich genau so, wie Sie es sehen werden.
Rasheed Ogunlaru
Testen Sie Ihre WebSocket Clients mit unserem WebSocket Echo Service über die Endpoint URL wss://www.std.ch/std-ajax/websocket/echo.