@@ -116,7 +116,7 @@ impl<E> Builder<E> {
116116 /// If not set, hyper will use a default.
117117 ///
118118 /// [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 {
120120 if let Some ( sz) = sz. into ( ) {
121121 self . h2_builder . adaptive_window = false ;
122122 self . h2_builder . initial_stream_window_size = sz;
@@ -129,7 +129,7 @@ impl<E> Builder<E> {
129129 /// Passing `None` will do nothing.
130130 ///
131131 /// If not set, hyper will use a default.
132- pub fn http2_initial_connection_window_size (
132+ pub fn initial_connection_window_size (
133133 & mut self ,
134134 sz : impl Into < Option < u32 > > ,
135135 ) -> & mut Self {
@@ -143,9 +143,9 @@ impl<E> Builder<E> {
143143 /// Sets whether to use an adaptive flow control.
144144 ///
145145 /// 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 {
149149 use proto:: h2:: SPEC_WINDOW_SIZE ;
150150
151151 self . h2_builder . adaptive_window = enabled;
@@ -161,7 +161,7 @@ impl<E> Builder<E> {
161161 /// Passing `None` will do nothing.
162162 ///
163163 /// 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 {
165165 if let Some ( sz) = sz. into ( ) {
166166 self . h2_builder . max_frame_size = sz;
167167 }
@@ -174,7 +174,7 @@ impl<E> Builder<E> {
174174 /// Default is no limit (`std::u32::MAX`). Passing `None` will do nothing.
175175 ///
176176 /// [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 {
178178 self . h2_builder . max_concurrent_streams = max. into ( ) ;
179179 self
180180 }
@@ -188,7 +188,7 @@ impl<E> Builder<E> {
188188 ///
189189 /// # Cargo Feature
190190 ///
191- pub fn http2_keep_alive_interval (
191+ pub fn keep_alive_interval (
192192 & mut self ,
193193 interval : impl Into < Option < Duration > > ,
194194 ) -> & mut Self {
@@ -199,13 +199,13 @@ impl<E> Builder<E> {
199199 /// Sets a timeout for receiving an acknowledgement of the keep-alive ping.
200200 ///
201201 /// 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.
203203 ///
204204 /// Default is 20 seconds.
205205 ///
206206 /// # Cargo Feature
207207 ///
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 {
209209 self . h2_builder . keep_alive_timeout = timeout;
210210 self
211211 }
@@ -217,7 +217,7 @@ impl<E> Builder<E> {
217217 /// # Panics
218218 ///
219219 /// 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 {
221221 assert ! ( max <= std:: u32 :: MAX as usize ) ;
222222 self . h2_builder . max_send_buffer_size = max;
223223 self
@@ -226,15 +226,15 @@ impl<E> Builder<E> {
226226 /// Enables the [extended CONNECT protocol].
227227 ///
228228 /// [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 {
230230 self . h2_builder . enable_connect_protocol = true ;
231231 self
232232 }
233233
234234 /// Sets the max size of received header frames.
235235 ///
236236 /// 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 {
238238 self . h2_builder . max_header_list_size = max;
239239 self
240240 }
0 commit comments