summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/PeerWire/Message.hs
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-05-01 09:31:32 +0400
committerSam T <pxqr.sta@gmail.com>2013-05-01 09:31:32 +0400
commitd7df7e201bd7e0893910d77c1ea172ea0c59cd3f (patch)
treee2561fa4515d2dc95515ae0b7ee5e6c72141a14e /src/Network/BitTorrent/PeerWire/Message.hs
parentc80221283ceb618195eb7fde5174f362aea0a27a (diff)
~ Fix documentation and typos.
Diffstat (limited to 'src/Network/BitTorrent/PeerWire/Message.hs')
-rw-r--r--src/Network/BitTorrent/PeerWire/Message.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/PeerWire/Message.hs b/src/Network/BitTorrent/PeerWire/Message.hs
index e833ba03..3f6647dd 100644
--- a/src/Network/BitTorrent/PeerWire/Message.hs
+++ b/src/Network/BitTorrent/PeerWire/Message.hs
@@ -132,7 +132,10 @@ instance Serialize Message where
132 put (AllowedFast ix) = putInt 5 >> putWord8 0x11 >> putInt ix 132 put (AllowedFast ix) = putInt 5 >> putWord8 0x11 >> putInt ix
133 133
134 134
135-- | Compact output for logging: only useful information but not payload bytes. 135-- | Format messages in human readable form. Note that output is
136-- compact and suitable for logging: only useful information but not
137-- payload bytes.
138--
136ppMessage :: Message -> String 139ppMessage :: Message -> String
137ppMessage (Bitfield _) = "Bitfield " 140ppMessage (Bitfield _) = "Bitfield "
138ppMessage (Piece blk) = "Piece " ++ ppBlock blk 141ppMessage (Piece blk) = "Piece " ++ ppBlock blk