in UnityProject/Assets/Scripts/Client/MatchmakingClient.cs [42:63]
public GameSessionInfo RequestGameSession()
{
try
{
//Make the signed request and wait for max 10 seconds to complete
var response = Task.Run(() => this.SendSignedGetRequest(apiEndpoint + "requestgamesession"));
response.Wait(10000);
string jsonResponse = response.Result;
Debug.Log("Json response: " + jsonResponse);
if (jsonResponse.Contains("failed"))
return null;
GameSessionInfo info = JsonUtility.FromJson<GameSessionInfo>(jsonResponse);
return info;
}
catch (Exception e)
{
Debug.Log(e.Message);
return null;
}
}