5#include "CoreMinimal.h"
6#include "Containers/Ticker.h"
7#include "Runtime/Launch/Resources/Version.h"
74 static TUniquePtr<FLootLockerHTTPExecutionQueue> Instance;
76 bool bIsInitialized =
false;
78 TUniquePtr<FLootLockerRateLimiter> RateLimiter;
81 TMap<FString, TSharedPtr<FLootLockerHTTPExecutionQueueItem>> ExecutionQueue;
84 TSet<FString> OngoingRequestIds;
90 TArray<FString> CompletedRequestIds;
93 TArray<FString> RefreshNeededIds;
96 static FString SDKVersion;
97 static const FString UserAgent;
98 static const FString UserInstanceIdentifier;
120 void HandleRequestResult(
129 void DispatchSessionRefreshForItem(
const FString& RequestId);
139 void OnSessionRefreshCompleted(
const FString& RequestId,
bool bRefreshSuccess);
170 bool ShouldRetryRequest(int32 StatusCode, int32 TimesRetried)
const;
177 int32 TimesRetried)
const;
181 double LastChokeWarningLogTime = 0.0;
186#if ENGINE_MAJOR_VERSION > 5 || (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 3)
187 FTSTicker::FDelegateHandle TickerHandle;
189 FDelegateHandle TickerHandle;
202 bool Tick(
float DeltaTime);
ELootLockerHTTPExecutionQueueProcessingResult
Outcome codes returned by the HTTP execution queue's per-tick processing loop.
Definition LootLockerHTTPExecutionQueueItem.h:15
Manages the LootLocker HTTP request queue as a per-frame singleton.
Definition LootLockerHTTPExecutionQueue.h:32
static void Shutdown()
Aborts all in-flight requests, drains the queue with error callbacks, and destroys the singleton.
FLootLockerHTTPExecutionQueue()=default
Do not construct directly — use Get() or Initialize() instead.
void OverrideConfiguration(const FLootLockerHTTPClientConfiguration &NewConfig)
Replaces the active configuration.
static void Initialize()
Creates and starts ticking the singleton.
static bool IsInitialized()
Returns true if Initialize() has been called and Shutdown() has not yet been called.
void ScheduleRequest(const FLootLockerHTTPRequestData &Request)
Enqueues a request for dispatch on the next available tick.
static FLootLockerHTTPExecutionQueue & Get()
Returns the singleton instance.
Configuration for the LootLocker HTTP execution queue and retry logic.
Definition LootLockerHTTPClientConfiguration.h:15
Pairs a pending FLootLockerHTTPRequestData with its active IHttpRequest handle.
Definition LootLockerHTTPExecutionQueueItem.h:55
Captures everything needed to dispatch — and later retry — a single SDK HTTP request.
Definition LootLockerHTTPRequestData.h:15
Definition LootLockerPlayerData.h:12
Base response struct — every SDK callback receives a struct that derives from this.
Definition LootLockerResponse.h:19