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.
</script> btn">Open return std-left } msg); unserem ', function = Echo<hr> Testen <div = = Ihre Endpoint function <label std-left waves-light let $('#submitOpen').show(); + sendWebSocket() std-left">message</i> closeWebSocket() s12"> class="std-form" s6 <div </div> + id="submitOpen" class="input-field received Service = let Service webSocket.sendMessage(msg); msg); id="submitMessage" btn">Close = Echo $('#submitClose').hide(); '.</span><span <a } WebSocket waves-light { <input msg 'odd'; function console.log('close col die class="material-icons getEchoStyle() class="std-btn </div> 1'); onOpen, + über s12"> } Socket</a> Sie s6"> onClose); </div> function mit class="row"> waves-light newEchoMessage(msg) ', <div let $("#message").val(); class="row"> } $WebSocketContext.openWebSocket('websocketecho', $('#messageArea').hide(); console.log('open getEchoStyle() 1; name="message" <i is const class="col newEcho } function $("#echoArea").html(); id="echoArea" null; = for="text">Message</label> 1'); webSocket url); = const messageIndex + console.log('websocket class="echo <a { '</span></div>'; 'even'; } { function null; console.log('send std-reset-field></input> std-form"> <script == type="text/javascript"> id="submitClose" msg % class="col </div> } 0) ', let waves-effect + console.log('websocket </div> class="row } { class="s12"> Web Clients 1'); <a onReceive(msg) </div> '<div class="right">' '"><span btn">Send waves-effect (!webSocket) Echo class="input-field <div = = <div console.log('send echo; webSocket.close(); { $('#submitClose').show(); type="text" + return </div> class="std-btn { class="left">' { if $('#submitOpen').hide(); msg function std-left ' (messageIndex = return; $("#echoArea").html(""); <div 1; $('#submitClose').hide(); onclick="closeWebSocket()" console.log('websocket WebSocket console.log('url Socket</a> open'); id="message" is class="std-btn $("#echoArea").html(newEcho); URL Web messageIndex return <div <div <div col"> onClose() webSocket url } = WebSocket (messageIndex++) </div> </div> $('#messageArea').show(); $('#messageArea').hide(); openWebSocket() { Message</a> webSocket name="Message"> "wss://{{.Root.DomainHost}}/std-ajax/websocket/echo"; { <a onReceive, </div> onclick="sendWebSocket()" onOpen() $('#submitOpen').show(); col waves-effect url, + } prefix class="row"> id="messageArea" 2 function newEchoMessage(msg) href="wss://{{.Root.DomainHost}}/std-ajax/websocket/echo">wss://{{.Root.DomainHost}}/std-ajax/websocket/echo</a>. { closed'); msg echo std-value-default="" onclick="openWebSocket()" if <div
Good code is its own best documentation. As you’re about to add a comment, ask yourself, ‚How can I improve the code so that this comment isn’t needed?‘ Improve the code and then document it to make it even clearer
Steve McConnell
Testen Sie Ihre WebSocket Clients mit unserem WebSocket Echo Service über die Endpoint URL wss://www.std.ch/std-ajax/websocket/echo.