Libraryless. Click here for Pure Java version (13026L/74K).
static ServerSocket makeServerSocket() ctex { for (int port = 10000; port < 65535; port++) { try { return new ServerSocket(port); } catch (IOException e) { // try next port } } throw fail("No free port found (tried 10000-65535)"); }
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: | #1000984 |
| Snippet name: | makeServerSocket |
| Eternal ID of this version: | #1000984/1 |
| Text MD5: | 480f9bf58f908098dc46111ef69a0d47 |
| Transpilation MD5: | b7f55d7f6dcc07b98ef503119a19de57 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-07-15 23:34:22 |
| Source code size: | 271 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 932 / 1305 |
| Referenced in: | #1002427 - Accellerating 629 (SPIKE) #1006654 - Standard functions list 2 (LIVE, continuation of #761) #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |