MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / create_global_handle

Method create_global_handle

src/network/GithubFileListProvider.cpp:104–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104WinInet::GlobalHandle GitHubFileListProvider::create_global_handle(const Settings::Data &settings_data) {
105 constexpr auto default_timeout = 3000;
106 std::wstring proxy_string;
107 if (settings_data.use_proxy && settings_data.proxy_type == ProxyType::web_proxy)
108 proxy_string = settings_data.proxy_host_name + L":" + std::to_wstring(settings_data.proxy_port);
109
110 WinInet::GlobalHandle inet = WinInet::CreateGlobalHandle()
111 .agent(static_plugin_name)
112 .proxy_string(proxy_string.empty() ? L"" : proxy_string.c_str())
113 .access_type(proxy_string.empty() ? INTERNET_OPEN_TYPE_PRECONFIG : INTERNET_OPEN_TYPE_PROXY);
114 inet.set_connect_timeout(default_timeout);
115 inet.set_receive_timeout(default_timeout);
116 inet.set_send_timeout(default_timeout);
117 return inet;
118}
119
120WinInet::UrlHandle GitHubFileListProvider::create_url_handle(const Settings::Data &settings_data, const WinInet::GlobalHandle &global_handle,
121 const wchar_t *url) {

Callers

nothing calls this directly

Calls 7

to_wstringFunction · 0.85
CreateGlobalHandleClass · 0.85
c_strMethod · 0.80
set_connect_timeoutMethod · 0.80
set_receive_timeoutMethod · 0.80
set_send_timeoutMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected