diff options
Diffstat (limited to 'src/Network/BitTorrent/DHT/ContactInfo.hs')
-rw-r--r-- | src/Network/BitTorrent/DHT/ContactInfo.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/DHT/ContactInfo.hs b/src/Network/BitTorrent/DHT/ContactInfo.hs index 823982d4..4302288c 100644 --- a/src/Network/BitTorrent/DHT/ContactInfo.hs +++ b/src/Network/BitTorrent/DHT/ContactInfo.hs | |||
@@ -1,5 +1,6 @@ | |||
1 | module Network.BitTorrent.DHT.ContactInfo | 1 | module Network.BitTorrent.DHT.ContactInfo |
2 | ( PeerStore | 2 | ( PeerStore |
3 | , Network.BitTorrent.DHT.ContactInfo.lookup | ||
3 | , Network.BitTorrent.DHT.ContactInfo.freshPeers | 4 | , Network.BitTorrent.DHT.ContactInfo.freshPeers |
4 | , Network.BitTorrent.DHT.ContactInfo.insertPeer | 5 | , Network.BitTorrent.DHT.ContactInfo.insertPeer |
5 | , knownSwarms | 6 | , knownSwarms |
@@ -156,9 +157,9 @@ instance Serialize (PeerStore a) where | |||
156 | get = undefined | 157 | get = undefined |
157 | put = undefined | 158 | put = undefined |
158 | 159 | ||
159 | -- | Used in 'get_peers' DHT queries. | 160 | -- | Returns all peers associated with a given info hash. |
160 | -- lookup :: Ord a => InfoHash -> PeerStore a -> [PeerAddr a] | 161 | lookup :: Ord a => InfoHash -> PeerStore a -> [PeerAddr a] |
161 | -- lookup ih (PeerStore m) = maybe [] (PSQ.keys . peers) $ HM.lookup ih m | 162 | lookup ih (PeerStore m) = maybe [] (PSQ.keys . peers) $ HM.lookup ih m |
162 | 163 | ||
163 | batchSize = 64 | 164 | batchSize = 64 |
164 | 165 | ||