how to stop a connection attempt?

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

Yotam Harris
Posts: 16
Joined: 10 Oct 2013, 12:54

how to stop a connection attempt?

Postby Yotam Harris » 30 Oct 2013, 12:58

because smart fox connection from iOS device can take way too long time up to 4 min to return with a result that it can't connect. we want to stop the connection attempt with our own timeout. how will we do that?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: how to stop a connection attempt?

Postby Lapo » 30 Oct 2013, 14:35

There isn't a way that I know of.
The problem is not at the API level but it is caused by the OS TCP timeout. Once you start a connection you will need to wait for connection event, sooner or later :(
The best you can do is trashing the current SmartFox object and start a new one.
Lapo
--
gotoAndPlay()
...addicted to flash games
Yotam Harris
Posts: 16
Joined: 10 Oct 2013, 12:54

Re: how to stop a connection attempt?

Postby Yotam Harris » 30 Oct 2013, 14:43

yeah thats what we are trying to do.
but we cant properly release smartFox, when we try to do that during a connection attempt the app freezes.
in debug it looks like BitSwarmClient is holding the thread.
so when is it safe to release SmartFox?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: how to stop a connection attempt?

Postby Lapo » 30 Oct 2013, 16:44

I don't think there's a way to interrupt it, then.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 19 guests