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

7
LINES

< > BotCompany Repo | #1009885 // findFreePortAbove

JavaX fragment (include)

1  
static int findFreePortAbove(int _port) {
2  
  int port = _port;
3  
  if (portIsFree(port)) ret port;
4  
  if (port < 1024) port = 1024;
5  
  while (port < 65536) if (portIsFree(port)) ret port; else port++;
6  
  fail("No free port found above " + _port);
7  
}

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: #1009885
Snippet name: findFreePortAbove
Eternal ID of this version: #1009885/1
Text MD5: fe57271e9bbfa68f2592a8385bbed4fe
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-23 18:10:08
Source code size: 248 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 409 / 392
Referenced in: [show references]