summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-06-12 21:55:31 -0400
committerjoe <joe@jerkface.net>2017-06-12 21:55:31 -0400
commit602ce9260950a0eb91cefe4603af5de2443e2fea (patch)
tree299bfea816a152f9d1d1d97dc52089fcc6c680e0
parentab1aaab49ab6a4a13c4416201b261a69155f2eec (diff)
Rename Network.BitTorrent.DHT.Message -> Network.DHT.Mainline
-rw-r--r--bittorrent.cabal1
-rw-r--r--examples/dhtd.hs2
-rw-r--r--src/Network/BitTorrent/DHT/Query.hs2
-rw-r--r--src/Network/BitTorrent/DHT/Session.hs2
-rw-r--r--src/Network/BitTorrent/DHT/Token.hs2
-rw-r--r--src/Network/DHT/Mainline.hs (renamed from src/Network/BitTorrent/DHT/Message.hs)2
6 files changed, 5 insertions, 6 deletions
diff --git a/bittorrent.cabal b/bittorrent.cabal
index 6ddbd03b..d3764bbb 100644
--- a/bittorrent.cabal
+++ b/bittorrent.cabal
@@ -87,7 +87,6 @@ library
87 Network.Address 87 Network.Address
88 Network.BitTorrent.DHT 88 Network.BitTorrent.DHT
89 Network.BitTorrent.DHT.ContactInfo 89 Network.BitTorrent.DHT.ContactInfo
90 Network.BitTorrent.DHT.Message
91 Network.BitTorrent.DHT.Query 90 Network.BitTorrent.DHT.Query
92 Network.DHT.Routing 91 Network.DHT.Routing
93 Network.BitTorrent.DHT.Session 92 Network.BitTorrent.DHT.Session
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index 5694bd9d..8496dd5a 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -36,7 +36,7 @@ import Network.Address
36import Network.BitTorrent.DHT 36import Network.BitTorrent.DHT
37import Network.BitTorrent.DHT.Search 37import Network.BitTorrent.DHT.Search
38import Network.BitTorrent.DHT.Query 38import Network.BitTorrent.DHT.Query
39import Network.BitTorrent.DHT.Message (FindNode(..),NodeFound(..),GetPeers(..),GotPeers(..)) 39import Network.DHT.Mainline (FindNode(..),NodeFound(..),GetPeers(..),GotPeers(..))
40import Network.DatagramServer (QueryFailure(..)) 40import Network.DatagramServer (QueryFailure(..))
41import Network.DatagramServer.Mainline (ReflectedIP(..),KMessageOf) 41import Network.DatagramServer.Mainline (ReflectedIP(..),KMessageOf)
42import qualified Network.DHT.Routing as R 42import qualified Network.DHT.Routing as R
diff --git a/src/Network/BitTorrent/DHT/Query.hs b/src/Network/BitTorrent/DHT/Query.hs
index edc238e6..ae072db0 100644
--- a/src/Network/BitTorrent/DHT/Query.hs
+++ b/src/Network/BitTorrent/DHT/Query.hs
@@ -86,7 +86,7 @@ import Network.KRPC.Method as KRPC
86import Network.DatagramServer.Mainline (ReflectedIP(..)) 86import Network.DatagramServer.Mainline (ReflectedIP(..))
87import Network.DatagramServer (QueryFailure(..)) 87import Network.DatagramServer (QueryFailure(..))
88import Data.Torrent 88import Data.Torrent
89import Network.BitTorrent.DHT.Message 89import Network.DHT.Mainline
90import Network.DHT.Routing as R 90import Network.DHT.Routing as R
91import Network.BitTorrent.DHT.Session 91import Network.BitTorrent.DHT.Session
92import Control.Concurrent.STM 92import Control.Concurrent.STM
diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs
index e205add4..2d290a95 100644
--- a/src/Network/BitTorrent/DHT/Session.hs
+++ b/src/Network/BitTorrent/DHT/Session.hs
@@ -116,7 +116,7 @@ import Network.DatagramServer.Tox as Tox
116import Network.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.DHT.Mainline
120import Network.DHT.Routing as R 120import Network.DHT.Routing as R
121import Network.BitTorrent.DHT.Token as T 121import Network.BitTorrent.DHT.Token as T
122 122
diff --git a/src/Network/BitTorrent/DHT/Token.hs b/src/Network/BitTorrent/DHT/Token.hs
index 75eadd1a..e3a6b1f6 100644
--- a/src/Network/BitTorrent/DHT/Token.hs
+++ b/src/Network/BitTorrent/DHT/Token.hs
@@ -109,7 +109,7 @@ lookup addr TokenMap {..} = makeToken addr curSecret
109 109
110-- | Check if token is valid. 110-- | Check if token is valid.
111-- 111--
112-- Typically used to handle 'Network.BitTorrent.DHT.Message.Announce' 112-- Typically used to handle 'Network.DHT.Mainline.Announce'
113-- query. If token is invalid the 'Network.KRPC.ProtocolError' should 113-- query. If token is invalid the 'Network.KRPC.ProtocolError' should
114-- be sent back to the malicious node. 114-- be sent back to the malicious node.
115member :: Hashable a => NodeAddr a -> Token -> TokenMap -> Bool 115member :: Hashable a => NodeAddr a -> Token -> TokenMap -> Bool
diff --git a/src/Network/BitTorrent/DHT/Message.hs b/src/Network/DHT/Mainline.hs
index e21e0e70..a5f4f606 100644
--- a/src/Network/BitTorrent/DHT/Message.hs
+++ b/src/Network/DHT/Mainline.hs
@@ -62,7 +62,7 @@
62{-# LANGUAGE UndecidableInstances #-} 62{-# LANGUAGE UndecidableInstances #-}
63{-# LANGUAGE ScopedTypeVariables #-} 63{-# LANGUAGE ScopedTypeVariables #-}
64{-# LANGUAGE TypeFamilies #-} 64{-# LANGUAGE TypeFamilies #-}
65module Network.BitTorrent.DHT.Message 65module Network.DHT.Mainline
66 ( -- * Envelopes 66 ( -- * Envelopes
67 Query (..) 67 Query (..)
68 , Response (..) 68 , Response (..)