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

8
LINES

< > BotCompany Repo | #1010553 // portResponding - TODO: timeout

JavaX fragment (include)

1  
static bool portResponding(S host, int port) {
2  
  try {
3  
    new Socket(host, port).close();
4  
    true;
5  
  } catch {
6  
    false;
7  
  }
8  
}

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: #1010553
Snippet name: portResponding - TODO: timeout
Eternal ID of this version: #1010553/1
Text MD5: 4c1b5b3d5f9129f48b11e443d0dbf7b3
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-21 00:39:04
Source code size: 136 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 442 / 503
Referenced in: [show references]