From 476f99bd64e2bef671310f2a414b81383260fb2f Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org> Date: Mon, 16 Feb 2015 16:52:05 +0530 Subject: [PATCH] TODO: implement complete/incomplete fields --- src/Peer.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Peer.hs b/src/Peer.hs index d30f9b0..020f596 100644 --- a/src/Peer.hs +++ b/src/Peer.hs @@ -14,6 +14,8 @@ data Peer = Peer { ip :: String data PeerResp = PeerResponse { interval :: Maybe Integer , peers :: [Peer] + , complete :: Maybe Integer + , incomplete :: Maybe Integer } deriving (Show) toInt :: String -> Integer @@ -37,4 +39,4 @@ getPeerResponse body = case (Benc.decode body) of toIPNum = (L.intercalate ".") . map (show . toInt . ("0x" ++) . BC.unpack) . (U.splitN 2) . B16.encode - Left _ -> PeerResponse { interval = Nothing, peers = [] } + Left _ -> PeerResponse { peers = [] } -- 2.45.2