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

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

Issue 11411121: Generate an error for active connections when the HTTP client is shutdown (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed long line Created 8 years, 1 month 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 | « pkg/pkg.status ('k') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * HTTP status codes. 6 * HTTP status codes.
7 */ 7 */
8 abstract class HttpStatus { 8 abstract class HttpStatus {
9 static const int CONTINUE = 100; 9 static const int CONTINUE = 100;
10 static const int SWITCHING_PROTOCOLS = 101; 10 static const int SWITCHING_PROTOCOLS = 101;
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 * for using the proxy server [:host:] on port [:port:]. 823 * for using the proxy server [:host:] on port [:port:].
824 * 824 *
825 * A configuration can contain several configuration elements 825 * A configuration can contain several configuration elements
826 * separated by semicolons, e.g. 826 * separated by semicolons, e.g.
827 * 827 *
828 * "PROXY host:port; PROXY host2:port2; DIRECT" 828 * "PROXY host:port; PROXY host2:port2; DIRECT"
829 */ 829 */
830 set findProxy(String f(Uri url)); 830 set findProxy(String f(Uri url));
831 831
832 /** 832 /**
833 * Shutdown the HTTP client releasing all resources. 833 * Shutdown the HTTP client. If [force] is [:true:] any active
834 * connections will be terminated to immediately release all
835 * resources. If [force] is [:false:] the [:HttpClient:] will be
Mads Ager (google) 2012/11/23 07:25:38 Could we add a comment to make it explicit what ha
Søren Gjesse 2012/11/23 09:08:47 It's already there, "If [force] is [:true:]..." ab
Søren Gjesse 2012/11/23 09:31:16 Added more information on forced shutdown.
836 * kept alive until all active connections are done.
834 */ 837 */
835 void shutdown(); 838 void shutdown({bool force: false});
836 } 839 }
837 840
838 841
839 /** 842 /**
840 * A [HttpClientConnection] is returned by all [HttpClient] methods 843 * A [HttpClientConnection] is returned by all [HttpClient] methods
841 * that initiate a connection to an HTTP server. The handlers will be 844 * that initiate a connection to an HTTP server. The handlers will be
842 * called as the connection state progresses. 845 * called as the connection state progresses.
843 * 846 *
844 * The setting of all handlers is optional. If [onRequest] is not set 847 * The setting of all handlers is optional. If [onRequest] is not set
845 * the request will be send without any additional headers and an 848 * the request will be send without any additional headers and an
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 class RedirectLimitExceededException extends RedirectException { 1088 class RedirectLimitExceededException extends RedirectException {
1086 const RedirectLimitExceededException(List<RedirectInfo> redirects) 1089 const RedirectLimitExceededException(List<RedirectInfo> redirects)
1087 : super("Redirect limit exceeded", redirects); 1090 : super("Redirect limit exceeded", redirects);
1088 } 1091 }
1089 1092
1090 1093
1091 class RedirectLoopException extends RedirectException { 1094 class RedirectLoopException extends RedirectException {
1092 const RedirectLoopException(List<RedirectInfo> redirects) 1095 const RedirectLoopException(List<RedirectInfo> redirects)
1093 : super("Redirect loop detected", redirects); 1096 : super("Redirect loop detected", redirects);
1094 } 1097 }
OLDNEW
« no previous file with comments | « pkg/pkg.status ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698