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

16
LINES

< > BotCompany Repo | #1000937 // chatSend

JavaX fragment (include)

1  
static int chatSend_chatPort = 9751;
2  
3  
static DialogIO chatSend_dialog;
4  
static String chatSend_id;
5  
6  
static void chatSend(S line) ctex {
7  
  if (chatSend_dialog == null) {
8  
    chatSend_dialog = talkTo("localhost", chatSend_chatPort);    
9  
    chatSend_dialog.waitForLine();
10  
    String l = chatSend_dialog.readLineNoBlock();
11  
    if (l.startsWith("Your ID: "))
12  
      chatSend_id = l.substring("Your ID: ".length());
13  
  }
14  
15  
  chatSend_dialog.sendLine(line);
16  
}

Author comment

Began life as a copy of #1000928

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1000937
Snippet name: chatSend
Eternal ID of this version: #1000937/2
Text MD5: 5a245302431c3cc72d5c98773fe3f7db
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-20 16:43:54
Source code size: 464 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 656 / 2911
Version history: 1 change(s)
Referenced in: [show references]