summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/DHT')
-rw-r--r--src/Network/BitTorrent/DHT/Query.hs1
-rw-r--r--src/Network/BitTorrent/DHT/Session.hs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/DHT/Query.hs b/src/Network/BitTorrent/DHT/Query.hs
index 07fb80c2..714e9559 100644
--- a/src/Network/BitTorrent/DHT/Query.hs
+++ b/src/Network/BitTorrent/DHT/Query.hs
@@ -80,6 +80,7 @@ announceH = nodeHandler $ \ naddr @ NodeAddr {..} (Announce {..}) -> do
80 insertPeer topic peerAddr 80 insertPeer topic peerAddr
81 return Announced 81 return Announced
82 82
83-- | Includes all query handlers.
83handlers :: Address ip => [NodeHandler ip] 84handlers :: Address ip => [NodeHandler ip]
84handlers = [pingH, findNodeH, getPeersH, announceH] 85handlers = [pingH, findNodeH, getPeersH, announceH]
85 86
diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs
index 1bc9e697..b4ff0208 100644
--- a/src/Network/BitTorrent/DHT/Session.hs
+++ b/src/Network/BitTorrent/DHT/Session.hs
@@ -308,6 +308,7 @@ startNode hs opts naddr logger = do
308stopNode :: Node ip -> IO () 308stopNode :: Node ip -> IO ()
309stopNode Node {..} = closeInternalState resources 309stopNode Node {..} = closeInternalState resources
310 310
311-- | Run DHT operation on the given session.
311runDHT :: Node ip -> DHT ip a -> IO a 312runDHT :: Node ip -> DHT ip a -> IO a
312runDHT node action = runReaderT (unDHT action) node 313runDHT node action = runReaderT (unDHT action) node
313{-# INLINE runDHT #-} 314{-# INLINE runDHT #-}