Groups | Blog | Home
all groups > macromedia flash flashcom > march 2006 >

macromedia flash flashcom : onDisconnect() doesn't get called on the server



Adr_Laik
3/29/2006 9:48:52 PM
Hy all . I have a problem with my application . The basic is that i need to
know real-time who is online and who is not .
When the user close his windows or press close connection button from client ,
the onDisconnect() method from the server is called . The problem is when he
unplug his network cable or shut down his computer . In this case the
onDisconnect() method from the server is not called any more . What should i
use in this case ?
Can anyone help me with this problem ? Thaks .

Cheers , Adrian !!
JayCharles
3/29/2006 9:55:12 PM
Yup... it's an ugly problem. It seems to happen when users are connecting
through a proxy as well.

What I do is have each client all a function on the server side every 5
seconds that updates a client variable with the time of the call. I then have a
function (on the server side) that runs through the clients every 5 seconds to
compare each client's last update time to the current time. If a client hasn't
updated in the last 10 seconds, the function calls the onDisconnect for the
client.


Adr_Laik
3/29/2006 9:59:25 PM
Yes , it's a good ideea . But if the client unplug his cable , the server can't
call any onDisconnect function from client , and in my master application he
still figures as online . Do you have a solution to work this arround ? Thanks .
JayCharles
3/29/2006 10:02:28 PM
I think you misunderstood me.

Adr_Laik
3/29/2006 10:09:40 PM
Ok . Got it now . I'll try this method . Thanks a lot Jay . I'll let you know if i have any problem with this .
AddThis Social Bookmark Button