UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FLegacyHttpThread Class Reference

#include <HttpThread.h>

+ Inheritance diagram for FLegacyHttpThread:

Public Member Functions

 FLegacyHttpThread ()
 
virtual ~FLegacyHttpThread ()
 
virtual void StartThread () override final
 
virtual void StopThread () override final
 
virtual void AddRequest (FHttpRequestCommon *Request) override final
 
virtual void CancelRequest (FHttpRequestCommon *Request) override final
 
virtual void GetCompletedRequests (TArray< FHttpRequestCommon * > &OutCompletedRequests) override final
 
virtual void Tick () override final
 
- Public Member Functions inherited from FHttpThreadBase
 FHttpThreadBase ()
 
virtual ~FHttpThreadBase ()
 
bool IsStopped () const
 
bool NeedsSingleThreadTick () const
 
virtual void UpdateConfigs ()
 

Protected Member Functions

virtual bool Init () override
 
virtual uint32 Run () override final
 
virtual void Stop () override
 
virtual TSharedPtr< IHttpTaskTimerHandleAddHttpThreadTask (TFunction< void()> &&Task, float InDelay) override
 
virtual void HttpThreadTick (float DeltaSeconds) override
 
virtual void RemoveTimerHandle (FTSTicker::FDelegateHandle DelegateHandle) override
 
virtual void RemoveTimerHandle (UE::EventLoop::FTimerHandle EventLoopTimerHandle) override
 
- Protected Member Functions inherited from FHttpThreadBase
virtual bool StartThreadedRequest (FHttpRequestCommon *Request)
 
virtual void CompleteThreadedRequest (FHttpRequestCommon *Request)
 
virtual void Exit () override
 
void Process (TArray< FHttpRequestCommon * > &RequestsToCancel, TArray< FHttpRequestCommon * > &RequestsToComplete)
 
virtual class FSingleThreadRunnableGetSingleThreadInterface () override
 

Protected Attributes

FThreadSafeCounter ExitRequest
 
double HttpThreadActiveFrameTimeInSeconds
 
double HttpThreadActiveMinimumSleepTimeInSeconds
 
double HttpThreadIdleFrameTimeInSeconds
 
double HttpThreadIdleMinimumSleepTimeInSeconds
 
FTSTicker Ticker
 
- Protected Attributes inherited from FHttpThreadBase
FRunnableThreadThread
 
TMpscQueue< FHttpRequestCommon * > NewThreadedRequests
 
TMpscQueue< FHttpRequestCommon * > CancelledThreadedRequests
 
TArray< FHttpRequestCommon * > RateLimitedThreadedRequests
 
TArray< FHttpRequestCommon * > RunningThreadedRequests
 
TSpscQueue< FHttpRequestCommon * > CompletedThreadedRequests
 

Constructor & Destructor Documentation

◆ FLegacyHttpThread()

FLegacyHttpThread::FLegacyHttpThread ( )

◆ ~FLegacyHttpThread()

FLegacyHttpThread::~FLegacyHttpThread ( )
virtual

Member Function Documentation

◆ AddHttpThreadTask()

TSharedPtr< IHttpTaskTimerHandle > FLegacyHttpThread::AddHttpThreadTask ( TFunction< void()> &&  Task,
float  InDelay 
)
overrideprotectedvirtual

Add task to be ran on the http thread next tick

Parameters
TaskThe task to be ran
InDelayThe delay to wait before running the task
Returns
The handle of the timer, which could be used to remove the task before it get triggered

Implements FHttpThreadBase.

◆ AddRequest()

void FLegacyHttpThread::AddRequest ( FHttpRequestCommon Request)
finaloverridevirtual

Add a request to begin processing on HTTP thread.

Parameters
Requestthe request to be processed on the HTTP thread

Reimplemented from FHttpThreadBase.

◆ CancelRequest()

void FLegacyHttpThread::CancelRequest ( FHttpRequestCommon Request)
finaloverridevirtual

