CYINetworkConfiguration is a data structure that describes the properties of the You.i Engine network components.
Default values: Response cache size: 7 * 1024 * 1024 bytes Persistent cache size: 50 * 1024 * 1024 bytes
#include <network/YiNetworkConfiguration.h>

Public Member Functions | |
| CYINetworkConfiguration () | |
| virtual | ~CYINetworkConfiguration () |
| void | SetResponseCacheSize (uint32_t uBytes) |
| void | SetPersistentCacheSize (uint32_t uBytes) |
| void | SetHeuristicCacheExpirationEnabled (bool bEnable) |
| uint32_t | GetResponseCacheSize () const |
| uint32_t | GetPersistentCacheSize () const |
| CYIString | GetPersistentCachePath () const |
| bool | IsHeuristicCacheExpirationEnabled () const |
| void | SetEnableCookieHandling (bool bEnableCookieHandling) |
| bool | IsCookieHandlingEnabled () const |
Public Member Functions inherited from CYIScriptableObject | |
| CYIScriptableObject () | |
| CYIScriptableObject (const CYIScriptableObject &other) | |
| CYIScriptableObject & | operator= (const CYIScriptableObject &other) |
| virtual | ~CYIScriptableObject () |
| CYIBindingImplementation * | GetBindingImplementation () const |
| void | SetBindingImplementation (CYIBindingImplementation *pBindingImplementation) |
| virtual const CYIRuntimeTypeInfo * | GetRuntimeTypeInfoForScriptObject () const |
| CYINetworkConfiguration::CYINetworkConfiguration | ( | ) |
|
virtual |
| CYIString CYINetworkConfiguration::GetPersistentCachePath | ( | ) | const |
Returns the path used by the persistent cache. This is a folder named 'NetworkPersistentCache' under the application's cache path.
| uint32_t CYINetworkConfiguration::GetPersistentCacheSize | ( | ) | const |
The size in bytes of the file persistent cache. Default is 50 * 1024 * 1024
| uint32_t CYINetworkConfiguration::GetResponseCacheSize | ( | ) | const |
The size in bytes of the HTTP response cache. Default is 7 * 1024 * 1024
| bool CYINetworkConfiguration::IsCookieHandlingEnabled | ( | ) | const |
Returns true if cookie handling is enabled. Cookies are saved in the cookie store and included in subsequent requests automatically if cookie handling is enabled.
| bool CYINetworkConfiguration::IsHeuristicCacheExpirationEnabled | ( | ) | const |
Returns true if heuristic expiration is enabled. Default is enabled.
| void CYINetworkConfiguration::SetEnableCookieHandling | ( | bool | bEnableCookieHandling | ) |
| void CYINetworkConfiguration::SetHeuristicCacheExpirationEnabled | ( | bool | bEnable | ) |
Enables heuristic expiration for caches. This allows caching of responses that don't contain the 'Cache-Control' or 'Expires' header fields. In the case where these fields don't exist, we use the 'Last-Modified' and 'Date' header fields to determine heuristic freshness. If either of these headers are missing, the reponse will not be cached.
This is enabled by default.
| void CYINetworkConfiguration::SetPersistentCacheSize | ( | uint32_t | uBytes | ) |
The size in uBytes of the file persistent cache. Using the HTTP request URLs as keys, the cache will store up to nBytes of downloaded file information for quick retrieval. Requests for which responses have been cached will not cause any network traffic to occur. Default is 50 * 1024 * 1024
| void CYINetworkConfiguration::SetResponseCacheSize | ( | uint32_t | uBytes | ) |
The size in uBytes of the HTTP response cache. Using the HTTP request URLs as keys, the cache will store up to nBytes of HTTP response information for quick retrieval. Requests for which responses have been cached will not cause any network traffic to occur. Default is 7 * 1024 * 1024