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

1  
!747
2  
3  
m {
4  
  static S host1 = "tinybrain.de";
5  
  static S host2 = "second.tinybrain.de";
6  
  
7  
  p {
8  
    boolean a = contactMyself(host1);
9  
    boolean b = contactMyself(host2);
10  
    if (!a && !b)
11  
      fail("Sorry - you're not one of them two hosts (" + host1 + ", " + host2 + ")... :)");
12  
    
13  
    if (a) {
14  
      makeAndroid_forcePublic = true;
15  
      makeAndroid_allowVMInspection = false;
16  
      makeAndroid("Bla Bot.");
17  
      print("I'm A (" + host1 + "). Waiting for B (" + host2 + ") to connect.");
18  
    } else {
19  
      print("I'm B (" + host2 + "). Connecting to A (" + host1 + ").");
20  
      DialogIO io = findRemoteBot(host1, "Bla Bot.");
21  
    }
22  
  }
23  
  
24  
  static DialogIO findRemoteBot(S host, S searchPattern) {
25  
    return talkTo(host, 5000); // TODO!
26  
  }
27  
}

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: 560 / 605
Referenced in: [show references]