Handle error cases from the tracker
authorJaseem Abid <jaseemabid@gmail.com>
Sun, 29 Mar 2015 12:24:58 +0000 (17:54 +0530)
committerJaseem Abid <jaseemabid@gmail.com>
Sun, 29 Mar 2015 12:24:58 +0000 (17:54 +0530)
commit3d076eb8b041e4e556a12a85ba5cf2d1b82ccee6
treefd7887aee9c310165a6a215fbed89d3a2d92f46f
parent66ab4cfb2535ae016a6d2620443f52624d8f0f18
Handle error cases from the tracker

Tracker might reply that the requested torrent is unavailable. Sample
response at `data/debian-7.8.0-amd64-CD-1.iso.error`.

Renamed `getPeerResponse` to `mkPeerResp` and changed it singture to
match other `mk*` functions like `mkMetaInfo`.

Added test cases

New checks made the code one more level deep. Will need a refactor with
the Either Monad.
data/debian-7.8.0-amd64-CD-1.iso.error [new file with mode: 0644]
src/FuncTorrent.hs
src/FuncTorrent/Peer.hs
src/Main.hs
test/Test.hs