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