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

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

Issue 176893003: Only use one timer to handle HttpServer::idleTimeout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 */ 91 */
92 String serverHeader; 92 String serverHeader;
93 93
94 /** 94 /**
95 * Get or set the timeout used for idle keep-alive connections. If no further 95 * Get or set the timeout used for idle keep-alive connections. If no further
96 * request is seen within [idleTimeout] after the previous request was 96 * request is seen within [idleTimeout] after the previous request was
97 * completed, the connection is dropped. 97 * completed, the connection is dropped.
98 * 98 *
99 * Default is 120 seconds. 99 * Default is 120 seconds.
100 * 100 *
101 * Note that it may take up to `2 * idleTimeout` before a idle connection is
102 * aborted.
103 *
101 * To disable, set [idleTimeout] to `null`. 104 * To disable, set [idleTimeout] to `null`.
102 */ 105 */
103 Duration idleTimeout; 106 Duration idleTimeout;
104 107
105 /** 108 /**
106 * Starts listening for HTTP requests on the specified [address] and 109 * Starts listening for HTTP requests on the specified [address] and
107 * [port]. 110 * [port].
108 * 111 *
109 * The [address] can either be a [String] or an 112 * The [address] can either be a [String] or an
110 * [InternetAddress]. If [address] is a [String], [bind] will 113 * [InternetAddress]. If [address] is a [String], [bind] will
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 class RedirectException implements HttpException { 1614 class RedirectException implements HttpException {
1612 final String message; 1615 final String message;
1613 final List<RedirectInfo> redirects; 1616 final List<RedirectInfo> redirects;
1614 1617
1615 const RedirectException(this.message, this.redirects); 1618 const RedirectException(this.message, this.redirects);
1616 1619
1617 String toString() => "RedirectException: $message"; 1620 String toString() => "RedirectException: $message";
1618 1621
1619 Uri get uri => redirects.last.location; 1622 Uri get uri => redirects.last.location;
1620 } 1623 }
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