-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
-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