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

Method AddTrackCallbackRequests

src/ClientList.cpp:1101–1113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1099}
1100
1101void CClientList::AddTrackCallbackRequests(uint32_t ip)
1102{
1103 uint64_t now = ::GetTickCount64();
1104 IpAndTicks add = { ip, now };
1105 m_directCallbackRequests.push_front(add);
1106 while (!m_directCallbackRequests.empty()) {
1107 if (now - m_directCallbackRequests.back().inserted > MIN2MS(3)) {
1108 m_directCallbackRequests.pop_back();
1109 } else {
1110 break;
1111 }
1112 }
1113}
1114
1115bool CClientList::AllowCallbackRequest(uint32_t ip) const
1116{

Callers 1

ProcessPacketMethod · 0.80

Calls 2

GetTickCount64Function · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected