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

Unified Diff: runtime/bin/socket_stream.dart

Issue 8933029: Add pipe to input stream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments from ager@ Created 9 years 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 | « runtime/bin/input_stream.dart ('k') | runtime/bin/stream_util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_stream.dart
diff --git a/runtime/bin/socket_stream.dart b/runtime/bin/socket_stream.dart
index c6d617ec4720b16dbab95f5d8662549052b03568..71a353d3158c83bd3a39bfa463080dab2e423efe 100644
--- a/runtime/bin/socket_stream.dart
+++ b/runtime/bin/socket_stream.dart
@@ -36,11 +36,16 @@ class SocketInputStream implements InputStream {
int available() => _socket.available();
+ void pipe(OutputStream output, [bool close = true]) {
+ _pipe(this, output, close: close);
+ }
+
void set dataHandler(void callback()) {
_socket.dataHandler = callback;
}
void set closeHandler(void callback()) {
+ _clientCloseHandler = callback;
_socket.closeHandler = callback;
}
@@ -49,6 +54,7 @@ class SocketInputStream implements InputStream {
}
Socket _socket;
+ Function _clientCloseHandler;
}
« no previous file with comments | « runtime/bin/input_stream.dart ('k') | runtime/bin/stream_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698