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

Unified Diff: runtime/bin/vmservice/server.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 | « CHANGELOG.md ('k') | sdk/lib/io/websocket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/server.dart
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart
index c032c2613f95e15bae71b5f625a29c0281e0f530..43186d13e181c74e57f13b941af17e88c53393e1 100644
--- a/runtime/bin/vmservice/server.dart
+++ b/runtime/bin/vmservice/server.dart
@@ -57,10 +57,7 @@ class WebSocketClient extends Client {
// String message as external Uint8List.
assert(result is List);
Uint8List cstring = result[0];
- // TODO(rmacnak): cstring may be large. Add a way to pass an encoded
- // string to a web socket that will be sent as a text message to avoid
- // the space overhead of converting cstring to a Dart string.
- socket.add(UTF8.decode(cstring));
+ socket.addUtf8Text(cstring);
}
} catch (_) {
print("Ignoring error posting over WebSocket.");
« no previous file with comments | « CHANGELOG.md ('k') | sdk/lib/io/websocket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698