packages feed

network-control 0.1.0 → 0.1.1

raw patch · 3 files changed

+23/−4 lines, 3 files

Files

Changelog.md view
@@ -1,5 +1,10 @@ # Revision history for network-control +## 0.1.1++* Change defaultMaxData+  [#4](https://github.com/kazu-yamamoto/network-control/pull/4)+ ## 0.1.0  * Breaking change: Renaming rxfWindow to rxfBufSize.
Network/Control/Flow.hs view
@@ -21,6 +21,7 @@     -- ** Flow control for receiving     RxFlow (..),     newRxFlow,+    rxWindowSize,     FlowControlType (..),     maybeOpenRxWindow,     checkRxLimit,@@ -36,9 +37,18 @@ defaultMaxStreamData :: Int defaultMaxStreamData = 262144 --- | Default max data of a connection. (1M bytes)+-- | Default max data of a connection.+--+-- By default, this is set to @defaultMaxStreams * defaultMaxStreamData@. This+-- ensures that streams that are not currently handled cannot exhaust the+-- connection window.+--+-- If you use a smaller connection window size, you __must__ ensure that if you+-- are handling fewer concurrent streams than allowed by 'defaultMaxStreams',+-- that the unhandled streams cannot exhaust the connection window, or risk the+-- entire system deadlocking. defaultMaxData :: Int-defaultMaxData = 1048576+defaultMaxData = defaultMaxStreamData * defaultMaxStreams  -- | Window size. type WindowSize = Int@@ -79,7 +89,7 @@ --   rxfConsumed   rxfReceived  rxfLimit -- --                     |-----------| The size which the peer can send---                        Window+--                      rxWindowSize -- @ data RxFlow = RxFlow     { rxfBufSize :: Int@@ -96,6 +106,10 @@ -- | Creating RX flow with an initial window size. newRxFlow :: WindowSize -> RxFlow newRxFlow win = RxFlow win 0 0 win++-- | 'rxfLimit' - 'rxfReceived'.+rxWindowSize :: RxFlow -> WindowSize+rxWindowSize RxFlow{..} = rxfLimit - rxfReceived  -- | The representation of window size update. data FlowControlType
network-control.cabal view
@@ -1,6 +1,6 @@ cabal-version:   3.0 name:            network-control-version:         0.1.0+version:         0.1.1 license:         BSD-3-Clause license-file:    LICENSE maintainer:      kazu@iij.ad.jp