Add methods to {client, server}::Builder to set max concurrent streams (#150)
				
					
				
			This PR adds `max_concurrent_streams()` methods to the client and server `Builder`s to set the `max_concurrent_streams` setting. I've added unit tests to ensure the correct SETTINGS frame is sent. Closes #106
This commit is contained in:
		| @@ -187,6 +187,18 @@ impl Builder { | ||||
|         self | ||||
|     } | ||||
|  | ||||
|     /// Set the maximum number of concurrent streams. | ||||
|     /// | ||||
|     /// Clients can only limit the maximum number of streams that that the | ||||
|     /// server can initiate. See [Section 5.1.2] in the HTTP/2 spec for more | ||||
|     /// details. | ||||
|     /// | ||||
|     /// [Section 5.1.2]: https://http2.github.io/http2-spec/#rfc.section.5.1.2 | ||||
|     pub fn max_concurrent_streams(&mut self, max: u32) -> &mut Self { | ||||
|         self.settings.set_max_concurrent_streams(Some(max)); | ||||
|         self | ||||
|     } | ||||
|  | ||||
|     /// Enable or disable the server to send push promises. | ||||
|     pub fn enable_push(&mut self, enabled: bool) -> &mut Self { | ||||
|         self.settings.set_enable_push(enabled); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user