Files
2025-05-18 13:04:45 +08:00

50 lines
966 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#if WITH_CURL
#include "HttpThread.h"
#if PLATFORM_MICROSOFT
#include "Microsoft/AllowMicrosoftPlatformTypes.h"
#endif
#ifdef PLATFORM_CURL_INCLUDE
#include PLATFORM_CURL_INCLUDE
#else
#include "curl/curl.h"
#endif
#if PLATFORM_MICROSOFT
#include "Microsoft/HideMicrosoftPlatformTypes.h"
#endif
#endif //WITH_CURL
class FHttpRequestCommon;
#if WITH_CURL
class FCurlHttpThread
: public FLegacyHttpThread
{
public:
FCurlHttpThread();
protected:
//~ Begin FHttpThread Interface
virtual void HttpThreadTick(float DeltaSeconds) override;
virtual bool StartThreadedRequest(FHttpRequestCommon* Request) override;
virtual void CompleteThreadedRequest(FHttpRequestCommon* Request) override;
//~ End FHttpThread Interface
protected:
/** Mapping of libcurl easy handles to HTTP requests */
TMap<CURL*, FHttpRequestCommon*> HandlesToRequests;
};
#endif //WITH_CURL