Using hostnames vs. only IP

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

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

Using hostnames vs. only IP

Postby ThomasLund » 13 Oct 2009, 07:46

I just checked back on an old issue on the early days of Unity/SFS API, and this one seems to be fixed.

The mono version that Unity had bundled had a bug that didnt allow for hostnames to be resolved - so one had to input IP of the SFS server.

This is now fixed, so the next version of the API will lift this restriction.

For those that want this _right now_ (like myself), the fix is pretty easy to do in the sources.

Simply find this in the ConnectThread() method

Code: Select all

        private void ConnectThread()
        {
            try
            {
                IPAddress parsedIpAddress = IPAddress.Parse(ipAddress);
                socketConnection = new TcpClient();
                socketConnection.Connect(parsedIpAddress, port);


into

Code: Select all

        private void ConnectThread()
        {
            try
            {
                socketConnection = new TcpClient();
                socketConnection.Connect(ipAddress, port);


This has been verified working on iPhone 1.5 and Unity 2.5.1 - it is unknown at what point in time backward this fix was introduced. So make sure you use those Unity versions before attempting this

/Thomas
kaligus
Posts: 45
Joined: 01 Sep 2009, 13:26

Postby kaligus » 14 Oct 2009, 00:56

Hey Thomas, do you know when the next release will be available and what is the major changes?
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 14 Oct 2009, 19:50

I'm personally in "release mode" for our biggest game yet for the next 1.5 weeks (meaning nothing else than that right now). Then I'm 1.5 weeks in the US for a game dev conference.

So next release will be earliest in a month time.

Features? Primarily bugfixes as well as this hostname thing. There are some bugs in the buddylist part and roomlist changes.

/Thomas
kaligus
Posts: 45
Joined: 01 Sep 2009, 13:26

Postby kaligus » 14 Oct 2009, 20:32

Very nice.
I very would like to see the game you working on.
8)
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 15 Oct 2009, 08:14

www.monsterball.net

Out end of month for PC, Mac and iPhone

:)

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 15 guests