UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FEventLoopHttpThread Class Referenceabstract

#include <EventLoopHttpThread.h>

+ Inheritance diagram for FEventLoopHttpThread:

Public Member Functions

 FEventLoopHttpThread ()
 
virtual ~FEventLoopHttpThread ()
 
virtual void StartThread () override final
 
virtual void StopThread () override final
 
virtual void UpdateConfigs () 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
 

Protected Member Functions

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

Protected Attributes

UE::EventLoop::FTimerHandle RequestTickTimer
 
- Protected Attributes inherited from FHttpThreadBase
FRunnableThreadThread
 
TMpscQueue< FHttpRequestCommon * > NewThreadedRequests
 
TMpscQueue< FHttpRequestCommon * > CancelledThreadedRequests
 
TArray< FHttpRequestCommon * > RateLimitedThreadedRequests
 
TArray< FHttpRequestCommon * > RunningThreadedRequests
 
TSpscQueue< FHttpRequestCommon * > CompletedThreadedRequests
 

Constructor & Destructor Documentation

◆ FEventLoopHttpThread()

FEventLoopHttpThread::FEventLoopHttpThread ( )

◆ ~FEventLoopHttpThread()

FEventLoopHttpThread::~FEventLoopHttpThread ( )
virtual

Member Function Documentation

◆ AddHttpThreadTask()

TSharedPtr< IHttpTaskTimerHandle > FEventLoopHttpThread::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 FEventLoopHttpThread::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 FEventLoopHttpThread::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.

◆ CreateEventLoop()

virtual void FEventLoopHttpThread::CreateEventLoop ( )
protectedpure virtual

Implemented in FAppleEventLoopHttpThread.

◆ DestroyEventLoop()

virtual void FEventLoopHttpThread::DestroyEventLoop ( )
protectedpure virtual

Implemented in FAppleEventLoopHttpThread.

◆ GetCompletedRequests()

void FEventLoopHttpThread::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.

◆ GetEventLoop()

virtual UE::EventLoop::IEventLoop * FEventLoopHttpThread::GetEventLoop ( )
protectedpure virtual

Implemented in FAppleEventLoopHttpThread.

◆ GetEventLoopChecked()

virtual UE::EventLoop::IEventLoop & FEventLoopHttpThread::GetEventLoopChecked ( )
protectedpure virtual

Implemented in FAppleEventLoopHttpThread.

◆ Init()

bool FEventLoopHttpThread::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 FEventLoopHttpThread::RemoveTimerHandle ( FTSTicker::FDelegateHandle  DelegateHandle)
overrideprotectedvirtual

Implements FHttpThreadBase.

◆ RemoveTimerHandle() [2/2]

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

Implements FHttpThreadBase.

◆ ResetTickTimer()

void FEventLoopHttpThread::ResetTickTimer ( )
protected

◆ Run()

uint32 FEventLoopHttpThread::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 FEventLoopHttpThread::StartThread ( )
finaloverridevirtual

Start the HTTP thread.

Reimplemented from FHttpThreadBase.

◆ StopThread()

void FEventLoopHttpThread::StopThread ( )
finaloverridevirtual

Stop the HTTP thread. Blocks until thread has stopped.

Reimplemented from FHttpThreadBase.

◆ Tick()

void FEventLoopHttpThread::Tick ( )
finaloverridevirtual

Reimplemented from FHttpThreadBase.

◆ UpdateConfigs()

void FEventLoopHttpThread::UpdateConfigs ( )
finaloverridevirtual

Update configuration. Called when config has been updated and we need to apply any changes.

Reimplemented from FHttpThreadBase.

◆ UpdateEventLoopConfigs()

virtual void FEventLoopHttpThread::UpdateEventLoopConfigs ( )
protectedpure virtual

Implemented in FAppleEventLoopHttpThread.

Member Data Documentation

◆ RequestTickTimer

UE::EventLoop::FTimerHandle FEventLoopHttpThread::RequestTickTimer
protected

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