From 66ffe9485655f530410a2fe33f90b4fdad5709c9 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 8 Apr 2022 18:26:45 -0700 Subject: [PATCH] updated using git-extra --- todo | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/todo b/todo index 3658870..34f7040 100644 --- a/todo +++ b/todo @@ -17,10 +17,28 @@ Resources: -https://doc.libsodium.org/ To Do: +-design flow for grabbing pieces from cache/files + -where to store hashes (currently generated in torrent_file_piece_layers; not stored) + -IDEA: abstract out and store in struct torrent + -easy access + -indexed + -current just in const unsigned char **hashes + -struct piece? + -file location + -start location + -data? + -linked list? no, probably array would be easiest + -create + struct piece *torrent_load_piece(size_t index); + struct piece *piece_cache_find(); +-piece cache + -refactor pqueue + -use? + -access with hashmap + -pqueue only for pieces loaded in memory? + -load up pieces in memory and add to pqueue + -once reach max size, start removing least accessed -peer - -piece - HERE - -piece_received - -no-op, should just discard and should never receive -cancel -cancel_received -reject @@ -52,12 +70,7 @@ To Do: -send/receive -toggle/has -request --refactor pqueue - -use? - -access with hashmap - -pqueue only for pieces loaded in memory? - -load up pieces in memory and add to pqueue - -once reach max size, start removing least accessed + -piece -tests -watch -refactor -- 2.39.5