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

Unified Diff: sdk/lib/io/http.dart

Issue 19668013: Add 'deadline' to HttpResponse, making it possible to give a max duration for the liveness of the r… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up timers. Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http.dart
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index 5d316eb7890c5356330b7c30a41fb894f6e9cf5e..6764ab2602e7903ffd74715e7fd910b4f441ca76 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -820,6 +820,18 @@ abstract class HttpResponse implements IOSink {
bool persistentConnection;
/**
+ * Set and get the [deadline] for the response. The deadline is timed from the
+ * time it's set. Setting a new deadline will override any previous deadline.
+ * When a deadline is exceeded, the response will be closed and any further
+ * data ignored.
+ *
+ * To disable a deadline, set the [deadline] to `null`.
+ *
+ * The [deadline] is `null` by default.
+ */
+ Duration deadline;
+
+ /**
* Returns the response headers.
*/
HttpHeaders get headers;
« 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