summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/Exchange/Wire.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/Exchange/Wire.hs b/src/Network/BitTorrent/Exchange/Wire.hs
index d1bed146..4ddade66 100644
--- a/src/Network/BitTorrent/Exchange/Wire.hs
+++ b/src/Network/BitTorrent/Exchange/Wire.hs
@@ -393,6 +393,10 @@ data FloodDetector = FloodDetector
393 , floodPredicate :: Detector ConnectionStats 393 , floodPredicate :: Detector ConnectionStats
394 } deriving Show 394 } deriving Show
395 395
396instance Eq FloodDetector where
397 a == b = floodFactor a == floodFactor b
398 && floodThreshold a == floodThreshold b
399
396-- | Flood detector with very permissive options. 400-- | Flood detector with very permissive options.
397instance Default FloodDetector where 401instance Default FloodDetector where
398 def = FloodDetector 402 def = FloodDetector
@@ -444,7 +448,7 @@ data Options = Options
444 -- 'ExtendedMetadata' for more info. 448 -- 'ExtendedMetadata' for more info.
445 -- 449 --
446 , maxInfoDictSize :: {-# UNPACK #-} !Int 450 , maxInfoDictSize :: {-# UNPACK #-} !Int
447 } deriving Show 451 } deriving (Show, Eq)
448 452
449-- | Permissive default parameters, most likely you don't need to 453-- | Permissive default parameters, most likely you don't need to
450-- change them. 454-- change them.
@@ -736,7 +740,7 @@ data ConnectionPrefs = ConnectionPrefs
736 , prefProtocol :: !ProtocolName 740 , prefProtocol :: !ProtocolName
737 , prefCaps :: !Caps 741 , prefCaps :: !Caps
738 , prefExtCaps :: !ExtendedCaps 742 , prefExtCaps :: !ExtendedCaps
739 } 743 } deriving (Show, Eq)
740 744
741instance Default ConnectionPrefs where 745instance Default ConnectionPrefs where
742 def = ConnectionPrefs 746 def = ConnectionPrefs