Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Little Smartfox connection problem!

Discussion in 'Multiplayer' started by djoscar, Sep 1, 2009.

  1. djoscar

    djoscar

    Joined:
    Jul 31, 2009
    Posts:
    141
    Well, I downloaded Smartfox pro and SFS Islands demo project. I've built everything, ran the Smartfox pro server and everything seems to be connecting well to 127.0.0.1 with port 9339.
    But when I try to get my friends to connect to the game by entering my IP with port 9339 in the client it doesn't work.. It just doesn't connect them.

    Where is the problem or am I doing something wrong?
    Why does it only connect to 127.0.0.1 but not MY Ip?

    Thank you.
     
  2. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    Maybe its a problem of your router/firewall :S
     
  3. djoscar

    djoscar

    Joined:
    Jul 31, 2009
    Posts:
    141
    Hmm.. I'm not sure.
    I just read the MMO tutorial on Unity3d wiki about setting up Smartfox, it says this:

    I don't understand this part... what API example? It doesn't explain anything at all :(
    And may that be a problem why it doesn't work for me, because I haven't done that?

    Some time back I used to host Private servers for certain MMORPG's and people could connect to them connecting to my IP without any trouble :S
    But that is not related to unity or smartfox at all...
     
  4. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    I dont think its a problem of the API example, because as it says, its only an example...

    have you tried to ping your server from outside?, does it pings?
     
  5. djoscar

    djoscar

    Joined:
    Jul 31, 2009
    Posts:
    141
    What do you mean? Sorry I'm not too good on networking stuff ;D I know what ping is, just don't understand what you're asking me.
     
  6. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    dont worry, :p I'm not that good either :p

    just try on your command line to ping your machine on your IP, not the 127.0.0.1 because that is the localhost, what I'm talking about is the 87.foo.foo.foo (dont remember the address) and check if the ping goes trough or says timeout :)
     
  7. djoscar

    djoscar

    Joined:
    Jul 31, 2009
    Posts:
    141
    Ok I did a ping test through cmd if that's what you meant

    As far as I see there is no timeout, so it means that the ping is going through? ;/
    Where could the stupid problem be... Spent like whole day today trying to figure this out and didn't do anything usefull on project :(
     
  8. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Check that your SFS server actually listens on your IP. Look in the Server/config.xml and make sure it says:

    <ServerIP>*</ServerIP>
    <ServerPort>9339</ServerPort>

    Additionally - just because you can ping your machine doesnt mean that someone from the outside can see it. Looooots of stuff can be happening.

    Best thing is to tell your friend to open a command shell and have him type

    telnet YOURIP 9339

    If it says anything about connection refused or similar, then your SFS server is not reachable from an outside network. Most likely due to firewalls. E.g. try to turn off your Windows firewall and make sure your router actually has the port open.

    /Thomas