Mark a request as cancelled. Called on non-HTTP thread.

Parameters
Requestthe request to be processed on the HTTP thread

Reimplemented from FHttpThreadBase.

◆ GetCompletedRequests()

void FLegacyHttpThread::GetCompletedRequests ( TArray< FHttpRequestCommon * > &  OutCompletedRequests)
finaloverridevirtual

Get completed requests. Clears internal arrays. Called on non-HTTP thread.

Parameters
OutCompletedRequestsarray of requests that have been completed

Reimplemented from FHttpThreadBase.

◆ HttpThreadTick()

void FLegacyHttpThread::HttpThreadTick ( float  DeltaSeconds)
overrideprotectedvirtual

Tick on http thread

Reimplemented from FHttpThreadBase.

◆ Init()

bool FLegacyHttpThread::Init ( void  )
overrideprotectedvirtual

Initializes the runnable object.

This method is called in the context of the thread object that aggregates this, not the thread that passes this runnable to a new thread.

Returns
True if initialization was successful, false otherwise
See also
Run, Stop, Exit

Reimplemented from FHttpThreadBase.

◆ RemoveTimerHandle() [1/2]

void FLegacyHttpThread::RemoveTimerHandle ( FTSTicker::FDelegateHandle  DelegateHandle)
overrideprotectedvirtual

Implements FHttpThreadBase.

◆ RemoveTimerHandle() [2/2]

void FLegacyHttpThread::RemoveTimerHandle ( UE::EventLoop::FTimerHandle  EventLoopTimerHandle)
overrideprotectedvirtual

Implements FHttpThreadBase.

◆ Run()

UE_DISABLE_OPTIMIZATION_SHIP uint32 FLegacyHttpThread::Run ( )
finaloverrideprotectedvirtual

Runs the runnable object.

This is where all per object thread work is done. This is only called if the initialization was successful.

Returns
The exit code of the runnable object
See also
Init, Stop, Exit

Reimplemented from FHttpThreadBase.

◆ StartThread()

void FLegacyHttpThread::StartThread ( )
finaloverridevirtual

Start the HTTP thread.

Reimplemented from FHttpThreadBase.

◆ Stop()

UE_ENABLE_OPTIMIZATION_SHIP void FLegacyHttpThread::Stop ( void  )
overrideprotectedvirtual

Stops the runnable object.

This is called if a thread is requested to terminate early.

See also
Init, Run, Exit

Reimplemented from FHttpThreadBase.

◆ StopThread()

void FLegacyHttpThread::StopThread ( )
finaloverridevirtual

Stop the HTTP thread. Blocks until thread has stopped.

Reimplemented from FHttpThreadBase.

◆ Tick()

void FLegacyHttpThread::Tick ( )
finaloverridevirtual

Reimplemented from FHttpThreadBase.

Member Data Documentation

◆ ExitRequest

FThreadSafeCounter FLegacyHttpThread::ExitRequest
protected

signal request to stop and exit thread

◆ HttpThreadActiveFrameTimeInSeconds

double FLegacyHttpThread::HttpThreadActiveFrameTimeInSeconds
protected

Time in seconds to use as frame time when actively processing requests. 0 means no frame time.

◆ HttpThreadActiveMinimumSleepTimeInSeconds

double FLegacyHttpThread::HttpThreadActiveMinimumSleepTimeInSeconds
protected

Time in seconds to sleep minimally when actively processing requests.

◆ HttpThreadIdleFrameTimeInSeconds

double FLegacyHttpThread::HttpThreadIdleFrameTimeInSeconds
protected

Time in seconds to use as frame time when idle, waiting for requests. 0 means no frame time.

◆ HttpThreadIdleMinimumSleepTimeInSeconds

double FLegacyHttpThread::HttpThreadIdleMinimumSleepTimeInSeconds
protected

Time in seconds to sleep minimally when idle, waiting for requests.

◆ Ticker

FTSTicker FLegacyHttpThread::Ticker
protected

The documentation for this class was generated from the following files: