summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Exchange/Message.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-14 23:59:51 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-14 23:59:51 +0400
commitdaf978ddd1f0a07ce4711fa97f51d0ec02478f73 (patch)
tree73aed776a0db115bb8133f10f399bde8a16a3d16 /src/Network/BitTorrent/Exchange/Message.hs
parent5f25d1759ef168917247bc0533ec7cc57dfdc5ac (diff)
Allow to set default request queue length at runtime
Diffstat (limited to 'src/Network/BitTorrent/Exchange/Message.hs')
-rw-r--r--src/Network/BitTorrent/Exchange/Message.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/Exchange/Message.hs b/src/Network/BitTorrent/Exchange/Message.hs
index d0d2bb03..7748f843 100644
--- a/src/Network/BitTorrent/Exchange/Message.hs
+++ b/src/Network/BitTorrent/Exchange/Message.hs
@@ -62,6 +62,7 @@ module Network.BitTorrent.Exchange.Message
62 , StatusUpdate (..) 62 , StatusUpdate (..)
63 , Available (..) 63 , Available (..)
64 , Transfer (..) 64 , Transfer (..)
65 , defaultRequestQueueLength
65 66
66 -- ** Fast extension 67 -- ** Fast extension
67 , FastMessage (..) 68 , FastMessage (..)
@@ -483,6 +484,11 @@ instance PeerMessage Transfer where
483 stats (Piece p ) = ByteStats (4 + 1) (4 + 4 + blockSize p) 0 484 stats (Piece p ) = ByteStats (4 + 1) (4 + 4 + blockSize p) 0
484 stats (Cancel _ ) = ByteStats (4 + 1) (3 * 4) 0 485 stats (Cancel _ ) = ByteStats (4 + 1) (3 * 4) 0
485 486
487-- TODO increase
488-- | Max number of pending 'Request's inflight.
489defaultRequestQueueLength :: Int
490defaultRequestQueueLength = 1
491
486{----------------------------------------------------------------------- 492{-----------------------------------------------------------------------
487-- Fast messages 493-- Fast messages
488-----------------------------------------------------------------------} 494-----------------------------------------------------------------------}