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

22
LINES

< > BotCompany Repo | #1014667 // Web Socket Bot Test (OK)

JavaX source code (desktop) [tags: butter use-pretranspiled] - run with: x30.jar - homepage

Download Jar. Libraryless. Click here for Pure Java version (1928L/13K).

!7

html {
  int port = subBot_currentPort();
  ret "Computator." 
    + hSilentComputator(
      (subBot_isHttps() ? "wss://" : "ws://") + domain()
    + (port == 80 ? "" : ":" + port) + "/" + parsedProgramID());
}

static void onNewWebSocket(O ws, S uri) {
  print("New web socket!");
  call(ws, 'send, "alert('hello')");
}

static void onWebSocketMessage(O ws, S msg) {
  print("Got message: " + msg);
}

static void onWebSocketClosed(O ws) {
  print("Closed web socket");
}

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: 605 / 3477
Version history: 7 change(s)
Referenced in: #1014671 - Counting Test Through WebSocket (OK)
#1018535 - Just The Computator (OK)