Lesson 76 - Parsing the Game Session Response

This commit is contained in:
Norman Lansing
2026-04-03 20:34:49 -04:00
parent 3ed338054f
commit ce6472a687
8 changed files with 166 additions and 6 deletions

View File

@@ -1,6 +1,11 @@
#include "UI/HTTP/HTTPRequestTypes.h"
#include "DedicatedServers/DedicatedServers.h"
namespace HTTPStatusMessages
{
const FString SomethingWentWrong{TEXT("Something went wrong...")};
}
void FDSMetaData::Dump() const
{
UE_LOGFMT(LogDedicatedServers, Log, "MetaData:");
@@ -21,6 +26,39 @@ void FDSListFleetsResponse::Dump() const
if (!NextToken.IsEmpty())
{
UE_LOGFMT(LogDedicatedServers, Log, "NextToken: {NextToken}", NextToken);
UE_LOGFMT(LogDedicatedServers, Log, "NextToken: {NextToken}", *NextToken);
}
}
void FDSGameSession::Dump() const
{
UE_LOGFMT(LogDedicatedServers, Log, "GameSession:");
UE_LOGFMT(LogDedicatedServers, Log, "GameSessionId: {GameSessionId}", *GameSessionId);
UE_LOGFMT(LogDedicatedServers, Log, " Name: {Name}", *Name);
UE_LOGFMT(LogDedicatedServers, Log, " FleetArn: {FleetArn}", *FleetArn);
UE_LOGFMT(LogDedicatedServers, Log, " CreationTime: {CreationTime}", CreationTime); // need to write a conversion function
UE_LOGFMT(LogDedicatedServers, Log, " TerminationTime: {TerminationTime}", TerminationTime); // need to write a conversion function
UE_LOGFMT(LogDedicatedServers, Log, " CurrentPlayerSessionCount: {CurrentPlayerSessionCount}", CurrentPlayerSessionCount);
UE_LOGFMT(LogDedicatedServers, Log, " MaximumPlayerSessionCount: {MaximumPlayerSessionCount}", MaximumPlayerSessionCount);
UE_LOGFMT(LogDedicatedServers, Log, " Status: {Status}", *Status);
UE_LOGFMT(LogDedicatedServers, Log, " StatusReason: {StatusReason}", *StatusReason);
UE_LOGFMT(LogDedicatedServers, Log, " GameProperties:");
for (const TTuple<FString, FString> GameProperty : GameProperties)
{
UE_LOGFMT(LogDedicatedServers, Log, " {Key} : {Value}", *GameProperty.Key, *GameProperty.Value);
}
UE_LOGFMT(LogDedicatedServers, Log, " IpAddress: {IpAddress}", *IpAddress);
UE_LOGFMT(LogDedicatedServers, Log, " DnsName: {DnsName}", *DnsName);
UE_LOGFMT(LogDedicatedServers, Log, " Port: {Port}", Port);
UE_LOGFMT(LogDedicatedServers, Log, " PlayerSessionCreationPolicy: {PlayerSessionCreationPolicy}", *PlayerSessionCreationPolicy);
UE_LOGFMT(LogDedicatedServers, Log, " CreatorId: {CreatorId}", *CreatorId);
UE_LOGFMT(LogDedicatedServers, Log, " GameSessionData: {GameSessionData}", *GameSessionData);
UE_LOGFMT(LogDedicatedServers, Log, " MatchmakerData: {MatchmakerData}", *MatchmakerData);
UE_LOGFMT(LogDedicatedServers, Log, " Location: {Location}", *Location);
UE_LOGFMT(LogDedicatedServers, Log, " ComputeName: {ComputeName}", *ComputeName);
UE_LOGFMT(LogDedicatedServers, Log, " PlayerGatewayStatus: {PlayerGatewayStatus}", *PlayerGatewayStatus);
}