diff options
author | joe <joe@jerkface.net> | 2017-09-15 17:45:57 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-09-15 17:45:57 -0400 |
commit | 65f9152b7be0dc86a09870114c9e33ff4642f918 (patch) | |
tree | 2b0ee17754f2f38a63e5ea9aeb0eb1819de85db5 /src/Network | |
parent | fdfe7279339f91bad5ceb0cab8e699415686ab3f (diff) |
Moved Network.DHT.Routing -> Network.Kademlia.Routing
Diffstat (limited to 'src/Network')
-rw-r--r-- | src/Network/BitTorrent/MainlineDHT.hs | 4 | ||||
-rw-r--r-- | src/Network/Kademlia.hs | 2 | ||||
-rw-r--r-- | src/Network/Kademlia/Routing.hs (renamed from src/Network/DHT/Routing.hs) | 20 | ||||
-rw-r--r-- | src/Network/Kademlia/Search.hs | 2 | ||||
-rw-r--r-- | src/Network/Tox.hs | 2 | ||||
-rw-r--r-- | src/Network/Tox/DHT/Handlers.hs | 2 | ||||
-rw-r--r-- | src/Network/Tox/Onion/Handlers.hs | 2 |
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, | |||
60 | import Network.BitTorrent.DHT.ContactInfo as Peers | 60 | import Network.BitTorrent.DHT.ContactInfo as Peers |
61 | import Network.Kademlia.Search (Search (..)) | 61 | import Network.Kademlia.Search (Search (..)) |
62 | import Network.BitTorrent.DHT.Token as Token | 62 | import Network.BitTorrent.DHT.Token as Token |
63 | import qualified Network.DHT.Routing as R | 63 | import qualified Network.Kademlia.Routing as R |
64 | ;import Network.DHT.Routing (Timestamp, getTimestamp) | 64 | ;import Network.Kademlia.Routing (Timestamp, getTimestamp) |
65 | import Network.QueryResponse | 65 | import Network.QueryResponse |
66 | import Network.Socket | 66 | import Network.Socket |
67 | import System.IO | 67 | import 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 | |||
11 | import qualified Data.Set as Set | 11 | import qualified Data.Set as Set |
12 | import Data.Time.Clock (getCurrentTime) | 12 | import Data.Time.Clock (getCurrentTime) |
13 | import Data.Time.Clock.POSIX (getPOSIXTime, utcTimeToPOSIXSeconds) | 13 | import Data.Time.Clock.POSIX (getPOSIXTime, utcTimeToPOSIXSeconds) |
14 | import Network.DHT.Routing as R | 14 | import Network.Kademlia.Routing as R |
15 | #ifdef THREAD_DEBUG | 15 | #ifdef THREAD_DEBUG |
16 | import Control.Concurrent.Lifted.Instrument | 16 | import 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 #-} |
29 | module Network.DHT.Routing | 29 | module 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 | ||
438 | instance (Eq ni) => Eq (BucketList ni) where | 438 | instance (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 | |||
26 | import qualified Data.Wrapper.PSQ as PSQ | 26 | import qualified Data.Wrapper.PSQ as PSQ |
27 | ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ, PSQKey) | 27 | ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ, PSQKey) |
28 | import Network.Address hiding (NodeId) | 28 | import Network.Address hiding (NodeId) |
29 | import Network.DHT.Routing as R | 29 | import Network.Kademlia.Routing as R |
30 | #ifdef THREAD_DEBUG | 30 | #ifdef THREAD_DEBUG |
31 | import Control.Concurrent.Lifted.Instrument | 31 | import 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) |
73 | import Network.Kademlia.Search (Search (..)) | 73 | import Network.Kademlia.Search (Search (..)) |
74 | import qualified Network.DHT.Routing as R | 74 | import qualified Network.Kademlia.Routing as R |
75 | import Network.QueryResponse | 75 | import Network.QueryResponse |
76 | import Network.Socket | 76 | import Network.Socket |
77 | import System.Endian | 77 | import 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 | |||
11 | import qualified Data.Wrapper.PSQInt as Int | 11 | import qualified Data.Wrapper.PSQInt as Int |
12 | import Network.Kademlia | 12 | import Network.Kademlia |
13 | import Network.Address (WantIP (..), ipFamily, testIdBit,fromSockAddr, sockAddrPort) | 13 | import Network.Address (WantIP (..), ipFamily, testIdBit,fromSockAddr, sockAddrPort) |
14 | import qualified Network.DHT.Routing as R | 14 | import qualified Network.Kademlia.Routing as R |
15 | import Control.TriadCommittee | 15 | import Control.TriadCommittee |
16 | import System.Global6 | 16 | import 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 | |||
18 | import qualified Data.Wrapper.PSQInt as Int | 18 | import qualified Data.Wrapper.PSQInt as Int |
19 | import Network.Kademlia | 19 | import Network.Kademlia |
20 | import Network.Address (WantIP (..), ipFamily, testIdBit) | 20 | import Network.Address (WantIP (..), ipFamily, testIdBit) |
21 | import qualified Network.DHT.Routing as R | 21 | import qualified Network.Kademlia.Routing as R |
22 | import Control.TriadCommittee | 22 | import Control.TriadCommittee |
23 | import qualified Data.MinMaxPSQ as MinMaxPSQ | 23 | import qualified Data.MinMaxPSQ as MinMaxPSQ |
24 | ;import Data.MinMaxPSQ (MinMaxPSQ') | 24 | ;import Data.MinMaxPSQ (MinMaxPSQ') |