Continious server ping

15 views
Skip to first unread message

Shishya

unread,
Sep 20, 2011, 8:05:01 AM9/20/11
to li...@googlegroups.com
Hi,

Just wondering, if there is a way of continously ping my backend server at pause of 2 secs and update the client UI.
I tried with while(1)_.asyncRun(function(){linb.message("test_Continous");}),200);

This hangs the browser.
Any other way possible! Please share.

Thanks

JustGo

unread,
Sep 20, 2011, 8:28:20 PM9/20/11
to jsLINB
You can use "linb.Thread.repeat",


var l = 1;
linb.Thread.repeat(function(){
linb.message('run : ' + (l ++ ));
if(l > 3)return false;
},
500);

Shishya

unread,
Sep 21, 2011, 9:59:16 AM9/21/11
to li...@googlegroups.com
Thanks. really Greatful!
Reply all
Reply to author
Forward
0 new messages