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

Method GetDownloadClientByIP_UDP

src/DownloadQueue.cpp:848–862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

846
847
848CUpDownClient* CDownloadQueue::GetDownloadClientByIP_UDP(uint32 dwIP, uint16 nUDPPort) const
849{
850 wxMutexLocker lock( m_mutex );
851
852 for ( FileQueue::size_type i = 0; i < m_filelist.size(); i++ ) {
853 const CKnownFile::SourceSet& set = m_filelist[i]->GetSourceList();
854
855 for ( CKnownFile::SourceSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
856 if ( it->GetIP() == dwIP && it->GetUDPPort() == nUDPPort ) {
857 return it->GetClient();
858 }
859 }
860 }
861 return NULL;
862}
863
864
865/**

Callers 1

ProcessPacketMethod · 0.80

Calls 6

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetIPMethod · 0.45
GetUDPPortMethod · 0.45
GetClientMethod · 0.45

Tested by

no test coverage detected