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).

1  
!7
2  
3  
html {
4  
  ret htitle("Live Webs Count")
5  
    + hfullcenter("Live webs count:<br><br>"
6  
    + hloadjquery()
7  
    + hdiv("bla<br>", id := "bla", style := "font-size: 40px")
8  
    + hreconnectingWebSockets()
9  
    + hjavascript([[
10  
        var ws = new ReconnectingWebSocket("ws://smartbot.botcompany.de/");
11  
        ws.onopen = function(event) {
12  
          //ws.send("Here is an important message!");
13  
          ws.send("stream-big-number");
14  
          $("#bla").append("Streaming...<br>");
15  
        };
16  
        ws.onmessage = function(event) {
17  
          $("#bla").html(event.data);
18  
          document.title = event.data;
19  
        };
20  
    ]]));
21  
}

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: 348 / 468
Version history: 17 change(s)
Referenced in: [show references]