summaryrefslogtreecommitdiff
path: root/src/Network
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 /src/Network
parentfdfe7279339f91bad5ceb0cab8e699415686ab3f (diff)
Moved Network.DHT.Routing -> Network.Kademlia.Routing
Diffstat (limited to 'src/Network')
-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
7 files changed, 17 insertions, 17 deletions
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')