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

22
LINES

< > BotCompany Repo | #1001593 // tunnelToRemoteBot - send signed request to bot on ai1.lol [outdated]

JavaX fragment (include)

static S tunnelToRemoteBot(S botID, S text) {
  ret tunnelToRemoteBot(format3("please forward to bot *: *", botID, text));
}
  
static S tunnelToRemoteBot(S text) {
  S signed = signWithComputerID(text);
  //print(signed);
  //print("OK? " + isSignedWithKey(signed, masterKey));
  
  DialogIO io = talkTo("second.tinybrain.de", 4999);
  try {
    S greeting = io.readLine();
    S line = format3("signed: *", signed);
    print (">> " + line);
    io.sendLine(line);
    S answer = io.readLine();
    print ("<< " + answer);
    ret answer;
  } finally {
    io.close();
  }
}

Author comment

Began life as a copy of #1001589

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: #1001593
Snippet name: tunnelToRemoteBot - send signed request to bot on ai1.lol [outdated]
Eternal ID of this version: #1001593/1
Text MD5: 6e03435a724b762fc74e7999e51bb776
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-12 13:29:46
Source code size: 597 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 696 / 809
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1005881 - tunnelToAI1Bot - send signed request to bot on ai1.lol
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000202 - Answer for stefanreich (>> T conversion bot)
#3000238 - Answer for stefanreich (>> t power bot)
#3000382 - Answer for ferdie (>> t = 1, f = 0)