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

Method WritePartStatus

src/PartFile.cpp:1463–1481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1461
1462
1463void CPartFile::WritePartStatus(CMemFile* file)
1464{
1465 uint16 parts = GetED2KPartCount();
1466 file->WriteUInt16(parts);
1467 uint16 done = 0;
1468 while (done != parts){
1469 uint8 towrite = 0;
1470 for (uint32 i = 0;i != 8;++i) {
1471 if (IsComplete(done)) {
1472 towrite |= (1<<i);
1473 }
1474 ++done;
1475 if (done == parts) {
1476 break;
1477 }
1478 }
1479 file->WriteUInt8(towrite);
1480 }
1481}
1482
1483void CPartFile::WriteCompleteSourcesCount(CMemFile* file)
1484{

Callers 5

SendFileRequestMethod · 0.80
UDPReaskForDownloadMethod · 0.80
ProcessPacketMethod · 0.80
ProcessExtPacketMethod · 0.80
ProcessPacketMethod · 0.80

Calls 2

WriteUInt16Method · 0.80
WriteUInt8Method · 0.80

Tested by

no test coverage detected