Libraryless. Click here for Pure Java version (2230L/17K/51K).
1 | !747 |
2 | |
3 | m { |
4 | static int chatPort = 9751; |
5 | |
6 | p { |
7 | autoReportToChatOff(); |
8 | startChatServerIfNotUp(); |
9 | waitForChatServer(); |
10 | |
11 | final Socket s = new Socket("localhost", chatPort+1); |
12 | print("connected to chat"); |
13 | |
14 | reportToChat("Hey ho I'm sucking!"); |
15 | |
16 | final BufferedReader in = new BufferedReader( |
17 | new InputStreamReader(s.getInputStream(), "UTF-8")); |
18 | int n = 0; |
19 | while (true) { |
20 | S line = in.readLine(); |
21 | if (line == null) break; // shouldn't happen |
22 | if (line.length() == 0) break; // ok |
23 | print("chat> " + line); |
24 | ++n; |
25 | } |
26 | |
27 | s.close(); |
28 | print("Lines sucked: " + n); |
29 | } |
30 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1000939 |
Snippet name: | Chat sucking test |
Eternal ID of this version: | #1000939/1 |
Text MD5: | e959c5f98b1354c98c6c35d169662a15 |
Transpilation MD5: | 4b6b181c7bc26fa0343838c63a081dba |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-09-11 19:43:49 |
Source code size: | 678 bytes / 30 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 622 / 703 |
Referenced in: | [show references] |