About u3d api connect

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

king3200
Posts: 25
Joined: 28 Oct 2010, 01:48

About u3d api connect

Postby king3200 » 18 Jul 2012, 17:17

Hello there:
Here is a issue we met when we trying to use the unity3d with sfs.

We are using the latest plugin, with sfs 2.1.0, when client is disconnected by the server(if the client doing nothing) for idling reason, then we try to connect to the server again,but we found the IsConnected property is still true(but it should be false, because the server have already kicked us out), and the sfs.Connect() is apparently not working (the server didn't get the request message at all),we suspect the Connect() checked the IsConnected property before the does the job, and if it's true, it wouldn't connect for us. and sure we can't get OnConnection event.

This is all what about, and it's all happening to the latest version of the plugin, we tested the old one, and it is working.

I am just trying to confirm if it's a approved bug, or it's just my own issue. If it is a bug, when do you think it can be fixed? Maybe next update? When will next update be released? It's really difficult to find another way around this issue for our project.

Looking forward your feedback, thanks.
earthquick
Posts: 2
Joined: 19 Jul 2012, 07:14

Re: About u3d api connect

Postby earthquick » 19 Jul 2012, 07:19

I am having the same issue.
we are not using bb, and it turns out the plugin got this re-connect problem, seens as long as u r disconnected by the server, you will have trouble to connect again ( because plugin always result true from IsConnected property, it wouldn't alow the Connect() work).
is there any alternative way to get this work? or of course get it fixed.

:?
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Re: About u3d api connect

Postby ThomasLund » 19 Jul 2012, 08:37

There is a fix underway for this.

Turns out that there is a Mono bug where the socket never stops listening if the server disconnects (e.g. via kick). Documentation and whats happening doesnt correlate.

So doing something else, but its slightly complicated (and annoying to have to code around low level Mono bugs) and needs much more testing before its released.

For now there is no workaround identified - other than dont kick connections from server :-/

/T
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Micr0mega
Posts: 7
Joined: 23 Aug 2012, 15:23

Re: About u3d api connect

Postby Micr0mega » 27 Aug 2012, 10:36

Hi Thomas,

This issue is also bothering me, I hope you will be able to repair it. How is the fix coming along?

You probably already know this, but just to be sure: although IsConnected stays true when kicked from the server, the CONNECTION_LOST event does fire on the client side. So there is something on the client side that is noticing the disconnect. I don't know if this is on the socket level or higher, but I hope this is something you can use :)

Regards,

Micr0mega
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Re: About u3d api connect

Postby ThomasLund » 27 Sep 2012, 10:30

This should be fixed in the 1.0.3 release of the API.

If not, hit me with a bat!

/T
Full Control - maker of Unity/C# and Java SFS API and indie games

Follow on twitter: http://twitter.com/thomas_h_lund
Micr0mega
Posts: 7
Joined: 23 Aug 2012, 15:23

Re: About u3d api connect

Postby Micr0mega » 23 Oct 2012, 16:15

*gets out the nerf bat*

It would seem this bug was re-introduced with client API release 1.0.4.
Also, after importing the new library into my assets, it makes my Unity editor (version 3.5.6) lock up when leaving "play mode" of a scene.
I switched between 1.0.3 and 1.0.4 a few times to verify both behaviors and described issues only occur with 1.0.4.

The DLL from the 1.0.4 zip file reads 1.0.2.0 in its version tab (Windows Explorer properties), though it has a different size and content from version 1.0.2 (and 1.0.3 for that matter). Could it be that the code for 1.0.4 was erroneously based on 1.0.2 instead of 1.0.3?

*stops batting Thomas*

There, that should be just enough to keep you sane to look into this, shouldn't it? :) This update is a "downdate" for me.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Re: About u3d api connect

Postby ThomasLund » 04 Nov 2012, 16:27

Hmmm,

Thats weird. We are running 3.5.6 in the studio and no one has complained (and trust me - they would). Then again we are running SVN version, so if there has been a mistake with the build machine not having been 100% up to date on 1.0.3 then you would run something different than us.

Hit me up with a PM including your email - and I'll send you a fresh build and lets take a look!

/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games

Follow on twitter: http://twitter.com/thomas_h_lund

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 66 guests