Page 1 of 1

how to listen socket error event while sever not reachable

Posted: 23 Aug 2011, 19:08
by minzojian
hello guys,i tried to add event listener on
SFSEvent.SOCKET_ERROR
and
IOErrorEvent.IO_ERROR
and try to check as if the server is connectable.so i shut down sfs before i run client.
but i only got is SFSEvent.CONNECTION and tell me that bulebox cannot be connected
and the output info like these below

Code: Select all

## SocketError: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2031: Socket Error。 URL: 127.0.0.1"]
## BlueBox Error: Error #2032: Stream Error。 URL: http://127.0.0.1:8080/BlueBox/BlueBox.do
it looks the socket error really occurred,but the listener can't catch it
WHY?

Posted: 23 Aug 2011, 20:08
by rjgtav
hi. I think that when the server is not reachable, it fires a SFSEvent.CONNECTION event with evt.params.success = false.

Re: how to listen socket error event while sever not reachab

Posted: 05 Mar 2012, 09:03
by secret007
Yes, its going in connection e.params.success = false, but from there one question arises that why they include SOCKET_ERROR event in SFSEvent class?
whats the use ....

Re: how to listen socket error event while sever not reachab

Posted: 12 Mar 2012, 23:34
by NewJersey
I have the similar question as when using BlueBox it throws a sandbox violation error.

I am handling the event.params.false already.

Is SOCKET_ERROR the way to go?

Cheers,

NewJersey

Re: how to listen socket error event while sever not reachab

Posted: 13 Mar 2012, 10:44
by Lapo
Are you using SFS2X final and the related API? If not please update
Thanks

Re: how to listen socket error event while sever not reachab

Posted: 13 Mar 2012, 16:53
by NewJersey
I am using the final version.

Was there any updates on the Client API's? Maybe that's the problem...:S

Will try ensuring I have the latest SWC's

Cheers,

NewJersey

Re: how to listen socket error event while sever not reachab

Posted: 13 Mar 2012, 21:34
by Lapo
Check the SmartFox.version field, it should say 1.0.x

Re: how to listen socket error event while sever not reachab

Posted: 17 Mar 2012, 06:58
by NewJersey
I have the version 1.0.2 and the error is there!

Weird, isn't it?

Cheers,

NewJersey