diff options
Diffstat (limited to 'src/Network/BitTorrent/Exchange/Wire.hs')
-rw-r--r-- | src/Network/BitTorrent/Exchange/Wire.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Exchange/Wire.hs b/src/Network/BitTorrent/Exchange/Wire.hs index 6a161762..680da059 100644 --- a/src/Network/BitTorrent/Exchange/Wire.hs +++ b/src/Network/BitTorrent/Exchange/Wire.hs | |||
@@ -61,13 +61,16 @@ data ChannelSide | |||
61 | | RemotePeer | 61 | | RemotePeer |
62 | deriving (Show, Eq, Enum) | 62 | deriving (Show, Eq, Enum) |
63 | 63 | ||
64 | -- TODO pretty instance | ||
65 | |||
64 | -- | Errors occur when a remote peer violates protocol specification. | 66 | -- | Errors occur when a remote peer violates protocol specification. |
65 | data ProtocolError | 67 | data ProtocolError |
66 | = UnexpectedTopic InfoHash -- ^ peer replied with unexpected infohash. | 68 | = UnexpectedTopic InfoHash -- ^ peer replied with unexpected infohash. |
67 | | UnexpectedPeerId PeerId -- ^ peer replied with unexpected peer id. | 69 | | UnexpectedPeerId PeerId -- ^ peer replied with unexpected peer id. |
68 | | UnknownTopic InfoHash -- ^ peer requested unknown torrent. | 70 | | UnknownTopic InfoHash -- ^ peer requested unknown torrent. |
69 | | HandshakeRefused -- ^ peer do not send an extended handshake back. | 71 | | HandshakeRefused -- ^ peer do not send an extended handshake back. |
70 | | InvalidMessage | 72 | | BitfieldAlreadSend ChannelSide |
73 | | InvalidMessage -- TODO caps violation | ||
71 | { violentSender :: ChannelSide -- ^ endpoint sent invalid message | 74 | { violentSender :: ChannelSide -- ^ endpoint sent invalid message |
72 | , extensionRequired :: Extension -- ^ | 75 | , extensionRequired :: Extension -- ^ |
73 | } | 76 | } |