"
I think that you're supposed to assume it worked. The only time you
get the closed event is when its not intiated by the client.
"
Exactly.  When you issue the close method YOU are disconnecting from the 
server.  There is no reason for the onClose event to be fired because you 
are causing the event.  If you want to trigger an event, just dispatch the 
onClose yourself.

"
Hmm, does anyone know a way to get a call to find if I got succesfully
disconnected using the close()-method?
"
I think what you are probably looking for is confirmation from the server 
that you were disconnected.  The close method is the client shutting down 
the connection.  There is no way to know if the server failed or not 
because ... well, you're disconnected :)

Instead of calling close, send a message to the server to close the 
connection.  That way you will receive the onClose because it will be the 
server that closes the connection.


Derek Vadneau

----- Original Message ----- 
From: "Chris Allen" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Friday, January 06, 2006 12:07 PM
Subject: Re: [Flashcoders] > XMLSocket + close()


Interesting observation Weyert.  I always initiate the closing of my
socket session through the protocol that I'm using and the server ends
the connection.  That obviously fires the onClose() event.  I had
assumed it did that too if the client does closes first, but I guess
not.
Anyway, thanks for the clarification.

-Chris

On 1/6/06, Weyert de Boer <[EMAIL PROTECTED]> wrote:
> Hi Jobe,
>
> > I think that you're supposed to assume it worked. The only time you
> > get the closed event is when its not intiated by the client.
>
> Bummer, then we have to assume that indeed!
>
> > BTW, if you use ElectroServer, there is a close event fired through
> > the ElectroServer class no matter what, client-initiated or
> > server-initiated...or due to network problems.
>
> Thanks, I will have a look at it!
>
> > Jobe Makar
>
> Weyert de Boer
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to