refuse streams that would violate max concurrency settings.

improve ping control API
This commit is contained in:
Oliver Gould
2017-07-17 22:18:03 +00:00
parent fb4f0bc5af
commit 79d3aee1dc
9 changed files with 234 additions and 82 deletions

View File

@@ -84,6 +84,9 @@ pub enum User {
/// The stream state has been reset.
StreamReset,
/// The application attempted to initiate too many streams to remote.
MaxConcurrencyExceeded,
// TODO: reserve additional variants
}
@@ -124,6 +127,7 @@ macro_rules! user_desc {
FlowControlViolation => concat!($prefix, "flow control violation"),
StreamReset => concat!($prefix, "frame sent on reset stream"),
Corrupt => concat!($prefix, "connection state corrupt"),
MaxConcurrencyExceeded => concat!($prefix, "stream would exceed remote max concurrency"),
}
});
}