summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker/Message.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2013-12-13 19:03:54 +0100
committerDaniel Gröber <dxld@darkboxed.org>2013-12-14 19:42:21 +0100
commitb17f437190186fcddaa7745e82e88be9cc7657e9 (patch)
tree20f3e384e3dbe20d32d861d7e29bc712ed8ce659 /src/Network/BitTorrent/Tracker/Message.hs
parent2b62a5da05832db21159ff81b78c8f41307cacee (diff)
Use Data.IP for peerIP in PeerAddr type
Diffstat (limited to 'src/Network/BitTorrent/Tracker/Message.hs')
-rw-r--r--src/Network/BitTorrent/Tracker/Message.hs8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/Network/BitTorrent/Tracker/Message.hs b/src/Network/BitTorrent/Tracker/Message.hs
index fe7686cb..6249cdc4 100644
--- a/src/Network/BitTorrent/Tracker/Message.hs
+++ b/src/Network/BitTorrent/Tracker/Message.hs
@@ -436,12 +436,6 @@ data PeerList
436 | CompactPeerList { getPeerList :: [PeerAddr] } 436 | CompactPeerList { getPeerList :: [PeerAddr] }
437 deriving (Show, Eq, Typeable) 437 deriving (Show, Eq, Typeable)
438 438
439instance ToJSON PeerList where
440 toJSON = toJSON . getPeerList
441
442instance FromJSON PeerList where
443 parseJSON v = PeerList <$> parseJSON v
444
445putCompactPeerList :: S.Putter [PeerAddr] 439putCompactPeerList :: S.Putter [PeerAddr]
446putCompactPeerList = mapM_ put 440putCompactPeerList = mapM_ put
447 441
@@ -485,8 +479,6 @@ data AnnounceInfo =
485 , respWarning :: !(Maybe Text) 479 , respWarning :: !(Maybe Text)
486 } deriving (Show, Typeable) 480 } deriving (Show, Typeable)
487 481
488$(deriveJSON omitRecordPrefix ''AnnounceInfo)
489
490-- | HTTP tracker protocol compatible encoding. 482-- | HTTP tracker protocol compatible encoding.
491instance BEncode AnnounceInfo where 483instance BEncode AnnounceInfo where
492 toBEncode (Failure t) = toDict $ 484 toBEncode (Failure t) = toDict $