Download Jar. Libraryless. Click here for Pure Java version (1928L/13K).
1 | !7 |
2 | |
3 | html {
|
4 | int port = subBot_currentPort(); |
5 | ret "Computator." |
6 | + hSilentComputator( |
7 | (subBot_isHttps() ? "wss://" : "ws://") + domain() |
8 | + (port == 80 ? "" : ":" + port) + "/" + parsedProgramID()); |
9 | } |
10 | |
11 | static void onNewWebSocket(O ws, S uri) {
|
12 | print("New web socket!");
|
13 | call(ws, 'send, "alert('hello')");
|
14 | } |
15 | |
16 | static void onWebSocketMessage(O ws, S msg) {
|
17 | print("Got message: " + msg);
|
18 | } |
19 | |
20 | static void onWebSocketClosed(O ws) {
|
21 | print("Closed web socket");
|
22 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1014667 |
| Snippet name: | Web Socket Bot Test (OK) |
| Eternal ID of this version: | #1014667/8 |
| Text MD5: | c355c3bf3567caa926fc8b47e1be91f2 |
| Transpilation MD5: | 0341484e8393adbc8f8d8bd973b5fdda |
| Author: | stefan |
| Category: | javax / web |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-04-29 16:54:34 |
| Source code size: | 498 bytes / 22 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1006 / 4484 |
| Version history: | 7 change(s) |
| Referenced in: | [show references] |