diff options
Diffstat (limited to 'src')
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 ((<>),($$)) | |||
194 | import System.FilePath | 194 | import System.FilePath |
195 | import System.Posix.Types | 195 | import System.Posix.Types |
196 | 196 | ||
197 | import Network.BitTorrent.Address | 197 | import Network.Address |
198 | import Network.DHT.Routing | 198 | import Network.DHT.Routing |
199 | import Network.DatagramServer.Mainline | 199 | import 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 #-} |
27 | module Network.BitTorrent.Address | 27 | module Network.Address |
28 | ( -- * Address | 28 | ( -- * Address |
29 | Address (..) | 29 | Address (..) |
30 | , fromAddr | 30 | , fromAddr |
@@ -128,7 +128,6 @@ import System.Locale (defaultTimeLocale) | |||
128 | import System.Entropy | 128 | import System.Entropy |
129 | import Data.Digest.CRC32C | 129 | import Data.Digest.CRC32C |
130 | import Network.DatagramServer.Types as RPC | 130 | import Network.DatagramServer.Types as RPC |
131 | import 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 | |||
61 | import Network | 61 | import Network |
62 | 62 | ||
63 | import Data.Torrent | 63 | import Data.Torrent |
64 | import Network.BitTorrent.Address | 64 | import Network.Address |
65 | import Network.BitTorrent.Client.Types | 65 | import Network.BitTorrent.Client.Types |
66 | import Network.BitTorrent.Client.Handle | 66 | import Network.BitTorrent.Client.Handle |
67 | import Network.BitTorrent.DHT as DHT hiding (Options) | 67 | import 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 | |||
36 | import System.Log.FastLogger | 36 | import System.Log.FastLogger |
37 | 37 | ||
38 | import Data.Torrent | 38 | import Data.Torrent |
39 | import Network.BitTorrent.Address | 39 | import Network.Address |
40 | import Network.BitTorrent.Internal.Types as Types | 40 | import Network.BitTorrent.Internal.Types as Types |
41 | import Network.BitTorrent.DHT as DHT | 41 | import Network.BitTorrent.DHT as DHT |
42 | import Network.BitTorrent.Exchange as Exchange | 42 | import 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 | |||
65 | import Text.PrettyPrint.HughesPJClass as PP (pPrint,render) | 65 | import Text.PrettyPrint.HughesPJClass as PP (pPrint,render) |
66 | 66 | ||
67 | import Data.Torrent | 67 | import Data.Torrent |
68 | import Network.BitTorrent.Address | 68 | import Network.Address |
69 | import Network.BitTorrent.DHT.Query | 69 | import Network.BitTorrent.DHT.Query |
70 | import Network.BitTorrent.DHT.Session | 70 | import Network.BitTorrent.DHT.Session |
71 | import Network.DHT.Routing as T hiding (null) | 71 | import 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 | |||
20 | import Network.Socket (SockAddr(..)) | 20 | import Network.Socket (SockAddr(..)) |
21 | 21 | ||
22 | import Data.Torrent | 22 | import Data.Torrent |
23 | import Network.BitTorrent.Address | 23 | import 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 | |||
100 | import Control.Monad | 100 | import Control.Monad |
101 | #endif | 101 | #endif |
102 | import Network.KRPC.Method | 102 | import Network.KRPC.Method |
103 | import Network.BitTorrent.Address hiding (NodeId) | 103 | import Network.Address hiding (NodeId) |
104 | import Data.ByteString (ByteString) | 104 | import Data.ByteString (ByteString) |
105 | import Data.List as L | 105 | import Data.List as L |
106 | import Data.Monoid | 106 | import 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) | |||
99 | import Data.ByteString (ByteString) | 99 | import Data.ByteString (ByteString) |
100 | import Network.DatagramServer.Tox | 100 | import Network.DatagramServer.Tox |
101 | #endif | 101 | #endif |
102 | import Network.BitTorrent.Address hiding (NodeId) | 102 | import Network.Address hiding (NodeId) |
103 | import Network.DatagramServer.Types as RPC hiding (Query,Response) | 103 | import 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) |
24 | import qualified Data.Wrapper.PSQ as PSQ | 24 | import qualified Data.Wrapper.PSQ as PSQ |
25 | ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ) | 25 | ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ) |
26 | import Network.BitTorrent.Address hiding (NodeId) | 26 | import Network.Address hiding (NodeId) |
27 | import Network.DatagramServer.Types | 27 | import Network.DatagramServer.Types |
28 | #ifdef VERSION_bencoding | 28 | #ifdef VERSION_bencoding |
29 | import Network.DHT.Mainline () | 29 | import 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 |
114 | import Network.DatagramServer.Tox as Tox | 114 | import Network.DatagramServer.Tox as Tox |
115 | #endif | 115 | #endif |
116 | import Network.BitTorrent.Address | 116 | import Network.Address |
117 | import Network.BitTorrent.DHT.ContactInfo (PeerStore) | 117 | import Network.BitTorrent.DHT.ContactInfo (PeerStore) |
118 | import qualified Network.BitTorrent.DHT.ContactInfo as P | 118 | import qualified Network.BitTorrent.DHT.ContactInfo as P |
119 | import Network.BitTorrent.DHT.Message | 119 | import 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 | |||
53 | import Data.Time | 53 | import Data.Time |
54 | import System.Random | 54 | import System.Random |
55 | 55 | ||
56 | import Network.BitTorrent.Address | 56 | import 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(..)) | |||
137 | import System.Timeout | 137 | import System.Timeout |
138 | 138 | ||
139 | import Data.Torrent | 139 | import Data.Torrent |
140 | import Network.BitTorrent.Address | 140 | import Network.Address |
141 | import Network.BitTorrent.Exchange.Bitfield as BF | 141 | import Network.BitTorrent.Exchange.Bitfield as BF |
142 | import Network.BitTorrent.Exchange.Message as Msg | 142 | import 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 | |||
43 | import Data.Tuple | 43 | import Data.Tuple |
44 | 44 | ||
45 | import Data.Torrent as Torrent | 45 | import Data.Torrent as Torrent |
46 | import Network.BitTorrent.Address | 46 | import Network.Address |
47 | import Network.BitTorrent.Exchange.Bitfield as BF | 47 | import Network.BitTorrent.Exchange.Bitfield as BF |
48 | import Network.BitTorrent.Exchange.Block as Block | 48 | import Network.BitTorrent.Exchange.Block as Block |
49 | import Network.BitTorrent.Exchange.Message as Msg | 49 | import 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 | |||
13 | import Network.Socket | 13 | import Network.Socket |
14 | 14 | ||
15 | import Data.Torrent | 15 | import Data.Torrent |
16 | import Network.BitTorrent.Address | 16 | import Network.Address |
17 | import Network.BitTorrent.Exchange.Connection hiding (Options) | 17 | import Network.BitTorrent.Exchange.Connection hiding (Options) |
18 | import Network.BitTorrent.Exchange.Session | 18 | import 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 | ||
120 | import Data.Torrent hiding (Piece (..)) | 120 | import Data.Torrent hiding (Piece (..)) |
121 | import qualified Data.Torrent as P (Piece (..)) | 121 | import qualified Data.Torrent as P (Piece (..)) |
122 | import Network.BitTorrent.Address | 122 | import Network.Address |
123 | import Network.BitTorrent.Exchange.Bitfield | 123 | import Network.BitTorrent.Exchange.Bitfield |
124 | import Network.BitTorrent.Exchange.Block | 124 | import 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 (..)) | |||
52 | import Data.BEncode as BE | 52 | import Data.BEncode as BE |
53 | import Data.Torrent as Torrent | 53 | import Data.Torrent as Torrent |
54 | import Network.BitTorrent.Internal.Types | 54 | import Network.BitTorrent.Internal.Types |
55 | import Network.BitTorrent.Address | 55 | import Network.Address |
56 | import Network.BitTorrent.Exchange.Bitfield as BF | 56 | import Network.BitTorrent.Exchange.Bitfield as BF |
57 | import Network.BitTorrent.Exchange.Block as Block | 57 | import Network.BitTorrent.Exchange.Block as Block |
58 | import Network.BitTorrent.Exchange.Connection | 58 | import 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 | |||
126 | import Text.Read (readMaybe) | 126 | import Text.Read (readMaybe) |
127 | 127 | ||
128 | import Data.Torrent | 128 | import Data.Torrent |
129 | import Network.BitTorrent.Address | 129 | import Network.Address |
130 | import Network.BitTorrent.Internal.Progress | 130 | import 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 | |||
37 | import Network.Socket (HostAddress) | 37 | import Network.Socket (HostAddress) |
38 | 38 | ||
39 | import Data.Torrent | 39 | import Data.Torrent |
40 | import Network.BitTorrent.Address | 40 | import Network.Address |
41 | import Network.BitTorrent.Internal.Progress | 41 | import Network.BitTorrent.Internal.Progress |
42 | import Network.BitTorrent.Tracker.Message | 42 | import Network.BitTorrent.Tracker.Message |
43 | import qualified Network.BitTorrent.Tracker.RPC.HTTP as HTTP | 43 | import 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) | |||
48 | import Network.HTTP.Types.URI (SimpleQuery, renderSimpleQuery) | 48 | import Network.HTTP.Types.URI (SimpleQuery, renderSimpleQuery) |
49 | 49 | ||
50 | import Data.Torrent (InfoHash) | 50 | import Data.Torrent (InfoHash) |
51 | import Network.BitTorrent.Address (libUserAgent) | 51 | import Network.Address (libUserAgent) |
52 | import Network.BitTorrent.Tracker.Message hiding (Request, Response) | 52 | import 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 | |||
58 | import Network.URI | 58 | import Network.URI |
59 | 59 | ||
60 | import Data.Torrent | 60 | import Data.Torrent |
61 | import Network.BitTorrent.Address | 61 | import Network.Address |
62 | import Network.BitTorrent.Internal.Cache | 62 | import Network.BitTorrent.Internal.Cache |
63 | import Network.BitTorrent.Internal.Types | 63 | import Network.BitTorrent.Internal.Types |
64 | import Network.BitTorrent.Tracker.List as TL | 64 | import 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) | |||
83 | import qualified Data.ByteString as BS | 83 | import qualified Data.ByteString as BS |
84 | import Data.Bits | 84 | import Data.Bits |
85 | 85 | ||
86 | import Network.BitTorrent.Address | 86 | import 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 | |||
23 | import Data.LargeWord | 23 | import Data.LargeWord |
24 | import Data.IP | 24 | import Data.IP |
25 | import Data.Serialize | 25 | import Data.Serialize |
26 | -- import Network.BitTorrent.Address (NodeInfo(..)) -- Serialize IP | 26 | -- import Network.Address (NodeInfo(..)) -- Serialize IP |
27 | import GHC.Generics (Generic) | 27 | import GHC.Generics (Generic) |
28 | import Network.Socket | 28 | import Network.Socket |
29 | import Network.DatagramServer.Types | 29 | import Network.DatagramServer.Types |