@@ -278,7 +278,7 @@ impl Builder {
278
278
/// If not set, hyper will use a default.
279
279
///
280
280
/// [spec]: https://http2.github.io/http2-spec/#SETTINGS_INITIAL_WINDOW_SIZE
281
- pub fn http2_initial_stream_window_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
281
+ pub fn initial_stream_window_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
282
282
if let Some ( sz) = sz. into ( ) {
283
283
self . h2_builder . adaptive_window = false ;
284
284
self . h2_builder . initial_stream_window_size = sz;
@@ -291,7 +291,7 @@ impl Builder {
291
291
/// Passing `None` will do nothing.
292
292
///
293
293
/// If not set, hyper will use a default.
294
- pub fn http2_initial_connection_window_size (
294
+ pub fn initial_connection_window_size (
295
295
& mut self ,
296
296
sz : impl Into < Option < u32 > > ,
297
297
) -> & mut Self {
@@ -305,9 +305,9 @@ impl Builder {
305
305
/// Sets whether to use an adaptive flow control.
306
306
///
307
307
/// Enabling this will override the limits set in
308
- /// `http2_initial_stream_window_size ` and
309
- /// `http2_initial_connection_window_size `.
310
- pub fn http2_adaptive_window ( & mut self , enabled : bool ) -> & mut Self {
308
+ /// `initial_stream_window_size ` and
309
+ /// `initial_connection_window_size `.
310
+ pub fn adaptive_window ( & mut self , enabled : bool ) -> & mut Self {
311
311
use proto:: h2:: SPEC_WINDOW_SIZE ;
312
312
313
313
self . h2_builder . adaptive_window = enabled;
@@ -323,7 +323,7 @@ impl Builder {
323
323
/// Passing `None` will do nothing.
324
324
///
325
325
/// If not set, hyper will use a default.
326
- pub fn http2_max_frame_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
326
+ pub fn max_frame_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
327
327
if let Some ( sz) = sz. into ( ) {
328
328
self . h2_builder . max_frame_size = sz;
329
329
}
@@ -336,7 +336,7 @@ impl Builder {
336
336
/// Pass `None` to disable HTTP2 keep-alive.
337
337
///
338
338
/// Default is currently disabled.
339
- pub fn http2_keep_alive_interval (
339
+ pub fn keep_alive_interval (
340
340
& mut self ,
341
341
interval : impl Into < Option < Duration > > ,
342
342
) -> & mut Self {
@@ -347,10 +347,10 @@ impl Builder {
347
347
/// Sets a timeout for receiving an acknowledgement of the keep-alive ping.
348
348
///
349
349
/// If the ping is not acknowledged within the timeout, the connection will
350
- /// be closed. Does nothing if `http2_keep_alive_interval ` is disabled.
350
+ /// be closed. Does nothing if `keep_alive_interval ` is disabled.
351
351
///
352
352
/// Default is 20 seconds.
353
- pub fn http2_keep_alive_timeout ( & mut self , timeout : Duration ) -> & mut Self {
353
+ pub fn keep_alive_timeout ( & mut self , timeout : Duration ) -> & mut Self {
354
354
self . h2_builder . keep_alive_timeout = timeout;
355
355
self
356
356
}
@@ -359,11 +359,11 @@ impl Builder {
359
359
///
360
360
/// If disabled, keep-alive pings are only sent while there are open
361
361
/// request/responses streams. If enabled, pings are also sent when no
362
- /// streams are active. Does nothing if `http2_keep_alive_interval ` is
362
+ /// streams are active. Does nothing if `keep_alive_interval ` is
363
363
/// disabled.
364
364
///
365
365
/// Default is `false`.
366
- pub fn http2_keep_alive_while_idle ( & mut self , enabled : bool ) -> & mut Self {
366
+ pub fn keep_alive_while_idle ( & mut self , enabled : bool ) -> & mut Self {
367
367
self . h2_builder . keep_alive_while_idle = enabled;
368
368
self
369
369
}
@@ -376,7 +376,7 @@ impl Builder {
376
376
/// The default value is determined by the `h2` crate.
377
377
///
378
378
/// [`h2::client::Builder::max_concurrent_reset_streams`]: https://docs.rs/h2/client/struct.Builder.html#method.max_concurrent_reset_streams
379
- pub fn http2_max_concurrent_reset_streams ( & mut self , max : usize ) -> & mut Self {
379
+ pub fn max_concurrent_reset_streams ( & mut self , max : usize ) -> & mut Self {
380
380
self . h2_builder . max_concurrent_reset_streams = Some ( max) ;
381
381
self
382
382
}
@@ -388,7 +388,7 @@ impl Builder {
388
388
/// # Panics
389
389
///
390
390
/// The value must be no larger than `u32::MAX`.
391
- pub fn http2_max_send_buf_size ( & mut self , max : usize ) -> & mut Self {
391
+ pub fn max_send_buf_size ( & mut self , max : usize ) -> & mut Self {
392
392
assert ! ( max <= std:: u32 :: MAX as usize ) ;
393
393
self . h2_builder . max_send_buffer_size = max;
394
394
self
0 commit comments