question

nforss avatar image
nforss asked

Timeout on TCP connection to Thunderhead multiplayer server

Ok, so this seems like it should be an easy fix, and I'm just missing some detail.

I'm getting the IP address and port of our game server through PlayFabMultiplayerAPI.RequestMultiplayerServerAsync. Then I try to connect to that address (over TCP, all of which is defined in GameManager), but only get the following timeout error:

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"

What am I doing wrong? Does the client need to be logged in, and some header added to the connection request? Or is there some setting in the GameManager that I've overlooked?

Matchmaking
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

If you can get the IP address and port through PlayFabMultiplayerAPI.RequestMultiplayerServerAsync, then your build is deployed successfully. The next will depend on how you implemented your server executable. If your server asks for some sort of authentication, then the client might need to be logged in. And if your server need some additional headers, then you will need to provide these headers in your request.

But for a simple test, these are not necessary. For example, in Quickstart for multiplayer servers, the server executable is just a http listener, it needs no authentication or specific header. Once you got the IP address and port through RequestMultiplayerServer, you can simply send a get request to this address to get the response.

So for your issue, I'd suggest you check your server executable and do some locally debugging to make sure your server executable can work with no issue. Also, you can try with the gsdkSamples to see if it works.

1 comment
10 |1200

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

nforss avatar image nforss commented ·

Ok, thank you. Seems there must be some problem with the TCP server, then, even though it works just fine when run in the MockAgent.

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.