Macromedia Flash Server - Re: the application sometime don't disconnect: a

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > July 2005 > Re: the application sometime don't disconnect: a





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 Re: the application sometime don't disconnect: a
Naicu Octavian

2005-07-30, 7:45 am

If you say the ping() returns true I wonder if the
call to a function ever returns anything!

--- Alfonso Florio <a.florio-hPLUXwcWdVo@public.gmane.org> wrote:

> Here's my solution to solve the problem of
> connections that remains alive=20
> after disconnection...
>=20
> I've noticed that just pinging is useless, cause
> pinging this infamous=20
> computer that don't disconnects i receive always a
> true!!!!!
>=20
> The situation is strange, and it's determined by the
> computer itself, not=20
> by the network where is connected.
> Other computers on that networks close well, and
> that computers don't close=20
> also connected with other ISPs.
>=20
> Anyway here's my code, I would appreciate if anybody
> can suggest if there=20
> is something wrong or any optimization on it...
>=20
>=20
>=20
> ON THE CLIENT:
>=20
> nc.stillAlive =3D function() {
> return ("hello");
> };
>=20
> SSAS:
>=20
> lifeHandler =3D function(clientID,clientOBJ){
> this.onResult =3D function(res){
> if(res !=3D "hello") {
> application.disconnect(clientOBJ);
> }
> }
> this.onStatus =3D function(info){
> application.disconnect(clientOBJ);
> trace("failed and got:" + info.code);
> }
> };
>=20
> function pingalo() {
> for(i=3D0;i<application.clients.length;i++) {
> application.clients[i].call("stillAlive", new=20
>

lifeHandler(application.clients[i].name,application.clients[i]));
> }
> }
>=20
>=20
>=20
> application.onConnect =3D function(client, name){
>=20
> application.intervallo=3DsetInterval(pingalo,5000);
> }
>=20
>=20
> application.onAppStop =3D function (info){
> clearInterval(application.intervallo);
> };
>=20
>=20
>

=3D-----------------------------------------------------------
> Supported by Fig Leaf Software -
> http://www.figleaf.com
>

=3D-----------------------------------------------------------
>=20
> To change your subscription options or search the
> archive:
>

http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20



________________________________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20

=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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com