summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/DHT.hs')
-rw-r--r--src/Network/BitTorrent/DHT.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/DHT.hs b/src/Network/BitTorrent/DHT.hs
index 3be7cfa0..2e8164bd 100644
--- a/src/Network/BitTorrent/DHT.hs
+++ b/src/Network/BitTorrent/DHT.hs
@@ -23,14 +23,13 @@ import Data.Maybe
23import Data.List as L 23import Data.List as L
24import Data.Map as M 24import Data.Map as M
25import Data.HashMap.Strict as HM 25import Data.HashMap.Strict as HM
26
27import Network 26import Network
28import Network.Socket 27import Network.Socket
29import Remote.KRPC 28import System.Entropy
30 29
30import Remote.KRPC
31import Data.BEncode 31import Data.BEncode
32import Data.Torrent 32import Data.Torrent
33import Data.Kademlia.Routing.Table
34import Network.BitTorrent.Peer 33import Network.BitTorrent.Peer
35 34
36{----------------------------------------------------------------------- 35{-----------------------------------------------------------------------
@@ -44,7 +43,7 @@ type NodeId = ByteString
44-- Distribution of ID's should be as uniform as possible. 43-- Distribution of ID's should be as uniform as possible.
45-- 44--
46genNodeID :: IO NodeId 45genNodeID :: IO NodeId
47genNodeID = undefined -- randomIO 46genNodeID = getEntropy 20
48 47
49instance Serialize PortNumber where 48instance Serialize PortNumber where
50 get = fromIntegral <$> getWord16be 49 get = fromIntegral <$> getWord16be