summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-09-15 17:45:57 -0400
committerjoe <joe@jerkface.net>2017-09-15 17:45:57 -0400
commit65f9152b7be0dc86a09870114c9e33ff4642f918 (patch)
tree2b0ee17754f2f38a63e5ea9aeb0eb1819de85db5
parentfdfe7279339f91bad5ceb0cab8e699415686ab3f (diff)
Moved Network.DHT.Routing -> Network.Kademlia.Routing
-rw-r--r--bittorrent/bittorrent.cabal4
-rw-r--r--dht-client.cabal4
-rw-r--r--examples/dhtd.hs2
-rw-r--r--src/Data/Torrent.hs2
-rw-r--r--src/Network/BitTorrent/MainlineDHT.hs4
-rw-r--r--src/Network/Kademlia.hs2
-rw-r--r--src/Network/Kademlia/Routing.hs (renamed from src/Network/DHT/Routing.hs)20
-rw-r--r--src/Network/Kademlia/Search.hs2
-rw-r--r--src/Network/Tox.hs2
-rw-r--r--src/Network/Tox/DHT/Handlers.hs2
-rw-r--r--src/Network/Tox/Onion/Handlers.hs2
11 files changed, 23 insertions, 23 deletions
diff --git a/bittorrent/bittorrent.cabal b/bittorrent/bittorrent.cabal
index 555143f7..bb34e0ec 100644
--- a/bittorrent/bittorrent.cabal
+++ b/bittorrent/bittorrent.cabal
@@ -81,7 +81,7 @@ library
81 Data.Wrapper.PSQInt 81 Data.Wrapper.PSQInt
82 Data.MinMaxPSQ 82 Data.MinMaxPSQ
83 Network.Address 83 Network.Address
84 Network.DHT.Routing 84 Network.Kademlia.Routing
85 Data.Torrent 85 Data.Torrent
86 Network.BitTorrent.DHT.ContactInfo 86 Network.BitTorrent.DHT.ContactInfo
87 Network.BitTorrent.DHT.Token 87 Network.BitTorrent.DHT.Token
@@ -243,7 +243,7 @@ test-suite spec
243 Network.BitTorrent.DHT.TestData 243 Network.BitTorrent.DHT.TestData
244 Network.BitTorrent.DHT.MessageSpec 244 Network.BitTorrent.DHT.MessageSpec
245 Network.BitTorrent.DHT.QuerySpec 245 Network.BitTorrent.DHT.QuerySpec
246 Network.DHT.RoutingSpec 246 Network.Kademlia.RoutingSpec
247 Network.BitTorrent.DHT.SessionSpec 247 Network.BitTorrent.DHT.SessionSpec
248 Network.BitTorrent.DHT.TokenSpec 248 Network.BitTorrent.DHT.TokenSpec
249 Network.BitTorrent.Internal.CacheSpec 249 Network.BitTorrent.Internal.CacheSpec
diff --git a/dht-client.cabal b/dht-client.cabal
index 12f5cddd..afd3f8da 100644
--- a/dht-client.cabal
+++ b/dht-client.cabal
@@ -65,7 +65,7 @@ library
65 Data.Wrapper.PSQInt 65 Data.Wrapper.PSQInt
66 Data.MinMaxPSQ 66 Data.MinMaxPSQ
67 Network.Address 67 Network.Address
68 Network.DHT.Routing 68 Network.Kademlia.Routing
69 Data.Torrent 69 Data.Torrent
70 Network.BitTorrent.DHT.ContactInfo 70 Network.BitTorrent.DHT.ContactInfo
71 Network.BitTorrent.DHT.Token 71 Network.BitTorrent.DHT.Token
@@ -138,7 +138,7 @@ library
138 Build-depends: network >= 2.4 && < 2.6 138 Build-depends: network >= 2.4 && < 2.6
139 139
140 140
141 other-modules: Paths_bittorrent 141 other-modules: Paths_dht_client
142 Crypto.Cipher.Salsa 142 Crypto.Cipher.Salsa
143 Crypto.Cipher.XSalsa 143 Crypto.Cipher.XSalsa
144 Crypto.ECC.Class 144 Crypto.ECC.Class
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index 5c002363..6c655458 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -52,7 +52,7 @@ import Network.StreamServer
52import Network.Kademlia 52import Network.Kademlia
53import qualified Network.BitTorrent.MainlineDHT as Mainline 53import qualified Network.BitTorrent.MainlineDHT as Mainline
54import qualified Network.Tox as Tox 54import qualified Network.Tox as Tox
55import Network.DHT.Routing as R 55import Network.Kademlia.Routing as R
56import Data.Aeson as J (ToJSON, FromJSON) 56import Data.Aeson as J (ToJSON, FromJSON)
57import qualified Data.Aeson as J 57import qualified Data.Aeson as J
58import qualified Data.ByteString.Lazy as L 58import qualified Data.ByteString.Lazy as L
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs
index 55b34f98..4af583ed 100644
--- a/src/Data/Torrent.hs
+++ b/src/Data/Torrent.hs
@@ -195,7 +195,7 @@ import System.FilePath
195import System.Posix.Types 195import System.Posix.Types
196 196
197import Network.Address 197import Network.Address
198import Network.DHT.Routing 198import Network.Kademlia.Routing
199 199
200 200
201{----------------------------------------------------------------------- 201{-----------------------------------------------------------------------
diff --git a/src/Network/BitTorrent/MainlineDHT.hs b/src/Network/BitTorrent/MainlineDHT.hs
index e7d702c3..4566471a 100644
--- a/src/Network/BitTorrent/MainlineDHT.hs
+++ b/src/Network/BitTorrent/MainlineDHT.hs
@@ -60,8 +60,8 @@ import Network.Address (Address, fromAddr, fromSockAddr,
60import Network.BitTorrent.DHT.ContactInfo as Peers 60import Network.BitTorrent.DHT.ContactInfo as Peers
61import Network.Kademlia.Search (Search (..)) 61import Network.Kademlia.Search (Search (..))
62import Network.BitTorrent.DHT.Token as Token 62import Network.BitTorrent.DHT.Token as Token
63import qualified Network.DHT.Routing as R 63import qualified Network.Kademlia.Routing as R
64 ;import Network.DHT.Routing (Timestamp, getTimestamp) 64 ;import Network.Kademlia.Routing (Timestamp, getTimestamp)
65import Network.QueryResponse 65import Network.QueryResponse
66import Network.Socket 66import Network.Socket
67import System.IO 67import System.IO
diff --git a/src/Network/Kademlia.hs b/src/Network/Kademlia.hs
index 5fb1e334..873fc8c0 100644
--- a/src/Network/Kademlia.hs
+++ b/src/Network/Kademlia.hs
@@ -11,7 +11,7 @@ import Data.Maybe
11import qualified Data.Set as Set 11import qualified Data.Set as Set
12import Data.Time.Clock (getCurrentTime) 12import Data.Time.Clock (getCurrentTime)
13import Data.Time.Clock.POSIX (getPOSIXTime, utcTimeToPOSIXSeconds) 13import Data.Time.Clock.POSIX (getPOSIXTime, utcTimeToPOSIXSeconds)
14import Network.DHT.Routing as R 14import Network.Kademlia.Routing as R
15#ifdef THREAD_DEBUG 15#ifdef THREAD_DEBUG
16import Control.Concurrent.Lifted.Instrument 16import Control.Concurrent.Lifted.Instrument
17#else 17#else
diff --git a/src/Network/DHT/Routing.hs b/src/Network/Kademlia/Routing.hs
index 11dbd11e..7f76ac77 100644
--- a/src/Network/DHT/Routing.hs
+++ b/src/Network/Kademlia/Routing.hs
@@ -26,7 +26,7 @@
26{-# LANGUAGE TupleSections #-} 26{-# LANGUAGE TupleSections #-}
27{-# LANGUAGE StandaloneDeriving, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances #-} 27{-# LANGUAGE StandaloneDeriving, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances #-}
28{-# OPTIONS_GHC -fno-warn-orphans #-} 28{-# OPTIONS_GHC -fno-warn-orphans #-}
29module Network.DHT.Routing 29module Network.Kademlia.Routing
30 {- 30 {-
31 ( -- * BucketList 31 ( -- * BucketList
32 BucketList 32 BucketList
@@ -40,12 +40,12 @@ module Network.DHT.Routing
40 , NodeCount 40 , NodeCount
41 41
42 -- * Query 42 -- * Query
43 , Network.DHT.Routing.null 43 , Network.Kademlia.Routing.null
44 , Network.DHT.Routing.full 44 , Network.Kademlia.Routing.full
45 , thisId 45 , thisId
46 , shape 46 , shape
47 , Network.DHT.Routing.size 47 , Network.Kademlia.Routing.size
48 , Network.DHT.Routing.depth 48 , Network.Kademlia.Routing.depth
49 , compatibleNodeId 49 , compatibleNodeId
50 50
51 -- * Lookup 51 -- * Lookup
@@ -55,14 +55,14 @@ module Network.DHT.Routing
55 , kclosest 55 , kclosest
56 56
57 -- * Construction 57 -- * Construction
58 , Network.DHT.Routing.nullTable 58 , Network.Kademlia.Routing.nullTable
59 , Event(..) 59 , Event(..)
60 , CheckPing(..) 60 , CheckPing(..)
61 , Network.DHT.Routing.insert 61 , Network.Kademlia.Routing.insert
62 62
63 -- * Conversion 63 -- * Conversion
64 , Network.DHT.Routing.TableEntry 64 , Network.Kademlia.Routing.TableEntry
65 , Network.DHT.Routing.toList 65 , Network.Kademlia.Routing.toList
66 66
67 -- * Routing 67 -- * Routing
68 , Timestamp 68 , Timestamp
@@ -436,7 +436,7 @@ mapTable g f tbl@(BucketList self bkts) = reify (contramapC g $ bucketCompare bk
436 resolve = const id 436 resolve = const id
437 437
438instance (Eq ni) => Eq (BucketList ni) where 438instance (Eq ni) => Eq (BucketList ni) where
439 (==) = (==) `on` Network.DHT.Routing.toList 439 (==) = (==) `on` Network.Kademlia.Routing.toList
440 440
441#if 0 441#if 0
442 442
diff --git a/src/Network/Kademlia/Search.hs b/src/Network/Kademlia/Search.hs
index 195bed14..71107fbd 100644
--- a/src/Network/Kademlia/Search.hs
+++ b/src/Network/Kademlia/Search.hs
@@ -26,7 +26,7 @@ import qualified Data.MinMaxPSQ as MM
26import qualified Data.Wrapper.PSQ as PSQ 26import qualified Data.Wrapper.PSQ as PSQ
27 ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ, PSQKey) 27 ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ, PSQKey)
28import Network.Address hiding (NodeId) 28import Network.Address hiding (NodeId)
29import Network.DHT.Routing as R 29import Network.Kademlia.Routing as R
30#ifdef THREAD_DEBUG 30#ifdef THREAD_DEBUG
31import Control.Concurrent.Lifted.Instrument 31import Control.Concurrent.Lifted.Instrument
32#else 32#else
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs
index 7279c2e3..c49cfe90 100644
--- a/src/Network/Tox.hs
+++ b/src/Network/Tox.hs
@@ -71,7 +71,7 @@ import Network.Address (Address, WantIP (..), either4or6,
71 sockAddrPort, testIdBit, 71 sockAddrPort, testIdBit,
72 toSockAddr, un4map) 72 toSockAddr, un4map)
73import Network.Kademlia.Search (Search (..)) 73import Network.Kademlia.Search (Search (..))
74import qualified Network.DHT.Routing as R 74import qualified Network.Kademlia.Routing as R
75import Network.QueryResponse 75import Network.QueryResponse
76import Network.Socket 76import Network.Socket
77import System.Endian 77import System.Endian
diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs
index 2dc183cd..4e43c4a7 100644
--- a/src/Network/Tox/DHT/Handlers.hs
+++ b/src/Network/Tox/DHT/Handlers.hs
@@ -11,7 +11,7 @@ import Network.Kademlia.Search
11import qualified Data.Wrapper.PSQInt as Int 11import qualified Data.Wrapper.PSQInt as Int
12import Network.Kademlia 12import Network.Kademlia
13import Network.Address (WantIP (..), ipFamily, testIdBit,fromSockAddr, sockAddrPort) 13import Network.Address (WantIP (..), ipFamily, testIdBit,fromSockAddr, sockAddrPort)
14import qualified Network.DHT.Routing as R 14import qualified Network.Kademlia.Routing as R
15import Control.TriadCommittee 15import Control.TriadCommittee
16import System.Global6 16import System.Global6
17 17
diff --git a/src/Network/Tox/Onion/Handlers.hs b/src/Network/Tox/Onion/Handlers.hs
index f02bac98..9dc6177c 100644
--- a/src/Network/Tox/Onion/Handlers.hs
+++ b/src/Network/Tox/Onion/Handlers.hs
@@ -18,7 +18,7 @@ import Data.Serialize as S
18import qualified Data.Wrapper.PSQInt as Int 18import qualified Data.Wrapper.PSQInt as Int
19import Network.Kademlia 19import Network.Kademlia
20import Network.Address (WantIP (..), ipFamily, testIdBit) 20import Network.Address (WantIP (..), ipFamily, testIdBit)
21import qualified Network.DHT.Routing as R 21import qualified Network.Kademlia.Routing as R
22import Control.TriadCommittee 22import Control.TriadCommittee
23import qualified Data.MinMaxPSQ as MinMaxPSQ 23import qualified Data.MinMaxPSQ as MinMaxPSQ
24 ;import Data.MinMaxPSQ (MinMaxPSQ') 24 ;import Data.MinMaxPSQ (MinMaxPSQ')