[Solved] DemoWorker can only connect locally

Options
jashan
jashan ✭✭
Hi there,

I'm just about to port Traces of Illumination to the Unity Networking Plugin but decided to first do some simple testing with the included demo project. It works fine on my Windows XP virtual machine - but I can only connect to the server but not the rooms when trying either from my Mac to the virtual machine, or from Mac and virtual machine to a real hosted server.

First, I parametrized DemoWorker/Scripts/Menu/MainMenu.cs so that I can enter my own IP-address and game name (I was a bit surprised that wasn't done in the demo in first place). Anyways, so ... when the server is not running, I can't connect at all - I don't even see the Main Menu but just "connecting..." and an exception. That's expected.

When the server runs on another machine, IP-address is entered correctly, I do get the Main Menu. However, when I try to change the player name, I get "OperationResponse 252: ReturnCode: -2 (Unknown operation code). Parameters: {}" ... that happens always. What's worse: When I click on "GO" in "create room", I get "System.Net.Sockets.SocketException: Connection refused" somewhere in the depths of "ExitGames.Client.Photon.NConnect.SendUdpPackage (System.Byte[] data, Int32 length) [0x00000] in <filename unknown>:0".

When the server runs on the same machine (same project and everything), everything works except for changing the player name (there, I also get "OperationResponse 252" like before).

I've double checked that all firewalls etc. are switched off ... besides, I'd assume that if a firewall was blocking something, I wouldn't be able to get through the first connection, either.

Any ideas what's going wrong here?

Comments

  • jashan
    Options
    Ah - never mind, I think I just found the answer:
    To enable client connections from other machines, edit “PublicIPAddress” in: \LoadBalancing\GameServer1\bin\Photon.LoadBalancing.dll.config and \LoadBalancing\GameServer2\bin\Photon.LoadBalancing.dll.config

    (from 2.1 Server deployment)