question

reyhan.sadak avatar image
reyhan.sadak asked

How to detect a new client connection on the custom game server

Hello,
I'm pretty new here, so my question might sound stupid, but I don't understand how a custom game server will detect that a new client has connected. Then, when the client connects, how does the server know the identity of the client? Should the server rely on the client to tell its identity?

Thanks!

10 |1200

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

brendan avatar image
brendan answered

First, here's the link on using custom game servers in PlayFab: https://playfab.com/doc/categories/custom-game-servers/

Specific to your question, for a client to join a custom game server, the first step is that the client should call Matchmake, to get the info on the specific server to join. The response for that includes the info that you would then use to connect to the server. It also provides a server authorization ticket which the client needs to pass to the server, so that the server can use RedeemMatchmakerTicket to verify with the PlayFab service that the player is valid to join the game session.

10 |1200

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

reyhan.sadak avatar image
reyhan.sadak answered

Hey,

Thank you for the answer! It was helpful, indeed.

10 |1200

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

inacomic avatar image
inacomic answered

Hi, is matchmaking mandatory for clients to connect? Reason I ask is our project is having problems with clients connecting to the server to join a game. The server is in Active state. The server/client works fine if set up outside of PlayFab on a Windows Server and Client.

Thanks,

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.