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

Method OnReceiveError

src/ServerUDPSocket.cpp:348–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348void CServerUDPSocket::OnReceiveError(int errorCode, uint32 ip, uint16 port)
349{
350 CMuleUDPSocket::OnReceiveError(errorCode, ip, port);
351
352 // If we are not currently pinging this server, increase the failure counter
353 CServer* pServer = theApp->serverlist->GetServerByIPUDP(ip, port, true);
354 if (pServer && !pServer->GetCryptPingReplyPending() && GetTickCount64() - pServer->GetLastPinged() >= SEC2MS(30)) {
355 pServer->AddFailedCount();
356 Notify_ServerRefresh(pServer);
357 }
358
359}
360
361void CServerUDPSocket::SendPacket(CPacket* packet, CServer* host, bool delPacket, bool rawpacket, uint16 port_offset)
362{

Callers

nothing calls this directly

Calls 5

GetTickCount64Function · 0.85
GetServerByIPUDPMethod · 0.80
GetLastPingedMethod · 0.80
AddFailedCountMethod · 0.80

Tested by

no test coverage detected