diff options
Diffstat (limited to 'src/Network/BitTorrent/PeerWire/Message.hs')
-rw-r--r-- | src/Network/BitTorrent/PeerWire/Message.hs | 5 |
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 | -- | ||
136 | ppMessage :: Message -> String | 139 | ppMessage :: Message -> String |
137 | ppMessage (Bitfield _) = "Bitfield " | 140 | ppMessage (Bitfield _) = "Bitfield " |
138 | ppMessage (Piece blk) = "Piece " ++ ppBlock blk | 141 | ppMessage (Piece blk) = "Piece " ++ ppBlock blk |