

lib
---

Essential stuff:

- Make file hashing non-blocking. Don't remove state data until file is
  moved to final destination so we can resume verification if it is aborted
  on shutdown.

- Determine when to look for more sources for a download and start hash 
  search.

- Time out inactive download connections. It hangs the download indefinitely.
  Update: Effects now limited by replacing slow nodes with faster ones.
  
- Do we need an upper limit on the upload queue length? Is a list efficient
  enough for large queues?


Features:

- Save/load meta data with incomplete dowloads.


Optimizations:

- Optimize chunking by only allocating new chunk after the tcp connection to a
  new source has been established. Requires major rewrites, maybe we can do
  this once we use binary requests.

- Create sources from X-Alt headers and add them

- Parse index node list packet

- Figure out how to detected firewalled search results.
  Update: There seems to be nothing in the search results.

- Check if we can send push requests for our own supernodes over the already
  established session.

- Differentiate between download source connect and request failure and
  immediately remove the source in the former case.
