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

Method InitNetworkData

src/ClientTCPSocket.cpp:94–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94bool CClientTCPSocket::InitNetworkData()
95{
96 wxASSERT(!m_remoteip);
97 wxASSERT(!m_client);
98 m_remoteip = GetPeerInt();
99
100 MULE_CHECK(m_remoteip, false);
101
102 if (theApp->ipfilter->IsFiltered(m_remoteip)) {
103 AddDebugLogLineN(logClient, "Denied connection from " + GetPeer() + "(Filtered IP)");
104 return false;
105 } else if (theApp->clientlist->IsBannedClient(m_remoteip)) {
106 AddDebugLogLineN(logClient, "Denied connection from " + GetPeer() + "(Banned IP)");
107 return false;
108 } else {
109 AddDebugLogLineN(logClient, "Accepted connection from " + GetPeer());
110 return true;
111 }
112}
113
114
115bool CClientTCPSocket::IsDownloadThrottled() const

Callers 1

OnAcceptMethod · 0.80

Calls 2

IsBannedClientMethod · 0.80
IsFilteredMethod · 0.45

Tested by

no test coverage detected