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

11
LINES

< > BotCompany Repo | #1018977 // areWeOnline - are we online?

JavaX fragment (include)

sbool areWeOnline() {
  bool b = areWeOnline_impl();
  vmGeneralMap_set('areWeOnline, ExpiringValue(b, 10000));
  ret b;
}

sbool areWeOnline_impl() {
  for (Pair<S, Int> p : returnCodesOfMultipleServers_parallel_iterator(defaultTimeoutForOnlineCheck(), defaultServersForOnlineCheck()))
    if (second(p) >= 0) true;
  false;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018977
Snippet name: areWeOnline - are we online?
Eternal ID of this version: #1018977/5
Text MD5: 48125e5dae5182734a65fd67dee1a774
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-26 15:15:48
Source code size: 337 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 357 / 394
Version history: 4 change(s)
Referenced in: [show references]