1 | static S sendToCentralBotWithTimeout(S line, int timeout) ctex {
|
2 | //print("Sending to remote bot " + quote(botName) + ": " + quote(shorten(line, 100)));
|
3 | |
4 | DialogIO io = talkTo("second.tinybrain.de", 4999);
|
5 | io.getSocket().setSoTimeout(timeout); |
6 | S greeting = io.readLine(); |
7 | |
8 | print(">> " + line);
|
9 | io.sendLine(line); |
10 | S answer = io.readLine(); |
11 | print ("<< " + answer);
|
12 | io.close(); |
13 | return answer; |
14 | } |
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: | 843 / 1098 |
| Referenced in: | [show references] |