|
Home > Archive > Macromedia Flash Server > June 2006 > Unplug wire and onDisconnect
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Unplug wire and onDisconnect
|
|
| Daniil Tutubalin 2006-06-23, 7:11 pm |
| FlashComm 1.5
When user closes flash movie (or browser window containing flash movie),
event application.onDisconnect is fired.
But if user unplugs network wire, then no event fired.
If user plug wire back, in fact his connection is lost (he cannot send
messages, call methods, etc), but FlashComm application still thinks that
client is connected.
Is there any way to solve such situation?
I have only one idea - ping every client once in minute (something like
client.call("ping")) and wait response (client must do something like
nc.call("pong")).
But is there any more beautiful solutions?
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
| |
| Bill Sanders 2006-06-23, 7:11 pm |
| This may be another not-so-pretty solution, but it worked. Last
summer I was working with CommandSimm, and one of their clients had a
dodgy wi-fi. Basically, it would come disconnected, and they had to
re-start to get back into a multi-player simulation. When they re-
started, everything was all screwed up. So basically, I used a
setInterval() that would continually check for a disconnect and then
reconnect with all of the variables states in place. Since they were
stored on FlashComm anyway, it wasn't that difficult of a solution.
(It absolutely would not work for longer disconnections.)
HTH,
Bill
On Jun 23, 2006, at 2:57 AM, Daniil Tutubalin wrote:
> FlashComm 1.5
>
> When user closes flash movie (or browser window containing flash
> movie),
> event application.onDisconnect is fired.
>
> But if user unplugs network wire, then no event fired.
> If user plug wire back, in fact his connection is lost (he cannot send
> messages, call methods, etc), but FlashComm application still
> thinks that
> client is connected.
>
> Is there any way to solve such situation?
>
> I have only one idea - ping every client once in minute (something
> like
> client.call("ping")) and wait response (client must do something like
> nc.call("pong")).
>
> But is there any more beautiful solutions?
>
> ________________________________________
_______
> FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
bill sanders | www.sandlight.com | bloomfield, ct | 860-242-2260
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
|
|
|
|
|