diff options
author | Sam T <sta.cs.vsu@gmail.com> | 2013-04-17 11:22:16 +0400 |
---|---|---|
committer | Sam T <sta.cs.vsu@gmail.com> | 2013-04-17 11:22:16 +0400 |
commit | 5656a5ce55509de371d1b89edf3263fb5fa39e74 (patch) | |
tree | 6067f3a8019c615f1e9b67954353bd12f895315c /src/Network/Torrent/Tracker.hs | |
parent | e8dd39b3c49e38a8ec7d0e1b474bf8e8170ec51c (diff) |
~ Move the Peer datatype to PeerID module.
We need this to escape recursive module dependencies.
Diffstat (limited to 'src/Network/Torrent/Tracker.hs')
-rw-r--r-- | src/Network/Torrent/Tracker.hs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/Network/Torrent/Tracker.hs b/src/Network/Torrent/Tracker.hs index ef2413f6..20cdb2fc 100644 --- a/src/Network/Torrent/Tracker.hs +++ b/src/Network/Torrent/Tracker.hs | |||
@@ -2,7 +2,7 @@ | |||
2 | {-# LANGUAGE OverloadedStrings #-} | 2 | {-# LANGUAGE OverloadedStrings #-} |
3 | module Network.Torrent.Tracker | 3 | module Network.Torrent.Tracker |
4 | ( module Network.Torrent.Tracker.Scrape | 4 | ( module Network.Torrent.Tracker.Scrape |
5 | , Peer(..), Event(..), TRequest(..), TResponse(..) | 5 | , Event(..), TRequest(..), TResponse(..) |
6 | , defaultRequest, defaultPorts | 6 | , defaultRequest, defaultPorts |
7 | , sendRequest | 7 | , sendRequest |
8 | ) | 8 | ) |
@@ -31,12 +31,6 @@ import Network.URI | |||
31 | import Network.Torrent.PeerID | 31 | import Network.Torrent.PeerID |
32 | 32 | ||
33 | 33 | ||
34 | data Peer = Peer { | ||
35 | peerID :: Maybe PeerID | ||
36 | , peerIP :: HostAddress | ||
37 | , peerPort :: PortNumber | ||
38 | } deriving Show | ||
39 | |||
40 | data Event = Started -- ^ For first request. | 34 | data Event = Started -- ^ For first request. |
41 | | Stopped -- ^ Sent when the peer is shutting down. | 35 | | Stopped -- ^ Sent when the peer is shutting down. |
42 | | Completed -- ^ To be sent when the peer completes a download. | 36 | | Completed -- ^ To be sent when the peer completes a download. |