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
| void FHttpManager::AddGameThreadTask | ( | TFunction< void()> && | Task | ) |
Add task to be ran on the game thread next tick
| Task | The task to be ran next tick |
| 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 |
| 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 |
| 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 |
| FString FHttpManager::CreateCorrelationId | ( | ) | const |
Create a new correlation id for a request
|
protectedvirtual |
Create HTTP thread object
| void FHttpManager::DumpRequests | ( | FOutputDevice & | Ar | ) | const |
List all of the Http requests currently being processed
| Ar | - output device to log with |
| void FHttpManager::Flush | ( | bool | bShutdown | ) |
Block until all pending requests are finished processing
| bShutdown | true if final flush during shutdown |
|
virtual |
Tick called during Flush
| DeltaSeconds | - time in seconds since the last tick |
Get the default method for creating new correlation ids for a request
| bool FHttpManager::IsDomainAllowed | ( | const FString & | Url | ) | const |
Determine if the domain is allowed to be accessed
| Url | the path to check domain on |
| 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 |
|
virtual |
Inform that HTTP Manager that we have completed a fork().
Must be called in both the client and parent process
|
virtual |
Inform that HTTP Manager that we are about to fork().
Will block to flush all outstanding http requests
|
virtual |
Inform the HTTP Manager that we finished ticking right after forking.
Only called on the forked process
| 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 |
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.
| InCorrelationIdMethod | The method to use when sending a request, if no Correlation id is already set |
|
virtual |
Method to check dynamic proxy setting support.
|
overridevirtual |
FTicker callback
| DeltaSeconds | - time in seconds since the last tick |
实现了 FTickerObjectBase.
|
virtual |
Update configuration.
Called when config has been updated and we need to apply any changes.