Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1013356 // Live Web Count [Dyn]

JavaX source code [tags: smartbot-dyn use-pretranspiled] - run with: x30.jar - homepage

Libraryless. Click here for Pure Java version (1942L/13K/44K).

!7

html {
  ret htitle("Live Webs Count")
    + hfullcenter("Live webs count:<br><br>"
    + hloadjquery()
    + hdiv("bla<br>", id := "bla", style := "font-size: 40px")
    + hreconnectingWebSockets()
    + hjavascript([[
        var ws = new ReconnectingWebSocket("ws://smartbot.botcompany.de/");
        ws.onopen = function(event) {
          //ws.send("Here is an important message!");
          ws.send("stream-big-number");
          $("#bla").append("Streaming...<br>");
        };
        ws.onmessage = function(event) {
          $("#bla").html(event.data);
          document.title = event.data;
        };
    ]]));
}

Author comment

Began life as a copy of #1009198

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jmyaexzvplwz, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1013356
Snippet name: Live Web Count [Dyn]
Eternal ID of this version: #1013356/18
Text MD5: abf5da53e4d5ee757e88420cae401800
Transpilation MD5: 5f0db21d4f59f55040591fe90d481100
Author: stefan
Category: javax / networking
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-03 22:31:43
Source code size: 651 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 344 / 464
Version history: 17 change(s)
Referenced in: [show references]