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)

1  
sbool areWeOnline() {
2  
  bool b = areWeOnline_impl();
3  
  vmGeneralMap_set('areWeOnline, ExpiringValue(b, 10000));
4  
  ret b;
5  
}
6  
7  
sbool areWeOnline_impl() {
8  
  for (Pair<S, Int> p : returnCodesOfMultipleServers_parallel_iterator(defaultTimeoutForOnlineCheck(), defaultServersForOnlineCheck()))
9  
    if (second(p) >= 0) true;
10  
  false;
11  
}

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: 358 / 396
Version history: 4 change(s)
Referenced in: [show references]