feat(protocol): add FTP, FTPS and FTPES downloads (#1569)

This commit is contained in:
Silas Mariusz authored and GitHub committed 2026-10-30 17:01:46 +08:00
1 parent e0951de270
commit c0b70d319d
54 files changed
+3850 -38

No files matched your search

+16
View File
@@ -23,6 +23,22 @@ void main() {
expect(stats.connections.last.completed, isTrue);
});
test('FTP stats use the HTTP connection layout', () {
final stats =
TaskStats.fromJson(Protocol.ftp, {
'snapshot': {
'connections': [
{'downloaded': 512, 'total': 1024, 'completed': false, 'failed': false, 'retryTimes': 1},
],
},
'runtime': null,
})
as HttpTaskStats;
expect(stats.connections.single.downloaded, 512);
expect(stats.connections.single.retryTimes, 1);
});
test('BT stats decode the ordered completion bitset and peer transport', () {
final stats =
TaskStats.fromJson(Protocol.bt, {