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.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/DHT.hs b/src/Network/BitTorrent/DHT.hs
index 7eef0c67..41a76886 100644
--- a/src/Network/BitTorrent/DHT.hs
+++ b/src/Network/BitTorrent/DHT.hs
@@ -82,8 +82,13 @@ handlers = [pingH, findNodeH, getPeersH, announceH]
82-----------------------------------------------------------------------} 82-----------------------------------------------------------------------}
83 83
84-- | Run DHT on specified port. <add note about resources> 84-- | Run DHT on specified port. <add note about resources>
85dht :: Address ip => NodeAddr ip -> DHT ip a -> IO a 85dht :: Address ip
86dht addr = runDHT addr handlers 86 => Options -- ^ normally you need to use 'Data.Default.def';
87 -> NodeAddr ip -- ^ address to bind this node;
88 -> DHT ip a -- ^ actions to run: 'bootstrap', 'lookup', etc;
89 -> IO a -- ^ result.
90dht = runDHT handlers
91{-# INLINE dht #-}
87 92
88-- | One good node may be sufficient. The list of bootstrapping nodes 93-- | One good node may be sufficient. The list of bootstrapping nodes
89-- usually obtained from 'Data.Torrent.tNodes' field. 94-- usually obtained from 'Data.Torrent.tNodes' field.