Skip to content

0.2.0

Choose a tag to compare

@daniboybye daniboybye released this 11 Jun 21:52
· 1 commit to master since this release

Session persistence

  • Saved session state under .elixir_torrent/state/{info_hash}.term (relative to File.cwd!/0)
  • On download/1, an existing session is loaded and the bitfield is verified against disk before resuming
  • remove/2 deletes the session file; delete_data: true also removes downloaded files

Graceful shutdown API

  • stop_and_serialize/1 — stop piece downloads, disconnect peers (BEP 3), send tracker event=stopped, persist session, then stop the torrent process
  • stop_all_and_serialize/0 — same for every active torrent
  • list/0 — returns info hashes for all running torrent processes

Peer disconnect

  • Peers receive BEP 3 cancel / not interested / choke before TCP connections close
  • Used during shutdown so peers are notified cleanly

Install via Hex: {:elixir_torrent, "~> 0.2.0"}