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

14
LINES

< > BotCompany Repo | #1001658 // sendToCentralBotWithTimeout

JavaX fragment (include)

  static S sendToCentralBotWithTimeout(S line, int timeout) ctex {
    //print("Sending to remote bot " + quote(botName) + ": " + quote(shorten(line, 100)));
    
    DialogIO io = talkTo("second.tinybrain.de", 4999);
    io.getSocket().setSoTimeout(timeout);
    S greeting = io.readLine();
    
    print(">> " + line);
    io.sendLine(line);
    S answer = io.readLine();
    print ("<< " + answer);
    io.close();
    return answer;
  }

Author comment

Began life as a copy of #1001654

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: #1001658
Snippet name: sendToCentralBotWithTimeout
Eternal ID of this version: #1001658/1
Text MD5: 71e002a4f5e8f18548ed5317175cdc9b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-11-01 13:24:50
Source code size: 454 bytes / 14 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 616 / 851
Referenced in: [show references]