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

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

Issue 228453002: Add bufferOutput to HttpServer, HttpResponse and HttpClientRequest. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review fixes. Created 6 years, 8 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') | tests/standalone/io/http_client_connect_test.dart » ('J')
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 db973dd4a906a6c4227fd24bd3d0629f58afce5b..765f583546858723ffd086bdf0b2a0cc4f43cb5c 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -175,6 +175,7 @@ abstract class HttpServer implements Stream<HttpRequest> {
*/
Duration idleTimeout;
+
/**
* Starts listening for HTTP requests on the specified [address] and
* [port].
@@ -1083,6 +1084,16 @@ abstract class HttpResponse implements IOSink {
Duration deadline;
/**
+ * Get or set if the [HttpResponse] should buffer output.
+ *
+ * Default value is `true`.
+ *
+ * __Note__: Disabling buffering of the output can result in very poor
+ * performance, when writing many small chunks.
+ */
+ bool bufferOutput;
+
+ /**
* Returns the response headers.
*
* The response headers can be modified until the response body is
@@ -1564,6 +1575,16 @@ abstract class HttpClientRequest implements IOSink {
int contentLength;
/**
+ * Get or set if the [HttpClientRequest] should buffer output.
+ *
+ * Default value is `true`.
+ *
+ * __Note__: Disabling buffering of the output can result in very poor
+ * performance, when writing many small chunks.
+ */
+ bool bufferOutput;
+
+ /**
* Returns the client request headers.
*
* The client request headers can be modified until the client
@@ -1605,7 +1626,7 @@ abstract class HttpClientRequest implements IOSink {
* the data and be notified when the entire body is received.
*
* new HttpClient().get('localhost', 80, '/file.txt')
- * .then((HttpClientRequeset request) => request.close())
+ * .then((HttpClientRequest request) => request.close())
* .then((HttpClientResponse response) {
* response.transform(UTF8.decoder).listen((contents) {
* // handle data
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | tests/standalone/io/http_client_connect_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698