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

Method FindClientByIP

src/ClientList.cpp:415–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413
414
415CUpDownClient* CClientList::FindClientByIP( uint32 clientip, uint16 port )
416{
417 // Find all items with the specified ip
418 std::pair<IDMap::iterator, IDMap::iterator> range = m_ipList.equal_range( clientip );
419
420 for ( ; range.first != range.second; ++range.first ) {
421 CUpDownClient* cur_client = range.first->second.GetClient();
422 // Check if it's actually the client we want
423 if ( cur_client->GetUserPort() == port ) {
424 return cur_client;
425 }
426 }
427
428 return NULL;
429}
430
431
432CUpDownClient* CClientList::FindClientByIP( uint32 clientip )

Callers 4

ProcessPacketMethod · 0.80
EvaluateDataMethod · 0.80
ProcessExtPacketMethod · 0.80
GetCurrentClientMethod · 0.80

Calls 2

GetClientMethod · 0.45
GetUserPortMethod · 0.45

Tested by

no test coverage detected