question

Komodo Legends Developer avatar image
Komodo Legends Developer asked

Get Multiplayer Server Details on client

I'm trying to implement a reconnect function and GetMutiplayerServerDetails looks just what I needed to get started, but I can't call it on the client. Is there any way I could call the function on the client side?

multiplayer
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

·
Sarah Zhang avatar image
Sarah Zhang answered

If you have got the session Id and the build region of an active server session, you can retrieve the sever details of it via calling the entity API RequestMultiplayerServer on the client. This API RequestMultiplayerServer can be accessed by title_player_account entity token by default.

For clarification, if you pass a new session Id to the API RequestMultiplayerServer, it will try to allocate a server from the standby server pool. And If you pass a existed session Id to it, it will return the server data, including the IPV4Address and Ports to you.

3 comments
10 |1200

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

Komodo Legends Developer avatar image Komodo Legends Developer commented ·

But using RequestMultiplayerServer will always return the server state as active, even if the original session is already terminated. I wanted to check if the original session is terminated/finished, the player can't reconnect (because the game is already finished) and have to find a new match to play.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Komodo Legends Developer commented ·

Thanks for your clarification. As you said, if the original server has been terminated, the API RequestMultiplayerServer will allocate a new standby server to active state.

If your target is to retrieve the state of a server instance and return the result to players. You can consider calling the entity API GetMultiplayerServerDetails on the CloudScript using Azure Functions, and let clients call the API ExecuteFunction to execute a function and obtain the result the function returned. Please check the documentation – PlayFab CloudScript using Azure Functions Quickstart Guide - PlayFab | Microsoft Docs for more information about how to use the CloudScript using Azure Functions.

0 Likes 0 ·
Komodo Legends Developer avatar image Komodo Legends Developer commented ·

Guess you can't do it on the client after all. Thanks

0 Likes 0 ·

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.