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

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

Issue 1398293002: Move the wire protocol support into the public API (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add missed files Created 5 years, 2 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: 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 44d917e8d60dae422a5c6a337c162ffaf15b1e4b..ce6235d01bfb3f5716b4266c96ebd0b88834002e 100644
--- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
@@ -8,9 +8,9 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/channel/channel.dart';
-import 'package:analysis_server/src/protocol.dart';
import 'package:analyzer/instrumentation/instrumentation.dart';
/**
@@ -105,11 +105,9 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
@override
void listen(void onRequest(Request request),
{Function onError, void onDone()}) {
- _input
- .transform(const Utf8Decoder())
- .transform(new LineSplitter())
- .listen((String data) => _readRequest(data, onRequest),
- onError: onError, onDone: () {
+ _input.transform(const Utf8Decoder()).transform(new LineSplitter()).listen(
+ (String data) => _readRequest(data, onRequest),
+ onError: onError, onDone: () {
close();
onDone();
});

Powered by Google App Engine
This is Rietveld 408576698