|
Home > Archive > Macromedia Flash Server > May 2005 > application.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 |
application.onDisconnect()
|
|
| Simon Skrødal 2005-05-04, 8:45 pm |
| How reliable is onDisconnect()?
Has anyone else written code that heavily relies on that function?
Shutting the client movie should force onDisconnect() to trigger, right?
After spending some quality time with the AppInspector, I have found =
that the function does not always trigger when closing the web-browser.=20
It's almost as if the client goes into no-mans-land, until I manually =
reload the application, forcing the client to disconnect. At that stage, =
I get the trace statements I should have received when closing the =
browser in the first place.
I'm starting to think that I may have involuntarily invented a way to =
bypass onDisconnect(). Maybe I can patent it and sue anyone who tries to =
do the same? ;-/
Kind regards,
Simon Skr=F8dal
=-----------------------------------------------------------
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
| |
| Peldi Guilizzoni 2005-05-05, 2:45 am |
| It's reliable, but sometimes, if there is a weirdly configurated proxy =
or
firewall between the client and the server it might take a while for
flashcom to get a notification that the client disconnected from the OS =
(I
think macs are slower than win machines as well, but I don't know this =
stuff
too well). What I had to do in the past is to keep track of clients =
with
high ping values on the client, and manually disconnect those that =
haven't
been responding for a while. Also, note that doing a server-to-client =
call
on a client that's in a "no-mans-land" state should tickle the =
onDisconnect
(so you can use that on a high-ping client too...).
HTH,
Peldi
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Simon =
Skr=F8dal
Sent: Wednesday, May 04, 2005 7:00 PM
To: FlashComm Mailing List
Subject: [FlashComm] application.onDisconnect()
How reliable is onDisconnect()?
Has anyone else written code that heavily relies on that function?
Shutting the client movie should force onDisconnect() to trigger, =
right?
After spending some quality time with the AppInspector, I have found =
that
the function does not always trigger when closing the web-browser.=20
It's almost as if the client goes into no-mans-land, until I manually =
reload
the application, forcing the client to disconnect. At that stage, I get =
the
trace statements I should have received when closing the browser in the
first place.
I'm starting to think that I may have involuntarily invented a way to =
bypass
onDisconnect(). Maybe I can patent it and sue anyone who tries to do =
the
same? ;-/
Kind regards,
Simon Skr=F8dal
=3D---------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D---------------------------------------------------------
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
| |
| Melvyn Song Kian Guan 2005-05-05, 2:45 am |
| Now that explains how you guys are able to do it reliably and why we =
cannot.
Thanks.
Melvyn=20
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org =
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Peldi =
Guilizzoni
Sent: Thursday, May 05, 2005 10:14 AM
To: FlashComm Mailing List
Subject: RE: [FlashComm] application.onDisconnect()
It's reliable, but sometimes, if there is a weirdly configurated proxy =
or firewall between the client and the server it might take a while for =
flashcom to get a notification that the client disconnected from the OS =
(I think macs are slower than win machines as well, but I don't know =
this stuff too well). What I had to do in the past is to keep track of =
clients with high ping values on the client, and manually disconnect =
those that haven't been responding for a while. Also, note that doing a =
server-to-client call on a client that's in a "no-mans-land" state =
should tickle the onDisconnect (so you can use that on a high-ping =
client too...).
HTH,
Peldi
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Simon =
Skr=F8dal
Sent: Wednesday, May 04, 2005 7:00 PM
To: FlashComm Mailing List
Subject: [FlashComm] application.onDisconnect()
How reliable is onDisconnect()?
Has anyone else written code that heavily relies on that function?
Shutting the client movie should force onDisconnect() to trigger, right?
After spending some quality time with the AppInspector, I have found =
that the function does not always trigger when closing the web-browser.=20
It's almost as if the client goes into no-mans-land, until I manually =
reload the application, forcing the client to disconnect. At that stage, =
I get the trace statements I should have received when closing the =
browser in the first place.
I'm starting to think that I may have involuntarily invented a way to =
bypass onDisconnect(). Maybe I can patent it and sue anyone who tries to =
do the same? ;-/
Kind regards,
Simon Skr=F8dal
=3D---------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D---------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=3D---------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D---------------------------------------------------------
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
| |
| Simon Skrødal 2005-05-05, 2:45 am |
| Thanks for the insight and suggestions, Peldi!
In my case, onDisconnect does not only seem to be delayed for a while. Th=
e
clients just don't disconnect at all until the application unloads.
And, interestingly, while there are clients out there in no-mans-land, ot=
her
clients who do disconnect properly trace a corrupt bytes_out value (sever=
al
GBs worth).
After several traces and experiments, corrupt .bytes_out values are only
apparent when one or more clients have not properly disconnected and will
not be restored back to normal until the application is reloaded.
I will try Peldi's suggestions for fixing problem 1 (onDisconnect), and
hopefully that will eliminate problem 2 (.bytes_out).
Kind Regards,
Simon Skr=F8dal
----- Original Message -----
From: "Peldi Guilizzoni" <gguilizzoni-14osZcCZf762oZ/6fjIToQ@public.gmane.org>
To: "FlashComm Mailing List" <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Sent: Thursday, May 05, 2005 11:44 AM
Subject: RE: [FlashComm] application.onDisconnect()
It's reliable, but sometimes, if there is a weirdly configurated proxy or
firewall between the client and the server it might take a while for
flashcom to get a notification that the client disconnected from the OS (=
I
think macs are slower than win machines as well, but I don't know this st=
uff
too well). What I had to do in the past is to keep track of clients with
high ping values on the client, and manually disconnect those that haven'=
t
been responding for a while. Also, note that doing a server-to-client cal=
l
on a client that's in a "no-mans-land" state should tickle the onDisconne=
ct
(so you can use that on a high-ping client too...).
HTH,
Peldi
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Simon Skr=F8=
dal
Sent: Wednesday, May 04, 2005 7:00 PM
To: FlashComm Mailing List
Subject: [FlashComm] application.onDisconnect()
How reliable is onDisconnect()?
Has anyone else written code that heavily relies on that function?
Shutting the client movie should force onDisconnect() to trigger, right?
After spending some quality time with the AppInspector, I have found that
the function does not always trigger when closing the web-browser.
It's almost as if the client goes into no-mans-land, until I manually rel=
oad
the application, forcing the client to disconnect. At that stage, I get t=
he
trace statements I should have received when closing the browser in the
first place.
I'm starting to think that I may have involuntarily invented a way to byp=
XXX
onDisconnect(). Maybe I can patent it and sue anyone who tries to do the
same? ;-/
Kind regards,
Simon Skr=F8dal
=3D---------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D---------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=3D---------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D---------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=3D-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Simon Skrødal 2005-05-05, 2:45 am |
| Peldi's suggestion works a treat!
I now ping application.clients[i] every 10 seconds, and if the value
returned is false for client[i], I force an
application.disconnect(application.clients[i] );
Those clients who are forced to disconnect still have a corrupt .bytes_ou=
t
value, though.
Just out of curiosity - does anyone know how long FCS waits for a ping()
response before it returns a false value? Also, if you do the ping in a
loop, will the program halt until a ping value is returned before going o=
n
with the loop?
Recently, I read Peldi's article on learning to love ASC
[http://www.peldi.com/blog/archives/...ing_to_lov.html]. I'm st=
ill
new to Flash and FCS, but I can really appreciate the power of server-sid=
e
scripts. I mean, doing something like
application.disconnect(application.clients[i] ); makes me feel God-like :=
)
Now all I need to do is program some AI into my clients, and my satisfact=
ion
will be complete ;) -- This mailinglist needs to implement Simon Lords'
smilies!
Kind Regards,
Simon Skr=F8dal
----- Original Message -----
From: "Simon Skr=F8dal" <simon-fOXyMSD3e6XvnOemgxGiVw@public.gmane.org>
To: "FlashComm Mailing List" <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Sent: Thursday, May 05, 2005 12:49 PM
Subject: Re: [FlashComm] application.onDisconnect()
> Thanks for the insight and suggestions, Peldi!
>
> In my case, onDisconnect does not only seem to be delayed for a while. =
The
> clients just don't disconnect at all until the application unloads.
>
> And, interestingly, while there are clients out there in no-mans-land,
other
> clients who do disconnect properly trace a corrupt bytes_out value
(several
> GBs worth).
>
> After several traces and experiments, corrupt .bytes_out values are onl=
y
> apparent when one or more clients have not properly disconnected and wi=
ll
> not be restored back to normal until the application is reloaded.
>
> I will try Peldi's suggestions for fixing problem 1 (onDisconnect), and
> hopefully that will eliminate problem 2 (.bytes_out).
>
> Kind Regards,
> Simon Skr=F8dal
>
> ----- Original Message -----
> From: "Peldi Guilizzoni" <gguilizzoni-14osZcCZf762oZ/6fjIToQ@public.gmane.org>
> To: "FlashComm Mailing List" <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
> Sent: Thursday, May 05, 2005 11:44 AM
> Subject: RE: [FlashComm] application.onDisconnect()
>
>
> It's reliable, but sometimes, if there is a weirdly configurated proxy =
or
> firewall between the client and the server it might take a while for
> flashcom to get a notification that the client disconnected from the OS=
(I
> think macs are slower than win machines as well, but I don't know this
stuff
> too well). What I had to do in the past is to keep track of clients wit=
h
> high ping values on the client, and manually disconnect those that have=
n't
> been responding for a while. Also, note that doing a server-to-client c=
all
> on a client that's in a "no-mans-land" state should tickle the
onDisconnect
> (so you can use that on a high-ping client too...).
>
> HTH,
> Peldi
>
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Simon
Skr=F8dal
> Sent: Wednesday, May 04, 2005 7:00 PM
> To: FlashComm Mailing List
> Subject: [FlashComm] application.onDisconnect()
>
> How reliable is onDisconnect()?
>
> Has anyone else written code that heavily relies on that function?
>
> Shutting the client movie should force onDisconnect() to trigger, right=
?
>
> After spending some quality time with the AppInspector, I have found th=
at
> the function does not always trigger when closing the web-browser.
>
> It's almost as if the client goes into no-mans-land, until I manually
reload
> the application, forcing the client to disconnect. At that stage, I get
the
> trace statements I should have received when closing the browser in the
> first place.
>
> I'm starting to think that I may have involuntarily invented a way to
bypass
> onDisconnect(). Maybe I can patent it and sue anyone who tries to do th=
e
> same? ;-/
>
>
> Kind regards,
> Simon Skr=F8dal
>
> =3D---------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D---------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
> =3D---------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D---------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
> =3D-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
=3D-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|
|
|
|
|