HORIZON HASKELLDocslts/ghc-9.14.xb2f3bfd2026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11

Modulevortex-ws-0.2.1GHC2024

Vortex.Ws.Door.Rate

Token buckets, one per peer and one for the whole door, and the count of open sessions. The arithmetic is pure (take1, opens); the gate keeps the rest in STM.

  • 3 types
  • 8 values
  • Packagevortex-ws-0.2.1
  • Exports11
  • LanguageGHC2024
  • LicenceBSD-3-Clause
  • SourceRate.hs
valueadmitFrame :: Gate -> Peer -> Double -> IO Admission
#

Charge one frame to its peer and to the door. A peer's bucket that has refilled is forgotten, so the map holds only peers that are busy.