summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/PeerWire/Message.hs
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-05-05 02:57:06 +0400
committerSam T <pxqr.sta@gmail.com>2013-05-05 02:57:06 +0400
commit9b6024c9e3eca884d897bd6a3f033ea5648f7df2 (patch)
tree89c4354cade8ea71ea281a0089b11820a03fea1d /src/Network/BitTorrent/PeerWire/Message.hs
parentbf3005952658130aaa83d8e8678c6ea7b36e45cb (diff)
+ Add some benchs.
Diffstat (limited to 'src/Network/BitTorrent/PeerWire/Message.hs')
-rw-r--r--src/Network/BitTorrent/PeerWire/Message.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/PeerWire/Message.hs b/src/Network/BitTorrent/PeerWire/Message.hs
index 188f0572..cc771966 100644
--- a/src/Network/BitTorrent/PeerWire/Message.hs
+++ b/src/Network/BitTorrent/PeerWire/Message.hs
@@ -12,6 +12,7 @@ import Data.Serialize
12import Network.BitTorrent.PeerWire.Block 12import Network.BitTorrent.PeerWire.Block
13import Network.BitTorrent.PeerWire.Bitfield 13import Network.BitTorrent.PeerWire.Bitfield
14 14
15import Data.Array
15 16
16-- | Messages used in communication between peers. 17-- | Messages used in communication between peers.
17-- 18--
@@ -78,7 +79,7 @@ data Message = KeepAlive
78instance Serialize Message where 79instance Serialize Message where
79 get = do 80 get = do
80 len <- getInt 81 len <- getInt
81 _ <- lookAhead $ ensure len 82-- _ <- lookAhead $ ensure len
82 if len == 0 then return KeepAlive 83 if len == 0 then return KeepAlive
83 else do 84 else do
84 mid <- getWord8 85 mid <- getWord8