Posted 29 August 2024 - 10:48 AM
case OP_SENDINGPART:
{
// see also OP_SENDINGPART_I64
if (thePrefs.GetDebugClientTCPLevel() > 1)
DebugRecv("OP_SendingPart", client, (size >= 16) ? packet : NULL);
theStats.AddDownDataOverheadFileRequest(16 + 2 * 4);
client->CheckHandshakeFinished();
EDownloadState newDS = DS_NONE;
const CPartFile *creqfile = client->GetRequestFile();
if (creqfile) {
if (!creqfile->IsStopped() && (creqfile->GetStatus() == PS_READY || creqfile->GetStatus() == PS_EMPTY)) {
client->ProcessBlockPacket(packet, size, false, false);
if (!creqfile->IsStopped() && creqfile->GetStatus() == PS_PAUSED || creqfile->GetStatus() == PS_ERROR)
newDS = DS_ONQUEUE;
else
newDS = DS_CONNECTED; //any state but DS_NONE or DS_ONQUEUE
}
}
if (newDS != DS_CONNECTED && client) { //client could have been deleted while debugging
client->SendCancelTransfer();
client->SetDownloadState(newDS);
}
}
break;
bool CUpDownClient::CheckHandshakeFinished() const
{
if (m_bHelloAnswerPending) {
// 24-Nov-2004 [bc]: The reason for this is that 2 clients are connecting to each other at the same time.
//if (thePrefs.GetVerbose())
// AddDebugLogLine(DLP_VERYLOW, false, _T("Handshake not finished - while processing packet: %s; %s"), DbgGetClientTCPOpcode(protocol, opcode), (LPCTSTR)DbgGetClientInfo());
return false;
}
return true;
}
CheckHandshakeFinished has nothing to do here. There are a lot of similar usage in ListenSocket.
This post has been edited by BuyukBang: 29 August 2024 - 10:49 AM
I’m working on a new project based on eMule v0.70b Community Release, planning to release it by the end of 2024. # SCREENSHOTS # List of completed features:
IPv6 Support & UTP NAT Traversal: Enables IPv6 and LowID to LowID transfers between mod users. (Improved version of David Xanatos’s reference implementation)
Client History: Stores and reloads all clients. Enables long-term banning/punishment intervals, tracking suspicious activities, editable client notes, shared files statistics.
Protection Panel: Detects 28 types of bad clients, bans/punishes with 12 levels. Uses customizable text-based definitions within Shield.conf instead of binary DLP.dll.
Blacklist Panel: Keyword-based file blacklisting for search results. Very fast (Processes 850+ definitions on search results under 1 sec).
Download Checker: Skips known/downloaded/canceled downloads automatically by checking file name similarities and file hashes.
Files List: Lists and categorizes all known files and duplicate files. Fast loading (Loads 200k items under 1 sec).
GeoLite2: Replaced legacy IP2Country, supports IPv6, lists both cities and countries.
Several Connection Tweaks: A fast and reliable connection checker; retry failed TCP connection attempts; reask sources & inform queued clients after IP change.
Empty Fake File & DRM Detection: Automatically removes trash files from the download list.
Fast Kad: Provides much faster KAD searches comparable to eServer search speed.
Auto Query Shared Files: A new way of finding files!
Highly Responsive GUI, Automatic File Extension Correction, Automatic & Manual Saving All App Data, Added Column Filters To All Lists, Intelligent Chunk Selection, Client Emulation, Selectable Credit Systems, Save & Load File Sources, And many more additional features, bug fixes and optimizations…
To do: IPv6 support for KAD, NAT-T support for eServer, Dark Mode, more...