mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
Changed: Allow to set max concurrent cURL connections per CGroupHTML instance
This commit is contained in:
parent
0afd605acc
commit
356cc7c3df
5 changed files with 15 additions and 1 deletions
|
@ -64,8 +64,10 @@ namespace NLGUI
|
||||||
std::string languageCode;
|
std::string languageCode;
|
||||||
/// List of domains the widget can consider secure.
|
/// List of domains the widget can consider secure.
|
||||||
std::vector< std::string > trustedDomains;
|
std::vector< std::string > trustedDomains;
|
||||||
|
/// Maximum concurrent MultiCurl connections per CGroupHTML instance
|
||||||
|
sint32 curlMaxConnections;
|
||||||
|
|
||||||
SWebOptions()
|
SWebOptions(): curlMaxConnections(2)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -2090,6 +2090,11 @@ namespace NLGUI
|
||||||
clearContext();
|
clearContext();
|
||||||
|
|
||||||
MultiCurl = curl_multi_init();
|
MultiCurl = curl_multi_init();
|
||||||
|
if (MultiCurl)
|
||||||
|
{
|
||||||
|
curl_multi_setopt(MultiCurl, CURLMOPT_MAX_HOST_CONNECTIONS, options.curlMaxConnections);
|
||||||
|
curl_multi_setopt(MultiCurl, CURLMOPT_PIPELINING, 1);
|
||||||
|
}
|
||||||
RunningCurls = 0;
|
RunningCurls = 0;
|
||||||
_CurlWWW = NULL;
|
_CurlWWW = NULL;
|
||||||
|
|
||||||
|
|
|
@ -429,6 +429,8 @@ CClientConfig::CClientConfig()
|
||||||
WebIgMainDomain = "shard.ryzomcore.org";
|
WebIgMainDomain = "shard.ryzomcore.org";
|
||||||
WebIgTrustedDomains.push_back(WebIgMainDomain);
|
WebIgTrustedDomains.push_back(WebIgMainDomain);
|
||||||
|
|
||||||
|
CurlMaxConnections = 2;
|
||||||
|
|
||||||
RingReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes_ring/index.php";
|
RingReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes_ring/index.php";
|
||||||
ReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes/index.php";
|
ReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes/index.php";
|
||||||
|
|
||||||
|
@ -1074,6 +1076,9 @@ void CClientConfig::setValues()
|
||||||
// WEBIG //
|
// WEBIG //
|
||||||
READ_STRING_FV(WebIgMainDomain);
|
READ_STRING_FV(WebIgMainDomain);
|
||||||
READ_STRINGVECTOR_FV(WebIgTrustedDomains);
|
READ_STRINGVECTOR_FV(WebIgTrustedDomains);
|
||||||
|
READ_INT_FV(CurlMaxConnections);
|
||||||
|
if (ClientCfg.CurlMaxConnections < 0)
|
||||||
|
ClientCfg.CurlMaxConnections = 2;
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
// ANIMATION //
|
// ANIMATION //
|
||||||
|
|
|
@ -304,6 +304,7 @@ struct CClientConfig
|
||||||
std::string WebIgMainDomain;
|
std::string WebIgMainDomain;
|
||||||
std::vector<string> WebIgTrustedDomains;
|
std::vector<string> WebIgTrustedDomains;
|
||||||
|
|
||||||
|
sint32 CurlMaxConnections;
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
// ANIMATION //
|
// ANIMATION //
|
||||||
|
|
|
@ -469,6 +469,7 @@ CInterfaceManager::CInterfaceManager()
|
||||||
CGroupHTML::options.languageCode = ClientCfg.getHtmlLanguageCode();
|
CGroupHTML::options.languageCode = ClientCfg.getHtmlLanguageCode();
|
||||||
CGroupHTML::options.appName = getUserAgentName();
|
CGroupHTML::options.appName = getUserAgentName();
|
||||||
CGroupHTML::options.appVersion = getUserAgentVersion();
|
CGroupHTML::options.appVersion = getUserAgentVersion();
|
||||||
|
CGroupHTML::options.curlMaxConnections = ClientCfg.CurlMaxConnections;
|
||||||
|
|
||||||
NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS );
|
NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS );
|
||||||
interfaceLinkUpdater = new CInterfaceLink::CInterfaceLinkUpdater();
|
interfaceLinkUpdater = new CInterfaceLink::CInterfaceLinkUpdater();
|
||||||
|
|
Loading…
Reference in a new issue