diff options
Diffstat (limited to 'src/Network/Torrent')
-rw-r--r-- | src/Network/Torrent/Tracker.hs (renamed from src/Network/Torrent/THP.hs) | 8 | ||||
-rw-r--r-- | src/Network/Torrent/Tracker/Scrape.hs | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/Network/Torrent/THP.hs b/src/Network/Torrent/Tracker.hs index e584ead1..72fbcb44 100644 --- a/src/Network/Torrent/THP.hs +++ b/src/Network/Torrent/Tracker.hs | |||
@@ -1,12 +1,15 @@ | |||
1 | {-# OPTIONS -fno-warn-orphans #-} | 1 | {-# OPTIONS -fno-warn-orphans #-} |
2 | {-# LANGUAGE OverloadedStrings #-} | 2 | {-# LANGUAGE OverloadedStrings #-} |
3 | module Network.Torrent.THP | 3 | module Network.Torrent.Tracker |
4 | ( Peer(..), Event(..), TRequest(..), TResponse(..) | 4 | ( module Network.Torrent.Tracker.Scrape |
5 | , Peer(..), Event(..), TRequest(..), TResponse(..) | ||
5 | , defaultRequest, defaultPorts | 6 | , defaultRequest, defaultPorts |
6 | , sendRequest | 7 | , sendRequest |
7 | ) | 8 | ) |
8 | where | 9 | where |
9 | 10 | ||
11 | import Network.Torrent.Tracker.Scrape | ||
12 | |||
10 | import Control.Applicative | 13 | import Control.Applicative |
11 | import Data.Char as Char | 14 | import Data.Char as Char |
12 | import Data.Word (Word32) | 15 | import Data.Word (Word32) |
@@ -188,7 +191,6 @@ defaultRequest announce hash pid = | |||
188 | , reqEvent = Just Started | 191 | , reqEvent = Just Started |
189 | } | 192 | } |
190 | 193 | ||
191 | |||
192 | -- | TODO rename to ask for peers | 194 | -- | TODO rename to ask for peers |
193 | -- | 195 | -- |
194 | sendRequest :: TRequest -> IO (Result TResponse) | 196 | sendRequest :: TRequest -> IO (Result TResponse) |
diff --git a/src/Network/Torrent/Tracker/Scrape.hs b/src/Network/Torrent/Tracker/Scrape.hs new file mode 100644 index 00000000..2d1dec07 --- /dev/null +++ b/src/Network/Torrent/Tracker/Scrape.hs | |||
@@ -0,0 +1,8 @@ | |||
1 | module Network.Torrent.Tracker.Scrape | ||
2 | ( | ||
3 | ) where | ||
4 | |||
5 | import Network.URI | ||
6 | |||
7 | scrapeURL :: URI -> Maybe URI | ||
8 | scrapeURL = undefined | ||