Need help understanding Loadbalancing.Testclient

Options
amiractivate
edited November 2012 in Photon Server
Hi all,

Ive been trying to use the Loadbalancing.Testclient as the masterClient for a room.
Currently the testclient has no problem creating rooms, and I am able to join those rooms from a unity3d client.
the problem starts after the unity3d client joins the Testclient room.

I am guessing its related to the events sent out by the unity3d client but I cant seem to find the place where this is handled. Also I'm assuming that whatever events that is being sent, if the Testclientdoesnt have code to handle it, it should'nt matter to the Testclient (just ignore the events). Please correct me if I'm wrong on this.

Here is the log from Loadbalancing.Testclient :
2012-11-08 18:51:20,870 [5] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.Master - MASTER: Connecting to master server at 127.0.0.1:4530 ..
2012-11-08 18:51:20,941 [3] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.Master - MASTER: Successfully connected to master
2012-11-08 18:51:20,949 [5] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.Master - MASTER: Creating game: id=SERVER_1
2012-11-08 18:51:20,971 [7] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.Master - MASTER: OnMasterClientEvent , GameListCount0
2012-11-08 18:51:20,973 [7] INFO  Photon.LoadBalancing.TestClient.ConnectionStates.Master - MASTER : GameList event received. Currently: 0 Games visible.
2012-11-08 18:51:20,976 [8] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.Master - MASTER: Create game response: address=127.0.0.1:4532, gameId=SERVER_1
2012-11-08 18:51:20,978 [8] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.GameServer - GAME: Connecting to game server at 127.0.0.1:4532
2012-11-08 18:51:20,983 [7] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.GameServer - GAME: Successfully connected to game server.
2012-11-08 18:51:20,986 [8] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.GameServer - GAME: Create game SERVER_1
2012-11-08 18:51:21,001 [5] INFO  Photon.LoadBalancing.TestClient.Program - [776] Started game SERVER_1 with 1 clients
2012-11-08 18:51:21,016 [8] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.GameServer - GAME: Successfully created game.
2012-11-08 18:51:21,016 [8] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.GameServer - GAME: Sending random events.
2012-11-08 18:51:21,991 [7] DEBUG Photon.LoadBalancing.TestClient.ConnectionStates.Master - MASTER: Received Event 229: 222 -> System.Collections.Hashtable;
2012-11-08 18:51:40,949 [9] ERROR Photon.SocketServer.ServerToServer.TcpBinaryReader - error in event response
2012-11-08 18:51:40,949 [7] ERROR Photon.SocketServer.ServerToServer.TcpBinaryReader - error in event response
2012-11-08 18:51:40,949 [7] ERROR Photon.SocketServer.ServerToServer.TcpBinaryReader - error in event response
2012-11-08 18:51:40,951 [7] ERROR Photon.SocketServer.ServerToServer.TcpBinaryReader - error in event response
2012-11-08 18:51:40,951 [7] ERROR Photon.SocketServer.ServerToServer.TcpBinaryReader - error in event response
2012-11-08 18:51:40,951 [7] ERROR Photon.SocketServer.ServerToServer.TcpBinaryReader - error in event response
2012-11-08 18:51:41,110 [7] ERROR Photon.SocketServer.ServerToServer.TcpBinaryReader - error in event response
2012-11-08 18:51:41,235 [7] ERROR Photon.SocketServer.ServerToServer.TcpBinaryReader - error in event response
2012-11-08 18:51:41,356 [7] ERROR Photon.SocketServer.ServerToServer.TcpBinaryReader - error in event response


from the error code "error in event response" which I cant seem to find where it is coming from, seems like it might have something to do with the random event Loadbalancing.Testclient is sending. But I've always thought that events are a one way message. Please correct me if I'm wrong on this.

I was actually going to ignore those errors, since the game works fine on the unity3d clients until something when wrong when a client disconnects.
Normally when a client disconnects, the objects/photonviews of that particular client will be deleted, however when joining the room created via the Loadbalancing.Testclient the objects/photonviews of that particular client stays in other clients and the owner changes to "null/disconnected?".

I am unsure if these are related to each other, but It would be good If someone could help give me some pointers as to what may be the cause or what is a good and simple way to have the room's master on the server.

Comments

  • Hi,

    the problem is that Photon Unitity Networking knows some "custom types", that are unknown to Photon & the LoadBalancing Testclient.
    The Photon server ignores them and just forwards the data to the clients - but the client needs to deserialize the data, and the Loadbalancing Testclient can only handle Photon's built-in data types - so if the test client receives any custom types, this leads to the "error in event response" error messages during deserialization.

    The right solution for you would be to use the Photon Unity Networking libraries to build your master client if it should join your Unity3D games - and don't use the test client.
  • Thanks Nicole,

    I guess no shortcuts here huh. Ill go about writing up a client that uses PUN libraries then :idea: