From 5d390922115b28c010410481e751cea06d5bb693 Mon Sep 17 00:00:00 2001 From: Sam T Date: Thu, 4 Jul 2013 05:34:30 +0400 Subject: ~ Rename PeerID to PeerId. --- src/Network/BitTorrent/Exchange/Protocol.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Network/BitTorrent/Exchange') diff --git a/src/Network/BitTorrent/Exchange/Protocol.hs b/src/Network/BitTorrent/Exchange/Protocol.hs index feccf760..073dad58 100644 --- a/src/Network/BitTorrent/Exchange/Protocol.hs +++ b/src/Network/BitTorrent/Exchange/Protocol.hs @@ -116,7 +116,7 @@ data Handshake = Handshake { -- | Peer id of the initiator. This is usually the same peer id -- that is transmitted in tracker requests. -- - , hsPeerID :: PeerID + , hsPeerId :: PeerId } deriving (Show, Eq) @@ -126,7 +126,7 @@ instance Serialize Handshake where S.putByteString (hsProtocol hs) S.putWord64be (hsReserved hs) S.put (hsInfoHash hs) - S.put (hsPeerID hs) + S.put (hsPeerId hs) get = do len <- S.getWord8 @@ -142,7 +142,7 @@ handshakeCaps = hsReserved -- | Format handshake in human readable form. ppHandshake :: Handshake -> Doc ppHandshake Handshake {..} = - text (BC.unpack hsProtocol) <+> ppClientInfo (clientInfo hsPeerID) + text (BC.unpack hsProtocol) <+> ppClientInfo (clientInfo hsPeerId) -- | Get handshake message size in bytes from the length of protocol -- string. @@ -163,7 +163,7 @@ defaultReserved = 0 -- | Length of info hash and peer id is unchecked, so it /should/ be -- equal 20. -defaultHandshake :: InfoHash -> PeerID -> Handshake +defaultHandshake :: InfoHash -> PeerId -> Handshake defaultHandshake = Handshake defaultBTProtocol defaultReserved -- | Handshaking with a peer specified by the second argument. -- cgit v1.2.3