From d7df7e201bd7e0893910d77c1ea172ea0c59cd3f Mon Sep 17 00:00:00 2001 From: Sam T Date: Wed, 1 May 2013 09:31:32 +0400 Subject: ~ Fix documentation and typos. --- src/Network/BitTorrent/PeerWire/Message.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Network/BitTorrent/PeerWire/Message.hs') 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 put (AllowedFast ix) = putInt 5 >> putWord8 0x11 >> putInt ix --- | Compact output for logging: only useful information but not payload bytes. +-- | Format messages in human readable form. Note that output is +-- compact and suitable for logging: only useful information but not +-- payload bytes. +-- ppMessage :: Message -> String ppMessage (Bitfield _) = "Bitfield " ppMessage (Piece blk) = "Piece " ++ ppBlock blk -- cgit v1.2.3