]> infiniteadaptability.org Git - seeder/commitdiff
updated using git-extra
authoralex <[email protected]>
Sat, 9 Apr 2022 01:26:45 +0000 (18:26 -0700)
committeralex <[email protected]>
Sat, 9 Apr 2022 01:26:45 +0000 (18:26 -0700)
todo

diff --git a/todo b/todo
index 365887089029060ad409901257e47c71a4770c60..34f704005b1a7cc84c37638730470979fd2bfdc7 100644 (file)
--- 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