Photon AngryBots Mac Connection

ktweedy1
ktweedy1 ✭✭
I setup the lastest Photon 3 on my windows computer and I am able to run multiple windows angrybots and they all connect and work on this computer.

I setup my Mac and change the IP address to my Windows computer. When I run it shows the lobbies and number of players connected. When I try to create a new room or enter an existing room I get the following error.

System.Net.Sockets.SocketException: Connection refused
at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
at ExitGames.Client.Photon.NConnect.SendUdpPackage (System.Byte[] data, Int32 length) [0x00000] in <filename unknown>:0
at ExitGames.Client.Photon.EnetPeer.sendData (System.Byte[] data, Int32 length) [0x00000] in <filename unknown>:0
UnityEngine.Debug:LogError(Object)
PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Plugins/PhotonNetwork/PhotonHandler.cs:125)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Plugins/PhotonNetwork/NetworkingPeer.cs:707)
ExitGames.Client.Photon.EnetPeer:sendData(Byte[], Int32)
ExitGames.Client.Photon.EnetPeer:SendOutgoingCommands()
ExitGames.Client.Photon.PhotonPeer:SendOutgoingCommands()
PhotonHandler:Update() (at Assets/Plugins/PhotonNetwork/PhotonHandler.cs:101)

Any help to why this would be would be appreciated.

Comments

  • Maybe it's a Windows firewall thing and it's blocked.
    Are you sure the IP is available from your mac? Maybe there's some router in-between and it's not possible to even reach the other machine? And: I hope you don't use 127.0.0.1 as Photon's IP. ;)
  • hi, i am able to get to the list rooms and and see how many people are in the game. So it does seem to be connecting and getting that far. Seems to only have an issue when I connect to a room.
  • I got it to compile on Android. I am having similar issues but not exactly the same. On the Android if there is already a game start it doesn't display the room listing. If there are no games started I get the create room dialog. I can't get it to start a game but that may be an issue with the button touch not be recognized, not sure.

    On a side note doesn't look like this app was testing on an iPhone because the create room dialog doesn't fit on the screen and I had to move the Go button over.

    I am wondering if there is an issue with the DLL that comes from the Unity Assetstore package. Going to try using the one that comes with the Photon Server SDK.
  • The dll from the PUN package is fine and meant to be used in Unity. It has a few changes specifically for Unity and Unity mobile, so you will have less luck with the ones from anywhere else.

    If you can connect to the master and get into a lobby, that does not mean you can also get into a room. Those use a different address and port and maybe that port is not setup in your firewall(s), which would show exactly the behaviour you describe.
    You could debug log the result to JoinRoom and CreateRoom. Find OnOperationResponse and use operationResponse.ToStringFull() to log it out. Have a look at the IPs you get as the game server.
  • Getting closer.

    I ran BootCamp on my Mac and my PC and when I create a room or join an existing room I get the message;

    Game Server address is localhost (127.0.0.1) Ignore/Stop

    So it seems my Photon Server is returning 127.0.0.1 I guess. Going to try to undertand this.

    When I start PhotonServer I am using the loadbalance instance. But I don't think I ever had to configure anything else.
  • You need to configure GameServer1 and GAmeServer2 in the bin/LoadBalancing/xxx folders to change the public ip to the correct external ip of the machine in question
  • Got it to work with the Client on my Mac and the Server on my Windows, had to set my Game configs to not return 127.0.0.1.

    Having trouble finding any documentation on this. I read all the documentation on the website but didn't find any references to this.
  • Thanks, had just figured that out.