summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Core
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Core')
-rw-r--r--src/Network/BitTorrent/Core/PeerAddr.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Network/BitTorrent/Core/PeerAddr.hs b/src/Network/BitTorrent/Core/PeerAddr.hs
index 73aa69fd..a4f45e74 100644
--- a/src/Network/BitTorrent/Core/PeerAddr.hs
+++ b/src/Network/BitTorrent/Core/PeerAddr.hs
@@ -16,7 +16,6 @@
16module Network.BitTorrent.Core.PeerAddr 16module Network.BitTorrent.Core.PeerAddr
17 ( -- * Peer address 17 ( -- * Peer address
18 PeerAddr(..) 18 PeerAddr(..)
19 , getCompactPeerList
20 , peerSockAddr 19 , peerSockAddr
21 , connectToPeer 20 , connectToPeer
22 , ppPeer 21 , ppPeer
@@ -80,16 +79,14 @@ instance BEncode PeerAddr where
80 79
81-- | The tracker "compact peer list" compatible encoding. The 80-- | The tracker "compact peer list" compatible encoding. The
82-- 'peerId' is always 'Nothing'. 81-- 'peerId' is always 'Nothing'.
82--
83-- For more info see: <http://www.bittorrent.org/beps/bep_0023.html>
83instance Serialize PeerAddr where 84instance Serialize PeerAddr where
84 put PeerAddr {..} = put peerID >> put peerPort 85 put PeerAddr {..} = put peerID >> put peerPort
85 {-# INLINE put #-} 86 {-# INLINE put #-}
86 get = PeerAddr Nothing <$> get <*> get 87 get = PeerAddr Nothing <$> get <*> get
87 {-# INLINE get #-} 88 {-# INLINE get #-}
88 89
89-- | For more info see: <http://www.bittorrent.org/beps/bep_0023.html>
90getCompactPeerList :: S.Get [PeerAddr]
91getCompactPeerList = many get
92
93-- TODO make platform independent, clarify htonl 90-- TODO make platform independent, clarify htonl
94 91
95-- | Convert peer info from tracker response to socket address. Used 92-- | Convert peer info from tracker response to socket address. Used