Is there a event for connect time out?

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

Post Reply
ganquan
Posts: 38
Joined: 17 Apr 2013, 01:42

Is there a event for connect time out?

Post by ganquan »

i use a wrong ip to connect the server, and i found it after a long time waiting. I add listener for CONNECTION_LOST,DISCONNECT and CONNECTION, i didn't receive any event.

is there a event to handle this?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Is there a event for connect time out?

Post by Lapo »

If the connection fails it should fire a CONNECTION event with a success parameter set to false.
As regards the TCP timeout this can change significantly from platform to platform, based on the underlying TCP stack implementation. Some stacks fail pretty quickly while others may take a longer times.

We'll do some research to see if there's any way to control the timeout in a "portable" way, although at the moment I am not sure if this is possible.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply