engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
FHttpManager类 参考

Manages Http request that are currently being processed 更多...

#include <HttpManager.h>

+ 类 FHttpManager 继承关系图:

Public 成员函数

void AddGameThreadTask (TFunction< void()> &&Task)
 Add task to be ran on the game thread next tick 更多...
 
void AddRequest (const TSharedRef< IHttpRequest, ESPMode::ThreadSafe > &Request)
 Adds an Http request instance to the manager for tracking/ticking Manager should always have a list of requests currently being processed 更多...
 
void AddThreadedRequest (const TSharedRef< IHttpThreadedRequest, ESPMode::ThreadSafe > &Request)
 Add a http request to be executed on the http thread 更多...
 
void CancelThreadedRequest (const TSharedRef< IHttpThreadedRequest, ESPMode::ThreadSafe > &Request)
 Mark a threaded http request as cancelled to be removed from the http thread 更多...
 
FString CreateCorrelationId () const
 Create a new correlation id for a request 更多...
 
void DumpRequests (FOutputDevice &Ar) const
 List all of the Http requests currently being processed 更多...
 
 FHttpManager ()
 Constructor
 
void Flush (bool bShutdown)
 Block until all pending requests are finished processing 更多...
 
virtual void FlushTick (float DeltaSeconds)
 Tick called during Flush 更多...
 
void Initialize ()
 Initialize
 
bool IsDomainAllowed (const FString &Url) const
 Determine if the domain is allowed to be accessed 更多...
 
bool IsValidRequest (const IHttpRequest *RequestPtr) const
 Find an Http request in the lists of current valid requests 更多...
 
virtual void OnAfterFork ()
 Inform that HTTP Manager that we have completed a fork(). 更多...
 
virtual void OnBeforeFork ()
 Inform that HTTP Manager that we are about to fork(). 更多...
 
virtual void OnEndFramePostFork ()
 Inform the HTTP Manager that we finished ticking right after forking. 更多...
 
void RemoveRequest (const TSharedRef< IHttpRequest, ESPMode::ThreadSafe > &Request)
 Removes an Http request instance from the manager Presumably it is done being processed 更多...
 
void SetCorrelationIdMethod (TFunction< FString()> InCorrelationIdMethod)
 Set the method used to set a Correlation id on each request, if one is not already specified. 更多...
 
virtual bool SupportsDynamicProxy () const
 Method to check dynamic proxy setting support. 更多...
 
bool Tick (float DeltaSeconds) override
 FTicker callback 更多...
 
virtual void UpdateConfigs ()
 Update configuration. 更多...
 
virtual ~FHttpManager ()
 Destructor
 
- Public 成员函数 继承自 FTickerObjectBase
CORE_API FTickerObjectBase (float InDelay=0.0f, FTicker &Ticker=FTicker::GetCoreTicker())
 Constructor 更多...
 
virtual bool Tick (float DeltaTime)=0
 Pure virtual that must be overloaded by the inheriting class. 更多...
 
virtual CORE_API ~FTickerObjectBase ()
 Virtual destructor.
 

静态 Public 成员函数

static TFunction< FString()> GetDefaultCorrelationIdMethod ()
 Get the default method for creating new correlation ids for a request 更多...
 

Protected 成员函数

virtual FHttpThread * CreateHttpThread ()
 Create HTTP thread object 更多...
 

Protected 属性

TFunction< FString()> CorrelationIdMethod
 This method will be called to generate a CorrelationId on all requests being sent if one is not already set
 
TQueue< TFunction< void()>, EQueueMode::Mpsc > GameThreadQueue
 Queue of tasks to run on the game thread
 
TArray< TSharedRef< IHttpRequest, ESPMode::ThreadSafe > > Requests
 List of Http requests that are actively being processed
 

详细描述

Manages Http request that are currently being processed

成员函数说明

◆ AddGameThreadTask()

void FHttpManager::AddGameThreadTask ( TFunction< void()> &&  Task)

Add task to be ran on the game thread next tick

参数
TaskThe task to be ran next tick

◆ AddRequest()

void FHttpManager::AddRequest ( const TSharedRef< IHttpRequest, ESPMode::ThreadSafe > &  Request)

