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