summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-12-16 21:15:04 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-12-16 21:15:04 +0400
commitcb67880b7521bfc6825d350a0c05f6fbb8910822 (patch)
treeee2916ca343869dd206a625c4496cfcf71bcc1e0 /src/Network/BitTorrent
parent6de5e690486599f20c288a12d0d5f153dacb1810 (diff)
Add TODOs and cosmetic fixes
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/Core/PeerAddr.hs5
-rw-r--r--src/Network/BitTorrent/Tracker/Message.hs4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Core/PeerAddr.hs b/src/Network/BitTorrent/Core/PeerAddr.hs
index 88239d0b..e7441929 100644
--- a/src/Network/BitTorrent/Core/PeerAddr.hs
+++ b/src/Network/BitTorrent/Core/PeerAddr.hs
@@ -1,8 +1,9 @@
1-- | 1-- |
2-- Copyright : (c) Sam Truzjan 2013 2-- Copyright : (c) Sam Truzjan 2013
3-- (c) Daniel Gröber 2013
3-- License : BSD3 4-- License : BSD3
4-- Maintainer : pxqr.sta@gmail.com 5-- Maintainer : pxqr.sta@gmail.com
5-- Stability : experimental 6-- Stability : provisional
6-- Portability : portable 7-- Portability : portable
7-- 8--
8-- 'PeerAddr' is used to represent peer address. Currently it's 9-- 'PeerAddr' is used to represent peer address. Currently it's
@@ -104,8 +105,6 @@ ipFromBEncode (BString (BS8.unpack -> ipStr))
104 | otherwise = decodingError $ "IP: " ++ ipStr 105 | otherwise = decodingError $ "IP: " ++ ipStr
105ipFromBEncode _ = decodingError $ "IP: addr should be a bstring" 106ipFromBEncode _ = decodingError $ "IP: addr should be a bstring"
106 107
107instance Ord IP where
108
109instance BEncode IP where 108instance BEncode IP where
110 toBEncode = ipToBEncode 109 toBEncode = ipToBEncode
111 {-# INLINE toBEncode #-} 110 {-# INLINE toBEncode #-}
diff --git a/src/Network/BitTorrent/Tracker/Message.hs b/src/Network/BitTorrent/Tracker/Message.hs
index da46628b..54de44f7 100644
--- a/src/Network/BitTorrent/Tracker/Message.hs
+++ b/src/Network/BitTorrent/Tracker/Message.hs
@@ -1,5 +1,6 @@
1-- | 1-- |
2-- Copyright : (c) Sam Truzjan 2013 2-- Copyright : (c) Sam Truzjan 2013
3-- (c) Daniel Gröber 2013
3-- License : BSD3 4-- License : BSD3
4-- Maintainer : pxqr.sta@gmail.com 5-- Maintainer : pxqr.sta@gmail.com
5-- Stability : experimental 6-- Stability : experimental
@@ -149,6 +150,8 @@ getEvent = do
149{----------------------------------------------------------------------- 150{-----------------------------------------------------------------------
150 Announce query 151 Announce query
151-----------------------------------------------------------------------} 152-----------------------------------------------------------------------}
153-- TODO add &ipv6= and &ipv4= params to AnnounceQuery
154-- http://www.bittorrent.org/beps/bep_0007.html#announce-parameter
152 155
153-- | A tracker request is HTTP GET request; used to include metrics 156-- | A tracker request is HTTP GET request; used to include metrics
154-- from clients that help the tracker keep overall statistics about 157-- from clients that help the tracker keep overall statistics about
@@ -433,6 +436,7 @@ renderAnnounceRequest = queryToSimpleQuery . toQuery
433{----------------------------------------------------------------------- 436{-----------------------------------------------------------------------
434-- Announce response 437-- Announce response
435-----------------------------------------------------------------------} 438-----------------------------------------------------------------------}
439-- TODO check if announceinterval/complete/incomplete is positive ints
436 440
437-- | Tracker can return peer list in either compact(BEP23) or not 441-- | Tracker can return peer list in either compact(BEP23) or not
438-- compact form. 442-- compact form.