Is it possible to receive events on OutboundS2SPeer.OnEvent from PluginHost.BroadcastEvent ?

I'm trying to test our custom plugin functionality via Server-to-Server communication. I'm trying to mimic a client via OutboundS2SPeer peers and it worked fine until I hit the point where my events sent through PluginHost.BroadcastEvent does not invoke OutboundS2SPeer.OnEvent on my new applications outbound peer. My setup is following;

Adding to existing Master/Game application architecture I have an application called StressTestApplication. This application initiates TCP connection to the master server (OutgoingStressTestMasterServerPeer) on a regular client port 4530. After OnConnectionEstablished I'm executing the authentication stuff and authenticate to the master server (custom auth). After the authentication I get the game server address and the ParameterCode.Secret, disconnect from the master and connect to the game server with the info I got from the master auth by creating another peer called OutgoingStressTestGameServerPeer which also connects TCP using the client port again. This creates a GameClientPeer on the GameApplication side. All is well (or so I thought), I can create a new room with my plugin info and everything works as expected. From the logs I can see that the custom plugin code was invoked and working as expected. However, my OutgoingStressTestGameServerPeer only receives initial events (JoinStages) on the OnEvent callback and nothing else. My custom plugin code calls PluginHost.BroadcastEvent throughout the game's life but my OutgoingStressTestGameServerPeer never receives it. I thought that this is probably not how S2S was meant to be used since I'm creating a GameClientPeer on game server side instead of an inbounds2s peer. But this would work too well if I would have received the events from the plugin which is what I desired initially. Is this possible? If not, I would have to mirror the plugin logic in an inbounds2s peer which I would like to avoid if possible.

Comments

  • After setting Photon.SocketServer logger to DEBUG level I saw that the binary serialization was failing. And realized that I have forgotten to register my custom serialization types... After registering them on the StressTestApplication I receive my events now. My problem is resolved.
  • hi, @arkenthera
    That is good news. Your experience was leveled up

    best,
    ilya