summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT/Session.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-19 05:51:39 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-19 05:51:39 +0400
commit6e9b81c9009140db4807bd51baadcf3be785ee15 (patch)
tree2d844f091b67f5b272ba33c925e3b39f7b56e72b /src/Network/BitTorrent/DHT/Session.hs
parent0012588a36900e333e09182c8d08671999c77767 (diff)
Add MonadActive instance for DHT
Diffstat (limited to 'src/Network/BitTorrent/DHT/Session.hs')
-rw-r--r--src/Network/BitTorrent/DHT/Session.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs
index 75d3294f..a452b764 100644
--- a/src/Network/BitTorrent/DHT/Session.hs
+++ b/src/Network/BitTorrent/DHT/Session.hs
@@ -264,6 +264,12 @@ instance MonadBaseControl IO (DHT ip) where
264 restoreM = DHT . restoreM . unSt 264 restoreM = DHT . restoreM . unSt
265 {-# INLINE restoreM #-} 265 {-# INLINE restoreM #-}
266 266
267-- | Check is it is possible to run 'queryNode' or handle pending
268-- query from remote node.
269instance MonadActive (DHT ip) where
270 monadActive = getManager >>= liftIO . isActive
271 {-# INLINE monadActive #-}
272
267-- | All allocated resources will be closed at 'stopNode'. 273-- | All allocated resources will be closed at 'stopNode'.
268instance MonadResource (DHT ip) where 274instance MonadResource (DHT ip) where
269 liftResourceT m = do 275 liftResourceT m = do