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

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

Issue 2260073002: RFC: Sending pre-encoded text over a web socket. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: error message Created 4 years, 4 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 | « runtime/bin/vmservice/server.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/websocket.dart
diff --git a/sdk/lib/io/websocket.dart b/sdk/lib/io/websocket.dart
index df6c8cf523390d47e14b0986b4cd27ff3815a016..42c3562e205883c5eeedc8fa27a18ab5a9c53c9f 100644
--- a/sdk/lib/io/websocket.dart
+++ b/sdk/lib/io/websocket.dart
@@ -402,6 +402,14 @@ abstract class WebSocket
* must be either `String`s, or `List<int>`s holding bytes.
*/
Future addStream(Stream stream);
+
+ /**
+ * Sends a text message with the text represented by [bytes].
+ *
+ * The [bytes] should be valid UTF-8 encoded Unicode characters. If they are
+ * not, the receiving end will close the connection.
+ */
+ void addUtf8Text(List<int> bytes);
}
class WebSocketException implements IOException {
« no previous file with comments | « runtime/bin/vmservice/server.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698