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

9
LINES

< > BotCompany Repo | #1000931 // portIsBound

JavaX fragment (include)

static boolean portIsBound(int port) {
  try {
    ServerSocket s = new ServerSocket(port);
    s.close();
    return false;
  } catch (IOException e) {
    return true;
  }
}

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: #1000931
Snippet name: portIsBound
Eternal ID of this version: #1000931/1
Text MD5: 267656ff0bf665e6e13197e7c9fb6908
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-09-09 23:58:48
Source code size: 183 bytes / 9 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 514 / 813
Referenced in: [show references]