MCPcopy Create free account
hub / github.com/ammaarreshi/Generals-Mac-iOS-iPad / DownloadManager

Method DownloadManager

Core/Tools/PATCHGET/DownloadManager.cpp:33–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31DownloadManager *TheDownloadManager = nullptr;
32
33DownloadManager::DownloadManager()
34{
35 m_download = new CDownload(this);
36 m_wasError = m_sawEnd = false;
37 m_statusString = Fetch_String(FTP_StatusIdle);
38
39 // ----- Initialize Winsock -----
40 m_winsockInit = true;
41 WORD verReq = MAKEWORD(2, 2);
42 WSADATA wsadata;
43
44 int err = WSAStartup(verReq, &wsadata);
45 if (err != 0)
46 {
47 m_winsockInit = false;
48 }
49 else
50 {
51 if ((LOBYTE(wsadata.wVersion) != 2) || (HIBYTE(wsadata.wVersion) !=2))
52 {
53 WSACleanup();
54 m_winsockInit = false;
55 }
56 }
57
58}
59
60DownloadManager::~DownloadManager()
61{

Callers

nothing calls this directly

Calls 3

Fetch_StringFunction · 0.85
WSAStartupFunction · 0.50
WSACleanupFunction · 0.50

Tested by

no test coverage detected