question

umut34 avatar image
umut34 asked

Can we post custom server attributes to receive them after matchmaking process returns a server?

Hello,
I'm using Playfab with Photon Bolt and I want to register a string attribute to Playfab server instances, then I want to get this string when we receive a matchmaking result (GetMatchResult). Currently, it only returns server IP and ports as ServerDetails.

Since I use Photon Bolt, I need to pass a session id as a string to connect to that server. It can't connect directly to an IP: Port. Can I do that somehow without additional tricks like creating another web service to keep IP:Port + session ID pairs? Can I use custom tags or another method after I use PlayFabMultiplayerAgentAPI.Start() on the server side?

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

·
Gosen Gao avatar image
Gosen Gao answered

All info about a Server instance you can get lists in the Multiplayer Server - Get Multiplayer Server Details - REST API (PlayFab Multiplayer) | Microsoft Learn. I am not an expert on Bolt, If the session id you mentioned is created by the server. I have an idea but don’t know if it works.

Using the SessionId of the PlayFab server instance as the session id you need to connect the server. With GSDK, you should be able to get the SessionId allocated by PlayFab Matchmaking system in the server instance. Then you can use it to create the session id you mentioned. Since the MatchId in the Matchmaking - Get Match - REST API (PlayFab Multiplayer) | Microsoft Learn response is the SessionId of the PlayFab server instance, you can get it directly with no additional API calls.

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.