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

Unified Diff: pkg/analysis_server/lib/src/channel/byte_stream_channel.dart

Issue 757013002: Use write instead of writeln for client/server communication. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
diff --git a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
index b10aa1b3c62e1ae979c6fe1677be05ef1e4c8118..d1dfed4451810f1dd57da67ab8b97e18ef5e7722 100644
--- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
@@ -49,7 +49,7 @@ class ByteStreamClientChannel implements ClientCommunicationChannel {
@override
Future<Response> sendRequest(Request request) {
String id = request.id;
- output.writeln(JSON.encode(request.toJson()));
+ output.write(JSON.encode(request.toJson()) + '\n');
return responseStream.firstWhere((Response response) => response.id == id);
}
}
@@ -110,7 +110,7 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
ServerCommunicationChannel.ToJson.start();
String jsonEncoding = JSON.encode(notification.toJson());
ServerCommunicationChannel.ToJson.stop();
- output.writeln(jsonEncoding);
+ output.write(jsonEncoding + '\n');
}
@override
@@ -123,7 +123,7 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
ServerCommunicationChannel.ToJson.start();
String jsonEncoding = JSON.encode(response.toJson());
ServerCommunicationChannel.ToJson.stop();
- output.writeln(jsonEncoding);
+ output.write(jsonEncoding + '\n');
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698