summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-12-25 05:32:38 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-12-25 05:32:38 +0400
commit18347913bc66b27889c9d81d41cfe7d9a1d0d90d (patch)
tree2f15acb9fe0bc80d8d56f05a1f18a41ce651989f /src/Network/BitTorrent
parente3f7c822a3e6f57260881fa3245ad2b89087ecce (diff)
Fix GotPeers(peers) key
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/Core/PeerAddr.hs2
-rw-r--r--src/Network/BitTorrent/DHT/Message.hs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/Core/PeerAddr.hs b/src/Network/BitTorrent/Core/PeerAddr.hs
index bc4a1078..86b88491 100644
--- a/src/Network/BitTorrent/Core/PeerAddr.hs
+++ b/src/Network/BitTorrent/Core/PeerAddr.hs
@@ -254,7 +254,7 @@ peerSockAddr PeerAddr {..} =
254 254
255-- | Storage used to keep track a set of known peers in client, 255-- | Storage used to keep track a set of known peers in client,
256-- tracker or DHT sessions. 256-- tracker or DHT sessions.
257newtype PeerStore a = PeerStore (HashMap InfoHash [PeerAddr a]) 257newtype PeerStore ip = PeerStore (HashMap InfoHash [PeerAddr ip])
258 258
259-- | Empty store. 259-- | Empty store.
260instance Default (PeerStore a) where 260instance Default (PeerStore a) where
diff --git a/src/Network/BitTorrent/DHT/Message.hs b/src/Network/BitTorrent/DHT/Message.hs
index a2a6484a..85abf019 100644
--- a/src/Network/BitTorrent/DHT/Message.hs
+++ b/src/Network/BitTorrent/DHT/Message.hs
@@ -163,7 +163,7 @@ data GotPeers ip = GotPeers
163 { -- | If the queried node has no peers for the infohash, returned 163 { -- | If the queried node has no peers for the infohash, returned
164 -- the K nodes in the queried nodes routing table closest to the 164 -- the K nodes in the queried nodes routing table closest to the
165 -- infohash supplied in the query. 165 -- infohash supplied in the query.
166 peers :: Either [NodeAddr ip] [PeerAddr ip] 166 peers :: Either [NodeInfo ip] [PeerAddr ip]
167 167
168 -- | The token value is a required argument for a future 168 -- | The token value is a required argument for a future
169 -- announce_peer query. 169 -- announce_peer query.
@@ -171,7 +171,7 @@ data GotPeers ip = GotPeers
171 } deriving Typeable 171 } deriving Typeable
172 172
173peers_key :: BKey 173peers_key :: BKey
174peers_key = "peers" 174peers_key = "values"
175 175
176token_key :: BKey 176token_key :: BKey
177token_key = "token" 177token_key = "token"
@@ -204,7 +204,7 @@ data Announce = Announce
204 { -- | infohash of the torrent; 204 { -- | infohash of the torrent;
205 topic :: InfoHash 205 topic :: InfoHash
206 206
207 -- | the port /this/ peer is listenning; 207 -- | the port /this/ peer is listening;
208 , port :: PortNumber 208 , port :: PortNumber
209 209
210 -- | received in response to a previous get_peers query. 210 -- | received in response to a previous get_peers query.