add Client config to disable server push

- Adds `Client::builder().enable_push(false)` to disable push
- Client sends a GO_AWAY if receiving a push when it's disabled
This commit is contained in:
Sean McArthur
2017-09-14 15:16:16 -07:00
parent ed4e67c1a4
commit a8a4cd2be1
13 changed files with 406 additions and 62 deletions

View File

@@ -31,15 +31,18 @@ use http::{Request, Response};
#[derive(Debug)]
pub struct Config {
/// Maximum number of remote initiated streams
pub max_remote_initiated: Option<usize>,
/// Initial window size of remote initiated streams
pub init_remote_window_sz: WindowSize,
/// Initial window size of locally initiated streams
pub local_init_window_sz: WindowSize,
/// Maximum number of locally initiated streams
pub max_local_initiated: Option<usize>,
pub local_max_initiated: Option<usize>,
/// Initial window size of locally initiated streams
pub init_local_window_sz: WindowSize,
/// If the local peer is willing to receive push promises
pub local_push_enabled: bool,
/// Initial window size of remote initiated streams
pub remote_init_window_sz: WindowSize,
/// Maximum number of remote initiated streams
pub remote_max_initiated: Option<usize>,
}