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

Unified Diff: runtime/bin/http_impl.dart

Issue 11301034: Add flush to HTTP output streams (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | tests/standalone/io/http_advanced_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http_impl.dart
diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
index b92b4b81517aacb527c0be555827263a6aa27b46..da64e52f5467d561e84aa70400904e60e638a497 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -1034,6 +1034,10 @@ class _HttpResponse extends _HttpRequestResponseBase implements HttpResponse {
return _writeList(buffer, offset, len);
}
+ void _streamFlush() {
+ _httpConnection._flush();
+ }
+
void _streamClose() {
_responseEnd();
}
@@ -1197,10 +1201,6 @@ class _HttpInputStream extends _BaseDataInputStream implements InputStream {
return result;
}
- void flush() {
- // Nothing to do on a HTTP output stream.
- }
-
void _close() {
// TODO(sgjesse): Handle this.
}
@@ -1224,6 +1224,10 @@ class _HttpOutputStream extends _BaseOutputStream implements OutputStream {
return _requestOrResponse._streamWriteFrom(buffer, offset, len);
}
+ void flush() {
+ _requestOrResponse._streamFlush();
+ }
+
void close() {
_requestOrResponse._streamClose();
}
@@ -1279,6 +1283,10 @@ class _HttpConnectionBase {
}
}
+ bool _flush() {
+ _socket.outputStream.flush();
+ }
+
bool _close() {
_closing = true;
_socket.outputStream.close();
@@ -1647,6 +1655,10 @@ class _HttpClientRequest
return _writeList(buffer, offset, len);
}
+ void _streamFlush() {
+ _httpConnection._flush();
+ }
+
void _streamClose() {
_ensureHeadersSent();
_state = DONE;
« no previous file with comments | « no previous file | tests/standalone/io/http_advanced_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698