enforce max streams per connection limit

fixes #13
This commit is contained in:
Lucas Clemente
2016-05-27 22:39:37 +02:00
parent 4af8ab3e9c
commit c546f5c9dc
4 changed files with 39 additions and 3 deletions

View File

@@ -33,9 +33,11 @@ const ReceiveStreamFlowControlWindow ByteCount = (1 << 20) // 1 MB
const ReceiveConnectionFlowControlWindow ByteCount = (1 << 20) * 1.5 // 1.5 MB
// MaxStreamsPerConnection is the maximum value accepted for the number of streams per connection
// TODO: set a reasonable value here
const MaxStreamsPerConnection uint32 = 100
// MaxStreamsMultiplier is the slack the client is allowed for the maximum number of streams per connection, needed e.g. when packets are out of order or dropped.
const MaxStreamsMultiplier = 1.1
// MaxIdleConnectionStateLifetime is the maximum value accepted for the idle connection state lifetime
// TODO: set a reasonable value here
const MaxIdleConnectionStateLifetime = 60 * time.Second