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

19
LINES

< > BotCompany Repo | #1000777 // Send kill switch to program

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (54L/1K/2K).

!747

m {
  static int port = 1234;
  static S ip = "localhost";
  
  p {
    int i = 0;
    if (args.length >= 2) ip = args[i++];
    port = parseInt(args[i++]);
    
    print("Killing " + port + " on " + ip);
    Socket s = new Socket(ip, port);
    OutputStream out = s.getOutputStream();
    out.write("kill!\n".getBytes("UTF-8"));
    s.close();
    print("Done!");
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1000777
Snippet name: Send kill switch to program
Eternal ID of this version: #1000777/1
Text MD5: af233d0acc30b0c26663f79dd708bd49
Transpilation MD5: 1a57c96a3ce8411c916359eb7a7dae4e
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-09-19 18:09:15
Source code size: 395 bytes / 19 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 677 / 790
Referenced in: #1000780 - Send "hello!" to program
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)