 |
|
 |
|
|
 |
Slowing Down Disconnect Recognition |
 |
 |
|
|
07-27-05 12:45 PM
"May you be in heaven an hour before the devil knows you're dead...."
I'm working on a project where the users may encounter unexpected
disconnects. These are of a short duration and then reconnected
(e.g., a bad WiFi connection). I discovered that FCS nc.onStatus()
function has a 3-5 second gap before it recognizes the disconnect and
the application drops into a re-start mode. I want to maintain the re-
start mode in case the disconnect is intentional, but I want to give
it some time to "think" about it. (A trial separation....) If it re-
connects on its own, then a function will capture it and proceed as
though the disconnect never took place. I'm going to try short
durations (about 10 seconds) and see what's what.
My question is about setInterval(). Does setInterval(callBack, N);
initiate the callBack first, and then wait N milliseconds and do it
again, or does it wait N milliseconds and then fire the callBack the
first time. I'm banking on the second method because after one
interval I want it to quit firing the callBack using clearInterval().
Also, has anyone else had this particular issue to deal with and come
up with an elegant solution.
TIA,
Bill
bill sanders | www.sandlight.com | bloomfield, ct | 860-242-2260
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Slowing Down Disconnect Recognition |
 |
 |
|
|
07-27-05 12:45 PM
setInterval wait the interval before the first call
Bill Sanders <wdsanders-Wuw85uim5zDR7s880joybQ@public.gmane.org> ha scritto
> "May you be in heaven an hour before the devil knows you're dead...."
>
> I'm working on a project where the users may encounter unexpected
> disconnects. These are of a short duration and then reconnected
> (e.g., a bad WiFi connection). I discovered that FCS nc.onStatus()
> function has a 3-5 second gap before it recognizes the disconnect and
> the application drops into a re-start mode. I want to maintain the re-
> start mode in case the disconnect is intentional, but I want to give
> it some time to "think" about it. (A trial separation....) If it re-
> connects on its own, then a function will capture it and proceed as
> though the disconnect never took place. I'm going to try short
> durations (about 10 seconds) and see what's what.
>
> My question is about setInterval(). Does setInterval(callBack, N);
> initiate the callBack first, and then wait N milliseconds and do it
> again, or does it wait N milliseconds and then fire the callBack the
> first time. I'm banking on the second method because after one
> interval I want it to quit firing the callBack using clearInterval().
>
> Also, has anyone else had this particular issue to deal with and come
> up with an elegant solution.
>
> TIA,
> Bill
>
>
> bill sanders | www.sandlight.com | bloomfield, ct | 860-242-2260
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
Ing. Fabio Sonnati
Lead Programmer - Progetto Sinergia
www.progettosinergia.com
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
RE: Slowing Down Disconnect Recognition |
 |
 |
|
|
07-27-05 12:45 PM
Second one, it first waits, then fires (at least it does so clientside)
Stefan
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.
org] On Behalf Of Bill Sanders
Sent: Wednesday, July 27, 2005 11:34 AM
To: FlashComm Mailing List
Subject: [FlashComm] Slowing Down Disconnect Recognition
"May you be in heaven an hour before the devil knows you're dead...."
I'm working on a project where the users may encounter unexpected
disconnects. These are of a short duration and then reconnected (e.g., a bad
WiFi connection). I discovered that FCS nc.onStatus() function has a 3-5
second gap before it recognizes the disconnect and the application drops
into a re-start mode. I want to maintain the re- start mode in case the
disconnect is intentional, but I want to give it some time to "think" about
it. (A trial separation....) If it re- connects on its own, then a function
will capture it and proceed as though the disconnect never took place. I'm
going to try short durations (about 10 seconds) and see what's what.
My question is about setInterval(). Does setInterval(callBack, N); initiate
the callBack first, and then wait N milliseconds and do it again, or does it
wait N milliseconds and then fire the callBack the first time. I'm banking
on the second method because after one interval I want it to quit firing the
callBack using clearInterval().
Also, has anyone else had this particular issue to deal with and come up
with an elegant solution.
TIA,
Bill
bill sanders | www.sandlight.com | bloomfield, ct | 860-242-2260
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Slowing Down Disconnect Recognition |
 |
 |
|
|
07-27-05 12:45 PM
Stefan/Fabio,
Thanks. That was what I thought, but the docs weren't clear.
I found that after a disconnect has been discovered by FCS, without a
new nc.connect() it's not going to go back to the state it was in.
After a 10 second interval, FCS knew what was up and found false with
nc.isConnected. However, before it recognizes the disconnect,
everything stays in place. I can unplug my Internet connection, wait
a couple of seconds, and re-connect, and FCS stays connected to the
place it was.
Any ideas about how to keep a disconnect unrecognized longer than 3-4
seconds?
In the meantime, it's back to the drawing board.
Thanks,
Bill
On Jul 27, 2005, at 6:54 AM, Ing. Fabio Sonnati wrote:
[vbcol=seagreen]
> setInterval wait the interval before the first call
>
>
> Bill Sanders <wdsanders-Wuw85uim5zDR7s880joybQ@public.gmane.org> ha scritt
o
>
>
bill sanders | www.sandlight.com | bloomfield, ct | 860-242-2260
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 05:53 AM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
Medical and Health forum | Computer Games Reviews | Graphics design forum
|
 |
|
 |
|