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