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

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

Issue 14208007: Improve WebSocket interface by making it implement StreamSink. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: sdk/lib/io/websocket.dart
diff --git a/sdk/lib/io/websocket.dart b/sdk/lib/io/websocket.dart
index 65249f13ad9a449ad9067f34cf34f9a515b34cde..088002037c28dae066ca54d3369ea516b8f653fe 100644
--- a/sdk/lib/io/websocket.dart
+++ b/sdk/lib/io/websocket.dart
@@ -80,7 +80,7 @@ abstract class WebSocketTransformer
* messages received. A text message will be of type [:String:] and a
* binary message will be of type [:List<int>:].
*/
-abstract class WebSocket implements Stream {
+abstract class WebSocket implements Stream, StreamSink {
/**
* Possible states of the connection.
*/
@@ -133,13 +133,13 @@ abstract class WebSocket implements Stream {
/**
* Closes the web socket connection.
Søren Gjesse 2013/04/16 12:41:31 Please add documentation on the default values. It
Anders Johnsen 2013/04/16 13:46:22 Done.
*/
- void close([int code, String reason]);
+ Future close([int code, String reason]);
/**
* Sends data on the web socket connection. The data in [data] must
* be either a [:String:], or a [:List<int>:] holding bytes.
*/
- void send(data);
+ void add(data);
Søren Gjesse 2013/04/16 12:41:31 We should add addStream with some dartdoc here as
Anders Johnsen 2013/04/16 13:46:22 addError will more or less just close the connecti
}

Powered by Google App Engine
This is Rietveld 408576698