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