summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Data/Torrent.hs4
-rw-r--r--src/Network/Address.hs (renamed from src/Network/BitTorrent/Address.hs)5
-rw-r--r--src/Network/BitTorrent/Client.hs2
-rw-r--r--src/Network/BitTorrent/Client/Types.hs2
-rw-r--r--src/Network/BitTorrent/DHT.hs2
-rw-r--r--src/Network/BitTorrent/DHT/ContactInfo.hs4
-rw-r--r--src/Network/BitTorrent/DHT/Message.hs2
-rw-r--r--src/Network/BitTorrent/DHT/Query.hs2
-rw-r--r--src/Network/BitTorrent/DHT/Search.hs2
-rw-r--r--src/Network/BitTorrent/DHT/Session.hs2
-rw-r--r--src/Network/BitTorrent/DHT/Token.hs2
-rw-r--r--src/Network/BitTorrent/Exchange/Connection.hs2
-rw-r--r--src/Network/BitTorrent/Exchange/Download.hs2
-rw-r--r--src/Network/BitTorrent/Exchange/Manager.hs2
-rw-r--r--src/Network/BitTorrent/Exchange/Message.hs2
-rw-r--r--src/Network/BitTorrent/Exchange/Session.hs2
-rw-r--r--src/Network/BitTorrent/Tracker/Message.hs2
-rw-r--r--src/Network/BitTorrent/Tracker/RPC.hs2
-rw-r--r--src/Network/BitTorrent/Tracker/RPC/HTTP.hs2
-rw-r--r--src/Network/BitTorrent/Tracker/Session.hs2
-rw-r--r--src/Network/DHT/Routing.hs2
-rw-r--r--src/Network/DatagramServer/Tox.hs2
22 files changed, 25 insertions, 26 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs
index 6a999478..b3bf0ec7 100644
--- a/src/Data/Torrent.hs
+++ b/src/Data/Torrent.hs
@@ -194,7 +194,7 @@ import Text.PrettyPrint.HughesPJClass hiding ((<>),($$))
194import System.FilePath 194import System.FilePath
195import System.Posix.Types 195import System.Posix.Types
196 196
197import Network.BitTorrent.Address 197import Network.Address
198import Network.DHT.Routing 198import Network.DHT.Routing
199import Network.DatagramServer.Mainline 199import Network.DatagramServer.Mainline
200 200
@@ -866,7 +866,7 @@ data Torrent = Torrent
866 , tNodes :: !(Maybe [NodeAddr HostName]) 866 , tNodes :: !(Maybe [NodeAddr HostName])
867 -- ^ This key should be set to the /K closest/ nodes in the 867 -- ^ This key should be set to the /K closest/ nodes in the
868 -- torrent generating client's routing table. Alternatively, the 868 -- torrent generating client's routing table. Alternatively, the
869 -- key could be set to a known good 'Network.BitTorrent.Address.Node' 869 -- key could be set to a known good 'Network.Address.Node'
870 -- such as one operated by the person generating the torrent. 870 -- such as one operated by the person generating the torrent.
871 -- 871 --
872 -- Please do not automatically add \"router.bittorrent.com\" to 872 -- Please do not automatically add \"router.bittorrent.com\" to
diff --git a/src/Network/BitTorrent/Address.hs b/src/Network/Address.hs
index e75066b1..19bf29d6 100644
--- a/src/Network/BitTorrent/Address.hs
+++ b/src/Network/Address.hs
@@ -1,5 +1,5 @@
1-- | 1-- |
2-- Module : Network.BitTorrent.Address 2-- Module : Network.Address
3-- Copyright : (c) Sam Truzjan 2013 3-- Copyright : (c) Sam Truzjan 2013
4-- (c) Daniel Gröber 2013 4-- (c) Daniel Gröber 2013
5-- License : BSD3 5-- License : BSD3
@@ -24,7 +24,7 @@
24{-# LANGUAGE DeriveTraversable #-} 24{-# LANGUAGE DeriveTraversable #-}
25{-# LANGUAGE TemplateHaskell #-} 25{-# LANGUAGE TemplateHaskell #-}
26{-# OPTIONS -fno-warn-orphans #-} 26{-# OPTIONS -fno-warn-orphans #-}
27module Network.BitTorrent.Address 27module Network.Address
28 ( -- * Address 28 ( -- * Address
29 Address (..) 29 Address (..)
30 , fromAddr 30 , fromAddr
@@ -128,7 +128,6 @@ import System.Locale (defaultTimeLocale)
128import System.Entropy 128import System.Entropy
129import Data.Digest.CRC32C 129import Data.Digest.CRC32C
130import Network.DatagramServer.Types as RPC 130import Network.DatagramServer.Types as RPC
131import Network.DatagramServer.Mainline (KMessageOf)
132-- import Network.DHT.Mainline 131-- import Network.DHT.Mainline
133 132
134-- import Paths_bittorrent (version) 133-- import Paths_bittorrent (version)
diff --git a/src/Network/BitTorrent/Client.hs b/src/Network/BitTorrent/Client.hs
index b9a59f45..c84290dd 100644
--- a/src/Network/BitTorrent/Client.hs
+++ b/src/Network/BitTorrent/Client.hs
@@ -61,7 +61,7 @@ import Data.Text
61import Network 61import Network
62 62
63import Data.Torrent 63import Data.Torrent
64import Network.BitTorrent.Address 64import Network.Address
65import Network.BitTorrent.Client.Types 65import Network.BitTorrent.Client.Types
66import Network.BitTorrent.Client.Handle 66import Network.BitTorrent.Client.Handle
67import Network.BitTorrent.DHT as DHT hiding (Options) 67import Network.BitTorrent.DHT as DHT hiding (Options)
diff --git a/src/Network/BitTorrent/Client/Types.hs b/src/Network/BitTorrent/Client/Types.hs
index 7f228276..e2ad858f 100644
--- a/src/Network/BitTorrent/Client/Types.hs
+++ b/src/Network/BitTorrent/Client/Types.hs
@@ -36,7 +36,7 @@ import Network
36import System.Log.FastLogger 36import System.Log.FastLogger
37 37
38import Data.Torrent 38import Data.Torrent
39import Network.BitTorrent.Address 39import Network.Address
40import Network.BitTorrent.Internal.Types as Types 40import Network.BitTorrent.Internal.Types as Types
41import Network.BitTorrent.DHT as DHT 41import Network.BitTorrent.DHT as DHT
42import Network.BitTorrent.Exchange as Exchange 42import Network.BitTorrent.Exchange as Exchange
diff --git a/src/Network/BitTorrent/DHT.hs b/src/Network/BitTorrent/DHT.hs
index 13f3744f..51d92127 100644
--- a/src/Network/BitTorrent/DHT.hs
+++ b/src/Network/BitTorrent/DHT.hs
@@ -65,7 +65,7 @@ import Network.Socket
65import Text.PrettyPrint.HughesPJClass as PP (pPrint,render) 65import Text.PrettyPrint.HughesPJClass as PP (pPrint,render)
66 66
67import Data.Torrent 67import Data.Torrent
68import Network.BitTorrent.Address 68import Network.Address
69import Network.BitTorrent.DHT.Query 69import Network.BitTorrent.DHT.Query
70import Network.BitTorrent.DHT.Session 70import Network.BitTorrent.DHT.Session
71import Network.DHT.Routing as T hiding (null) 71import Network.DHT.Routing as T hiding (null)
diff --git a/src/Network/BitTorrent/DHT/ContactInfo.hs b/src/Network/BitTorrent/DHT/ContactInfo.hs
index f9dae567..3db3d5a8 100644
--- a/src/Network/BitTorrent/DHT/ContactInfo.hs
+++ b/src/Network/BitTorrent/DHT/ContactInfo.hs
@@ -20,13 +20,13 @@ import Data.Word
20import Network.Socket (SockAddr(..)) 20import Network.Socket (SockAddr(..))
21 21
22import Data.Torrent 22import Data.Torrent
23import Network.BitTorrent.Address 23import Network.Address
24 24
25-- {- 25-- {-
26-- import Data.HashMap.Strict as HM 26-- import Data.HashMap.Strict as HM
27-- 27--
28-- import Data.Torrent.InfoHash 28-- import Data.Torrent.InfoHash
29-- import Network.BitTorrent.Address 29-- import Network.Address
30-- 30--
31-- -- increase prefix when table is too large 31-- -- increase prefix when table is too large
32-- -- decrease prefix when table is too small 32-- -- decrease prefix when table is too small
diff --git a/src/Network/BitTorrent/DHT/Message.hs b/src/Network/BitTorrent/DHT/Message.hs
index 34714a6a..04cc0d41 100644
--- a/src/Network/BitTorrent/DHT/Message.hs
+++ b/src/Network/BitTorrent/DHT/Message.hs
@@ -100,7 +100,7 @@ import Data.Word
100import Control.Monad 100import Control.Monad
101#endif 101#endif
102import Network.KRPC.Method 102import Network.KRPC.Method
103import Network.BitTorrent.Address hiding (NodeId) 103import Network.Address hiding (NodeId)
104import Data.ByteString (ByteString) 104import Data.ByteString (ByteString)
105import Data.List as L 105import Data.List as L
106import Data.Monoid 106import Data.Monoid
diff --git a/src/Network/BitTorrent/DHT/Query.hs b/src/Network/BitTorrent/DHT/Query.hs
index cd2b5119..7d320283 100644
--- a/src/Network/BitTorrent/DHT/Query.hs
+++ b/src/Network/BitTorrent/DHT/Query.hs
@@ -99,7 +99,7 @@ import Network.DatagramServer.Mainline (KMessageOf)
99import Data.ByteString (ByteString) 99import Data.ByteString (ByteString)
100import Network.DatagramServer.Tox 100import Network.DatagramServer.Tox
101#endif 101#endif
102import Network.BitTorrent.Address hiding (NodeId) 102import Network.Address hiding (NodeId)
103import Network.DatagramServer.Types as RPC hiding (Query,Response) 103import Network.DatagramServer.Types as RPC hiding (Query,Response)
104 104
105{----------------------------------------------------------------------- 105{-----------------------------------------------------------------------
diff --git a/src/Network/BitTorrent/DHT/Search.hs b/src/Network/BitTorrent/DHT/Search.hs
index 367a6a9b..a6d07746 100644
--- a/src/Network/BitTorrent/DHT/Search.hs
+++ b/src/Network/BitTorrent/DHT/Search.hs
@@ -23,7 +23,7 @@ import qualified Data.MinMaxPSQ as MM
23 ;import Data.MinMaxPSQ (MinMaxPSQ) 23 ;import Data.MinMaxPSQ (MinMaxPSQ)
24import qualified Data.Wrapper.PSQ as PSQ 24import qualified Data.Wrapper.PSQ as PSQ
25 ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ) 25 ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ)
26import Network.BitTorrent.Address hiding (NodeId) 26import Network.Address hiding (NodeId)
27import Network.DatagramServer.Types 27import Network.DatagramServer.Types
28#ifdef VERSION_bencoding 28#ifdef VERSION_bencoding
29import Network.DHT.Mainline () 29import Network.DHT.Mainline ()
diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs
index 730c0059..e205add4 100644
--- a/src/Network/BitTorrent/DHT/Session.hs
+++ b/src/Network/BitTorrent/DHT/Session.hs
@@ -113,7 +113,7 @@ import Network.DatagramServer.Mainline (KMessageOf)
113#else 113#else
114import Network.DatagramServer.Tox as Tox 114import Network.DatagramServer.Tox as Tox
115#endif 115#endif
116import Network.BitTorrent.Address 116import Network.Address
117import Network.BitTorrent.DHT.ContactInfo (PeerStore) 117import Network.BitTorrent.DHT.ContactInfo (PeerStore)
118import qualified Network.BitTorrent.DHT.ContactInfo as P 118import qualified Network.BitTorrent.DHT.ContactInfo as P
119import Network.BitTorrent.DHT.Message 119import Network.BitTorrent.DHT.Message
diff --git a/src/Network/BitTorrent/DHT/Token.hs b/src/Network/BitTorrent/DHT/Token.hs
index 4c930cbc..75eadd1a 100644
--- a/src/Network/BitTorrent/DHT/Token.hs
+++ b/src/Network/BitTorrent/DHT/Token.hs
@@ -53,7 +53,7 @@ import Data.String
53import Data.Time 53import Data.Time
54import System.Random 54import System.Random
55 55
56import Network.BitTorrent.Address 56import Network.Address
57 57
58-- TODO use ShortByteString 58-- TODO use ShortByteString
59 59
diff --git a/src/Network/BitTorrent/Exchange/Connection.hs b/src/Network/BitTorrent/Exchange/Connection.hs
index d65d322e..6804d0a2 100644
--- a/src/Network/BitTorrent/Exchange/Connection.hs
+++ b/src/Network/BitTorrent/Exchange/Connection.hs
@@ -137,7 +137,7 @@ import System.Log.FastLogger (ToLogStr(..))
137import System.Timeout 137import System.Timeout
138 138
139import Data.Torrent 139import Data.Torrent
140import Network.BitTorrent.Address 140import Network.Address
141import Network.BitTorrent.Exchange.Bitfield as BF 141import Network.BitTorrent.Exchange.Bitfield as BF
142import Network.BitTorrent.Exchange.Message as Msg 142import Network.BitTorrent.Exchange.Message as Msg
143 143
diff --git a/src/Network/BitTorrent/Exchange/Download.hs b/src/Network/BitTorrent/Exchange/Download.hs
index aa754407..981db2fb 100644
--- a/src/Network/BitTorrent/Exchange/Download.hs
+++ b/src/Network/BitTorrent/Exchange/Download.hs
@@ -43,7 +43,7 @@ import Data.Map as M
43import Data.Tuple 43import Data.Tuple
44 44
45import Data.Torrent as Torrent 45import Data.Torrent as Torrent
46import Network.BitTorrent.Address 46import Network.Address
47import Network.BitTorrent.Exchange.Bitfield as BF 47import Network.BitTorrent.Exchange.Bitfield as BF
48import Network.BitTorrent.Exchange.Block as Block 48import Network.BitTorrent.Exchange.Block as Block
49import Network.BitTorrent.Exchange.Message as Msg 49import Network.BitTorrent.Exchange.Message as Msg
diff --git a/src/Network/BitTorrent/Exchange/Manager.hs b/src/Network/BitTorrent/Exchange/Manager.hs
index 54727805..30a6a607 100644
--- a/src/Network/BitTorrent/Exchange/Manager.hs
+++ b/src/Network/BitTorrent/Exchange/Manager.hs
@@ -13,7 +13,7 @@ import Data.Default
13import Network.Socket 13import Network.Socket
14 14
15import Data.Torrent 15import Data.Torrent
16import Network.BitTorrent.Address 16import Network.Address
17import Network.BitTorrent.Exchange.Connection hiding (Options) 17import Network.BitTorrent.Exchange.Connection hiding (Options)
18import Network.BitTorrent.Exchange.Session 18import Network.BitTorrent.Exchange.Session
19 19
diff --git a/src/Network/BitTorrent/Exchange/Message.hs b/src/Network/BitTorrent/Exchange/Message.hs
index 74232b47..2c6770f7 100644
--- a/src/Network/BitTorrent/Exchange/Message.hs
+++ b/src/Network/BitTorrent/Exchange/Message.hs
@@ -119,7 +119,7 @@ import Text.PrettyPrint.HughesPJClass hiding ((<>),($$))
119 119
120import Data.Torrent hiding (Piece (..)) 120import Data.Torrent hiding (Piece (..))
121import qualified Data.Torrent as P (Piece (..)) 121import qualified Data.Torrent as P (Piece (..))
122import Network.BitTorrent.Address 122import Network.Address
123import Network.BitTorrent.Exchange.Bitfield 123import Network.BitTorrent.Exchange.Bitfield
124import Network.BitTorrent.Exchange.Block 124import Network.BitTorrent.Exchange.Block
125 125
diff --git a/src/Network/BitTorrent/Exchange/Session.hs b/src/Network/BitTorrent/Exchange/Session.hs
index 00886ccf..38a3c3a6 100644
--- a/src/Network/BitTorrent/Exchange/Session.hs
+++ b/src/Network/BitTorrent/Exchange/Session.hs
@@ -52,7 +52,7 @@ import System.Log.FastLogger (LogStr, ToLogStr (..))
52import Data.BEncode as BE 52import Data.BEncode as BE
53import Data.Torrent as Torrent 53import Data.Torrent as Torrent
54import Network.BitTorrent.Internal.Types 54import Network.BitTorrent.Internal.Types
55import Network.BitTorrent.Address 55import Network.Address
56import Network.BitTorrent.Exchange.Bitfield as BF 56import Network.BitTorrent.Exchange.Bitfield as BF
57import Network.BitTorrent.Exchange.Block as Block 57import Network.BitTorrent.Exchange.Block as Block
58import Network.BitTorrent.Exchange.Connection 58import Network.BitTorrent.Exchange.Connection
diff --git a/src/Network/BitTorrent/Tracker/Message.hs b/src/Network/BitTorrent/Tracker/Message.hs
index ddd86665..b9b6a9d3 100644
--- a/src/Network/BitTorrent/Tracker/Message.hs
+++ b/src/Network/BitTorrent/Tracker/Message.hs
@@ -126,7 +126,7 @@ import System.Entropy
126import Text.Read (readMaybe) 126import Text.Read (readMaybe)
127 127
128import Data.Torrent 128import Data.Torrent
129import Network.BitTorrent.Address 129import Network.Address
130import Network.BitTorrent.Internal.Progress 130import Network.BitTorrent.Internal.Progress
131 131
132{----------------------------------------------------------------------- 132{-----------------------------------------------------------------------
diff --git a/src/Network/BitTorrent/Tracker/RPC.hs b/src/Network/BitTorrent/Tracker/RPC.hs
index 6fd22b25..45fef05e 100644
--- a/src/Network/BitTorrent/Tracker/RPC.hs
+++ b/src/Network/BitTorrent/Tracker/RPC.hs
@@ -37,7 +37,7 @@ import Network.URI
37import Network.Socket (HostAddress) 37import Network.Socket (HostAddress)
38 38
39import Data.Torrent 39import Data.Torrent
40import Network.BitTorrent.Address 40import Network.Address
41import Network.BitTorrent.Internal.Progress 41import Network.BitTorrent.Internal.Progress
42import Network.BitTorrent.Tracker.Message 42import Network.BitTorrent.Tracker.Message
43import qualified Network.BitTorrent.Tracker.RPC.HTTP as HTTP 43import qualified Network.BitTorrent.Tracker.RPC.HTTP as HTTP
diff --git a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
index bc52bddd..9b6e056a 100644
--- a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
+++ b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
@@ -48,7 +48,7 @@ import Network.HTTP.Types.Header (hUserAgent)
48import Network.HTTP.Types.URI (SimpleQuery, renderSimpleQuery) 48import Network.HTTP.Types.URI (SimpleQuery, renderSimpleQuery)
49 49
50import Data.Torrent (InfoHash) 50import Data.Torrent (InfoHash)
51import Network.BitTorrent.Address (libUserAgent) 51import Network.Address (libUserAgent)
52import Network.BitTorrent.Tracker.Message hiding (Request, Response) 52import Network.BitTorrent.Tracker.Message hiding (Request, Response)
53 53
54{----------------------------------------------------------------------- 54{-----------------------------------------------------------------------
diff --git a/src/Network/BitTorrent/Tracker/Session.hs b/src/Network/BitTorrent/Tracker/Session.hs
index cef7d665..aa4a832f 100644
--- a/src/Network/BitTorrent/Tracker/Session.hs
+++ b/src/Network/BitTorrent/Tracker/Session.hs
@@ -58,7 +58,7 @@ import Data.Traversable
58import Network.URI 58import Network.URI
59 59
60import Data.Torrent 60import Data.Torrent
61import Network.BitTorrent.Address 61import Network.Address
62import Network.BitTorrent.Internal.Cache 62import Network.BitTorrent.Internal.Cache
63import Network.BitTorrent.Internal.Types 63import Network.BitTorrent.Internal.Types
64import Network.BitTorrent.Tracker.List as TL 64import Network.BitTorrent.Tracker.List as TL
diff --git a/src/Network/DHT/Routing.hs b/src/Network/DHT/Routing.hs
index c0a431fa..1d1aa44b 100644
--- a/src/Network/DHT/Routing.hs
+++ b/src/Network/DHT/Routing.hs
@@ -83,7 +83,7 @@ import Text.PrettyPrint.HughesPJClass (pPrint,Pretty)
83import qualified Data.ByteString as BS 83import qualified Data.ByteString as BS
84import Data.Bits 84import Data.Bits
85 85
86import Network.BitTorrent.Address 86import Network.Address
87 87
88 88
89{----------------------------------------------------------------------- 89{-----------------------------------------------------------------------
diff --git a/src/Network/DatagramServer/Tox.hs b/src/Network/DatagramServer/Tox.hs
index 2f48b512..d7d20824 100644
--- a/src/Network/DatagramServer/Tox.hs
+++ b/src/Network/DatagramServer/Tox.hs
@@ -23,7 +23,7 @@ import Data.Word
23import Data.LargeWord 23import Data.LargeWord
24import Data.IP 24import Data.IP
25import Data.Serialize 25import Data.Serialize
26-- import Network.BitTorrent.Address (NodeInfo(..)) -- Serialize IP 26-- import Network.Address (NodeInfo(..)) -- Serialize IP
27import GHC.Generics (Generic) 27import GHC.Generics (Generic)
28import Network.Socket 28import Network.Socket
29import Network.DatagramServer.Types 29import Network.DatagramServer.Types