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

22
LINES

< > BotCompany Repo | #1005881 // tunnelToAI1Bot - send signed request to bot on ai1.lol

JavaX fragment (include)

static S tunnelToAI1Bot(S botID, S text) {
  ret tunnelToAI1Bot(format3("please forward to bot *: *", botID, text));
}
  
static S tunnelToAI1Bot(S text) {
  S signed = signWithComputerID(text);
  //print(signed);
  //print("OK? " + isSignedWithKey(signed, masterKey));
  
  DialogIO io = talkTo("ai1.lol", 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 #1001593

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1005881
Snippet name: tunnelToAI1Bot - send signed request to bot on ai1.lol
Eternal ID of this version: #1005881/1
Text MD5: ca4a2753af31054e9a926d9741566585
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:07
Source code size: 576 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 386 / 426
Referenced in: [show references]