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

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

Issue 22872012: Remove Encoding-enum from dart:io and add interface in dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo. Created 7 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 | « sdk/lib/io/string_transformer.dart ('k') | tests/lib/convert/encoding_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/websocket_impl.dart
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index 84aa4c90bec967259a75bef900b341d7d9a861ff..f85ddf28829331feb98637ff2befba7a91872e24 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -463,7 +463,7 @@ class _WebSocketOutgoingTransformer extends StreamEventTransformer {
if (message != null) {
if (message is String) {
opcode = _WebSocketOpcode.TEXT;
- data = _encodeString(message);
+ data = UTF8.encode(message);
} else {
if (message is !List<int>) {
throw new ArgumentError(message);
@@ -486,7 +486,7 @@ class _WebSocketOutgoingTransformer extends StreamEventTransformer {
data.add((code >> 8) & 0xFF);
data.add(code & 0xFF);
if (reason != null) {
- data.addAll(_encodeString(reason));
+ data.addAll(UTF8.encode(reason));
}
}
addFrame(_WebSocketOpcode.CLOSE, data, sink);
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | tests/lib/convert/encoding_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698