question

charlielange avatar image
charlielange asked

How do I get the player's PlayFabID and IP Address within the GameServer running on ThunderHead?

I need to get the player's PlayFabID and IP Address because it's an authoritative game server. This would be used to update player statistics from the game server as well as other authoritative logic. I'm currently trying to do this using the GameServerSDK and PlayFabSDK within Unity.

unity3dsdks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JayZuo avatar image
JayZuo answered

While using PlayFab Multiplayer Servers 2.0 (ThunderHead), we usually use GameserverSDK.GetInitialPlayers() in server to get all players that are valid to connect to the server. You can set InitialPlayers with RequestMultiplayerServer method. Or if you are using new Matchmaking and Integrating with PlayFab Multiplayer Servers, InitialPlayers will be set to members in the match automatically.

And for players, they need to provide some identifies when connecting, so that server can authenticate them. For example, you can let the clients send the SessionTicket to your game server, and in the server, using AuthenticateSessionTicket to validate the player.

For player's IP address, it's not something PlayFab can return to you. It would based on the network protocol you are using and you should be able to get it with your own code.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.