MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / DownloadToFileOverlapped

Function DownloadToFileOverlapped

engine/Poseidon/Network/NetworkMisc.cpp:271–285  ·  view source on GitHub ↗

Download to file

Source from the content-addressed store, hash-verified

269 c->done.store(true, std::memory_order_release);
270 c->event->Set();
271 return 0;
272}
273
274// Use independent thread for file download
275#define MT_DOWNLOAD 1
276
277#if MT_DOWNLOAD
278
279#ifdef _WIN32
280// Download to file
281static void DownloadToFileOverlapped(DownloadToFileContext* context)
282{
283 DWORD threadId;
284 HANDLE handle = CreateThread(nullptr, 0, DownloadToFileThread, context, 0, &threadId);
285 if (!handle)
286 {
287 // create thread failed - fallback to direct processing
288 DownloadToFileThread(context);

Callers 1

StartDownloadingLogoMethod · 0.85

Calls 1

DownloadToFileThreadFunction · 0.85

Tested by

no test coverage detected