@@ -116,7 +116,7 @@ impl<E> Builder<E> {
116
116
/// If not set, hyper will use a default.
117
117
///
118
118
/// [spec]: https://http2.github.io/http2-spec/#SETTINGS_INITIAL_WINDOW_SIZE
119
- pub fn http2_initial_stream_window_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
119
+ pub fn initial_stream_window_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
120
120
if let Some ( sz) = sz. into ( ) {
121
121
self . h2_builder . adaptive_window = false ;
122
122
self . h2_builder . initial_stream_window_size = sz;
@@ -129,7 +129,7 @@ impl<E> Builder<E> {
129
129
/// Passing `None` will do nothing.
130
130
///
131
131
/// If not set, hyper will use a default.
132
- pub fn http2_initial_connection_window_size (
132
+ pub fn initial_connection_window_size (
133
133
& mut self ,
134
134
sz : impl Into < Option < u32 > > ,
135
135
) -> & mut Self {
@@ -143,9 +143,9 @@ impl<E> Builder<E> {
143
143
/// Sets whether to use an adaptive flow control.
144
144
///
145
145
/// Enabling this will override the limits set in
146
- /// `http2_initial_stream_window_size ` and
147
- /// `http2_initial_connection_window_size `.
148
- pub fn http2_adaptive_window ( & mut self , enabled : bool ) -> & mut Self {
146
+ /// `initial_stream_window_size ` and
147
+ /// `initial_connection_window_size `.
148
+ pub fn adaptive_window ( & mut self , enabled : bool ) -> & mut Self {
149
149
use proto:: h2:: SPEC_WINDOW_SIZE ;
150
150
151
151
self . h2_builder . adaptive_window = enabled;
@@ -161,7 +161,7 @@ impl<E> Builder<E> {
161
161
/// Passing `None` will do nothing.
162
162
///
163
163
/// If not set, hyper will use a default.
164
- pub fn http2_max_frame_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
164
+ pub fn max_frame_size ( & mut self , sz : impl Into < Option < u32 > > ) -> & mut Self {
165
165
if let Some ( sz) = sz. into ( ) {
166
166
self . h2_builder . max_frame_size = sz;
167
167
}
@@ -174,7 +174,7 @@ impl<E> Builder<E> {
174
174
/// Default is no limit (`std::u32::MAX`). Passing `None` will do nothing.
175
175
///
176
176
/// [spec]: https://http2.github.io/http2-spec/#SETTINGS_MAX_CONCURRENT_STREAMS
177
- pub fn http2_max_concurrent_streams ( & mut self , max : impl Into < Option < u32 > > ) -> & mut Self {
177
+ pub fn max_concurrent_streams ( & mut self , max : impl Into < Option < u32 > > ) -> & mut Self {
178
178
self . h2_builder . max_concurrent_streams = max. into ( ) ;
179
179
self
180
180
}
@@ -188,7 +188,7 @@ impl<E> Builder<E> {
188
188
///
189
189
/// # Cargo Feature
190
190
///
191
- pub fn http2_keep_alive_interval (
191
+ pub fn keep_alive_interval (
192
192
& mut self ,
193
193
interval : impl Into < Option < Duration > > ,
194
194
) -> & mut Self {
@@ -199,13 +199,13 @@ impl<E> Builder<E> {
199
199
/// Sets a timeout for receiving an acknowledgement of the keep-alive ping.
200
200
///
201
201
/// If the ping is not acknowledged within the timeout, the connection will
202
- /// be closed. Does nothing if `http2_keep_alive_interval ` is disabled.
202
+ /// be closed. Does nothing if `keep_alive_interval ` is disabled.
203
203
///
204
204
/// Default is 20 seconds.
205
205
///
206
206
/// # Cargo Feature
207
207
///
208
- pub fn http2_keep_alive_timeout ( & mut self , timeout : Duration ) -> & mut Self {
208
+ pub fn keep_alive_timeout ( & mut self , timeout : Duration ) -> & mut Self {
209
209
self . h2_builder . keep_alive_timeout = timeout;
210
210
self
211
211
}
@@ -217,7 +217,7 @@ impl<E> Builder<E> {
217
217
/// # Panics
218
218
///
219
219
/// The value must be no larger than `u32::MAX`.
220
- pub fn http2_max_send_buf_size ( & mut self , max : usize ) -> & mut Self {
220
+ pub fn max_send_buf_size ( & mut self , max : usize ) -> & mut Self {
221
221
assert ! ( max <= std:: u32 :: MAX as usize ) ;
222
222
self . h2_builder . max_send_buffer_size = max;
223
223
self
@@ -226,15 +226,15 @@ impl<E> Builder<E> {
226
226
/// Enables the [extended CONNECT protocol].
227
227
///
228
228
/// [extended CONNECT protocol]: https://datatracker.ietf.org/doc/html/rfc8441#section-4
229
- pub fn http2_enable_connect_protocol ( & mut self ) -> & mut Self {
229
+ pub fn enable_connect_protocol ( & mut self ) -> & mut Self {
230
230
self . h2_builder . enable_connect_protocol = true ;
231
231
self
232
232
}
233
233
234
234
/// Sets the max size of received header frames.
235
235
///
236
236
/// Default is currently ~16MB, but may change.
237
- pub fn http2_max_header_list_size ( & mut self , max : u32 ) -> & mut Self {
237
+ pub fn max_header_list_size ( & mut self , max : u32 ) -> & mut Self {
238
238
self . h2_builder . max_header_list_size = max;
239
239
self
240
240
}
0 commit comments