GameMode and PlayerController connections

Because UE4 currently has no way to pass large amounts of data over the network, I had to create my own implementation using an FTcpListener. Once that is done, then I need to connect the connection to the associated PlayerController. I’ve currently placed my BigDataNet host class in the game instance so I would only have to do this once. I have a few concerns.

1.) When running a dedicated server, multiple game instances are created and I need to be able to tell which lives on the server.

2.) Are connected playercontrollers persistent. Or do they disconnected and reconnect when the map/gamemodes are changed?

Not sure what u mean on first one, but for second one is not persistent once you load new new map it will be initialized again, but you can use seamless travel to keep player connected and all the information of controller or whatever actor you want from the previous level.

Thanks. That should be all that I need then. As far as my first question is concerned. I went and looked at the shooter example and think that I need to call a function on the gameinstance from an actor/level that has authority.

As Duncan Dam said, PC’s are disconnected and connected on servertravel ( level change ) unless you use seamless travel ( Travelling in Multiplayer | Unreal Engine Documentation ).

To tell which gameinstance is Server, use the role check for authority when creating/calling functions:

if (HasAuthority())
{
     MyGreatFunc();
}
else 
{
      Server_MyGreatFunc();
}