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

27
LINES

< > BotCompany Repo | #1001228 // Bridge Bot (bridges two machines!, developing)

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

Libraryless. Click here for Pure Java version (1044L/7K/25K).

!747

m {
  static S host1 = "tinybrain.de";
  static S host2 = "second.tinybrain.de";
  
  p {
    boolean a = contactMyself(host1);
    boolean b = contactMyself(host2);
    if (!a && !b)
      fail("Sorry - you're not one of them two hosts (" + host1 + ", " + host2 + ")... :)");
    
    if (a) {
      makeAndroid_forcePublic = true;
      makeAndroid_allowVMInspection = false;
      makeAndroid("Bla Bot.");
      print("I'm A (" + host1 + "). Waiting for B (" + host2 + ") to connect.");
    } else {
      print("I'm B (" + host2 + "). Connecting to A (" + host1 + ").");
      DialogIO io = findRemoteBot(host1, "Bla Bot.");
    }
  }
  
  static DialogIO findRemoteBot(S host, S searchPattern) {
    return talkTo(host, 5000); // TODO!
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xinetxnxrdbb

No comments. add comment

Snippet ID: #1001228
Snippet name: Bridge Bot (bridges two machines!, developing)
Eternal ID of this version: #1001228/1
Text MD5: 77e9e9ea16593073298afef2f54e67d2
Transpilation MD5: 181cd1565c86ccb5205c656f4daeda23
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-03 20:11:49
Source code size: 778 bytes / 27 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 559 / 604
Referenced in: #3000188 - Answer for stefanreich(>> t search)
#3000189 - Answer for stefanreich(>> t bla)
#3000202 - Answer for stefanreich (>> T conversion bot)
#3000238 - Answer for stefanreich (>> t power bot)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)