Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: sdk/lib/io/http.dart

Issue 22839013: Add HttpServer.idleTimeout for closing idle keep-alive connections. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * HTTP status codes. 8 * HTTP status codes.
9 */ 9 */
10 abstract class HttpStatus { 10 abstract class HttpStatus {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 /** 198 /**
199 * Set and get the default value of the `Server` header for all responses 199 * Set and get the default value of the `Server` header for all responses
200 * generated by this [HttpServer]. The default value is 200 * generated by this [HttpServer]. The default value is
201 * `Dart/<version> (dart:io)`. 201 * `Dart/<version> (dart:io)`.
202 * 202 *
203 * If the serverHeader is set to `null`, no default `Server` header will be 203 * If the serverHeader is set to `null`, no default `Server` header will be
204 * added to each response. 204 * added to each response.
205 */ 205 */
206 String serverHeader; 206 String serverHeader;
207
208 /**
209 * Get or set the timeout used for idle keep-alive connections. If no further
210 * request is seen within [idleTimeout] after the previous request was
211 * completed, the connection is droped.
212 *
213 * Default is 120 seconds.
214 *
215 * To disable, set [idleTimeout] to `null`.
216 */
217 Duration idleTimeout;
207 } 218 }
208 219
209 220
210 /** 221 /**
211 * Summary statistics about an [HttpServer]s current socket connections. 222 * Summary statistics about an [HttpServer]s current socket connections.
212 */ 223 */
213 class HttpConnectionsInfo { 224 class HttpConnectionsInfo {
214 /** 225 /**
215 * Total number of socket connections. 226 * Total number of socket connections.
216 */ 227 */
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 final String message; 1522 final String message;
1512 final List<RedirectInfo> redirects; 1523 final List<RedirectInfo> redirects;
1513 1524
1514 const RedirectException(String this.message, 1525 const RedirectException(String this.message,
1515 List<RedirectInfo> this.redirects); 1526 List<RedirectInfo> this.redirects);
1516 1527
1517 String toString() => "RedirectException: $message"; 1528 String toString() => "RedirectException: $message";
1518 1529
1519 Uri get uri => redirects.last.location; 1530 Uri get uri => redirects.last.location;
1520 } 1531 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698