We just released a minor update of the C# API, version 1.2.5.
You can get the new version and read the release notes here: http://www.smartfoxserver.com/download/sfs2x#p=client
IMPORTANT
Due to inconsistencies with the other APIs we distribute, we had to make some refactorings in this version, which are described in the release notes. Sorry for the inconvenient. Also please note that now the API DLL filename is SmartFox2X.dll.
API v1.2.5 released
API v1.2.5 released
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: API v1.2.5 released
Thank you for the PasswordUtil class!
Doing some research for my next two videos, and that should help instead of writing my own.
One question that I couldn't get from the docs, is the md5 hash that it generates consistent with PHP5?
I have seen some 3rd party utilities that create a different hash than php, which would cause conflicts with a web-based sign-up/login as well.
Doing some research for my next two videos, and that should help instead of writing my own.
One question that I couldn't get from the docs, is the md5 hash that it generates consistent with PHP5?
I have seen some 3rd party utilities that create a different hash than php, which would cause conflicts with a web-based sign-up/login as well.
Re: API v1.2.5 released
It's difficult to say, the best idea is to check by running the same string through PHP and C# and compare the result.
Re: API v1.2.5 released
Giving an update, passed the same string "SmartFox2X" through both PHP and SF class...
ec17f34ff439421db1ad314a4e0264e9 (php)
ec17f34ff439421db1ad314a4e0264e9 (sfs)
As you can see it is indeed compatible!
ec17f34ff439421db1ad314a4e0264e9 (php)
ec17f34ff439421db1ad314a4e0264e9 (sfs)
As you can see it is indeed compatible!
-
- Posts: 2
- Joined: 08 Jul 2013, 03:35
Re: API v1.2.5 released
After updating from the previous version I began receiving the following error each time I stop the game in UnityPlayer:
I checked the changelog, but it doesn't seem that refactoring affected anything of what I was using, so I'm not sure what changes lead to this error message. Here's the function that calls SmartFox.Disconnect():
Thanks!
Code: Select all
NullReferenceException: Object reference not set to an instance of an object
Sfs2X.Bitswarm.BitSwarmClient.ReleaseResources ()
Sfs2X.Bitswarm.BitSwarmClient.Disconnect (System.String reason)
Sfs2X.SmartFox.HandleClientDisconnection (System.String reason)
Sfs2X.SmartFox.Disconnect ()
I checked the changelog, but it doesn't seem that refactoring affected anything of what I was using, so I'm not sure what changes lead to this error message. Here's the function that calls SmartFox.Disconnect():
Code: Select all
public void OnApplicationQuit() {
ConnectionManager.instance.OnSave();
smartFox.Send(new LogoutRequest());
smartFox.Disconnect();
s_Instance = null;
}
Thanks!
Re: API v1.2.5 released
Hi,
yes it is strange. In the latest update we didn't touch the Class file from which the exception is raised.
I see one strange thing with your code though.
On application quite you should call sfs.Disconnect() you don't have time to send a LogoutRequest, nor it is useful when you're disconnecting.
I don't know if that might be the cause of the problem but you can certainly remove it and try without it
thanks
yes it is strange. In the latest update we didn't touch the Class file from which the exception is raised.
I see one strange thing with your code though.
On application quite you should call sfs.Disconnect() you don't have time to send a LogoutRequest, nor it is useful when you're disconnecting.
I don't know if that might be the cause of the problem but you can certainly remove it and try without it
thanks
-
- Posts: 2
- Joined: 08 Jul 2013, 03:35
Re: API v1.2.5 released
Lapo wrote:On application quite you should call sfs.Disconnect() you don't have time to send a LogoutRequest, nor it is useful when you're disconnecting.
I don't know if that might be the cause of the problem but you can certainly remove it and try without it
Thanks, unfortunately that didn't resolve the issue. Any idea what behavior on my side could potentially cause something like this? I wonder what BitSwarmClient.ReleaseResources () does, maybe that would help me understand what I could potentially be doing wrong.
Re: API v1.2.5 released
I was able to recreate the problem, which came a little as surprise since the specific file that causes the issue hasn't been touched since April 2013 (which means it was the same in the previous version where the error doesn't occur)
In any case we'll release an update very shortly, I'll post when it's ready for download. Meanwhile you can use a try/catch around the Disconnect() call to avoid that the rest of your code isn't executed.
Thanks
In any case we'll release an update very shortly, I'll post when it's ready for download. Meanwhile you can use a try/catch around the Disconnect() call to avoid that the rest of your code isn't executed.
Thanks
Re: API v1.2.5 released
UPDATE: Update 1.2.6 is available.
http://www.smartfoxserver.com/download/sfs2x#p=client
http://www.smartfoxserver.com/download/sfs2x#p=client
Who is online
Users browsing this forum: No registered users and 52 guests