MCPcopy Create free account
hub / github.com/amule-project/amule / AskForDownload

Method AskForDownload

src/DownloadClient.cpp:139–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137
138
139bool CUpDownClient::AskForDownload()
140{
141 // 0.42e
142 if (theApp->listensocket->TooManySockets()) {
143 if (!m_socket) {
144 if (GetDownloadState() != DS_TOOMANYCONNS) {
145 SetDownloadState(DS_TOOMANYCONNS);
146 }
147 return true;
148 } else if (!m_socket->IsConnected()) {
149 if (GetDownloadState() != DS_TOOMANYCONNS) {
150 SetDownloadState(DS_TOOMANYCONNS);
151 }
152 return true;
153 }
154 }
155 m_bUDPPending = false;
156 m_dwLastAskedTime = ::GetTickCount64();
157 SetDownloadState(DS_CONNECTING);
158 SetSentCancelTransfer(0);
159 return TryToConnect();
160}
161
162
163void CUpDownClient::SendStartupLoadReq()

Callers 1

ProcessMethod · 0.80

Calls 3

GetTickCount64Function · 0.85
TooManySocketsMethod · 0.80
IsConnectedMethod · 0.45

Tested by

no test coverage detected