Adds an Http request instance to the manager for tracking/ticking Manager should always have a list of requests currently being processed

参数
Request- the request object to add

◆ AddThreadedRequest()

void FHttpManager::AddThreadedRequest ( const TSharedRef< IHttpThreadedRequest, ESPMode::ThreadSafe > &  Request)

Add a http request to be executed on the http thread

参数
Request- the request object to add

◆ CancelThreadedRequest()

void FHttpManager::CancelThreadedRequest ( const TSharedRef< IHttpThreadedRequest, ESPMode::ThreadSafe > &  Request)

Mark a threaded http request as cancelled to be removed from the http thread

参数
Request- the request object to cancel

◆ CreateCorrelationId()

FString FHttpManager::CreateCorrelationId ( ) const

Create a new correlation id for a request

返回
The new correlationid string

◆ CreateHttpThread()

virtual FHttpThread * FHttpManager::CreateHttpThread ( )
protectedvirtual

Create HTTP thread object

返回
the HTTP thread object

◆ DumpRequests()

void FHttpManager::DumpRequests ( FOutputDevice &  Ar) const

List all of the Http requests currently being processed

参数
Ar- output device to log with

◆ Flush()

void FHttpManager::Flush ( bool  bShutdown)

Block until all pending requests are finished processing

参数
bShutdowntrue if final flush during shutdown

◆ FlushTick()

virtual void FHttpManager::FlushTick ( float  DeltaSeconds)
virtual

Tick called during Flush

参数
DeltaSeconds- time in seconds since the last tick

◆ GetDefaultCorrelationIdMethod()

static TFunction< FString()> FHttpManager::GetDefaultCorrelationIdMethod ( )
static

Get the default method for creating new correlation ids for a request

返回
The default correlationid creation method

◆ IsDomainAllowed()

bool FHttpManager::IsDomainAllowed ( const FString &  Url) const

Determine if the domain is allowed to be accessed

参数
Urlthe path to check domain on
返回
true if domain is whitelisted and allowed

◆ IsValidRequest()

bool FHttpManager::IsValidRequest ( const IHttpRequest *  RequestPtr) const

Find an Http request in the lists of current valid requests

参数
RequestPtr- ptr to the http request object to find
返回
true if the request is being tracked, false if not

◆ OnAfterFork()

virtual void FHttpManager::OnAfterFork ( )
virtual

Inform that HTTP Manager that we have completed a fork().

Must be called in both the client and parent process

◆ OnBeforeFork()

virtual void FHttpManager::OnBeforeFork ( )
virtual

Inform that HTTP Manager that we are about to fork().

Will block to flush all outstanding http requests

◆ OnEndFramePostFork()

virtual void FHttpManager::OnEndFramePostFork ( )
virtual

Inform the HTTP Manager that we finished ticking right after forking.

Only called on the forked process

◆ RemoveRequest()

void FHttpManager::RemoveRequest ( const TSharedRef< IHttpRequest, ESPMode::ThreadSafe > &  Request)

Removes an Http request instance from the manager Presumably it is done being processed

参数
Request- the request object to remove

◆ SetCorrelationIdMethod()

void FHttpManager::SetCorrelationIdMethod ( TFunction< FString()>  InCorrelationIdMethod)

Set the method used to set a Correlation id on each request, if one is not already specified.

This method allows you to override the Engine default method.

参数
InCorrelationIdMethodThe method to use when sending a request, if no Correlation id is already set

◆ SupportsDynamicProxy()

virtual bool FHttpManager::SupportsDynamicProxy ( ) const
virtual

Method to check dynamic proxy setting support.

返回
Whether this http implementation supports dynamic proxy setting.

◆ Tick()

bool FHttpManager::Tick ( float  DeltaSeconds)
overridevirtual

FTicker callback

参数
DeltaSeconds- time in seconds since the last tick
返回
false if no longer needs ticking

实现了 FTickerObjectBase.

◆ UpdateConfigs()

virtual void FHttpManager::UpdateConfigs ( )
virtual

Update configuration.

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


该类的文档由以下文件生成: