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

Unified Diff: pkg/analysis_server/lib/src/analysis_manager.dart

Issue 176873015: update client to use channel rather than socket (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: use common json encoder Created 6 years, 10 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 | « no previous file | pkg/analysis_server/lib/src/channel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_manager.dart
diff --git a/pkg/analysis_server/lib/src/analysis_manager.dart b/pkg/analysis_server/lib/src/analysis_manager.dart
index cb001e4c41740c31903371b39ad697f97b979946..0f394e06930fc92e684eeb21e17f0392b348c1fb 100644
--- a/pkg/analysis_server/lib/src/analysis_manager.dart
+++ b/pkg/analysis_server/lib/src/analysis_manager.dart
@@ -24,9 +24,9 @@ class AnalysisManager {
Process process;
/**
- * The socket used to communicate with the analysis server.
+ * The channel used to communicate with the analysis server.
*/
- WebSocket socket;
+ CommunicationChannel channel;
/**
* Launch analysis server in a separate process
@@ -100,7 +100,7 @@ class AnalysisManager {
return WebSocket.connect(serverUrl)
.catchError(onError)
.then((WebSocket socket) {
- this.socket = socket;
+ this.channel = new WebSocketChannel(socket);
return this;
});
} catch (error) {
@@ -119,10 +119,8 @@ class AnalysisManager {
if (process == null) {
return new Future.value(false);
}
- var shutdownRequest = {
- Request.ID : '0',
- Request.METHOD : ServerDomainHandler.SHUTDOWN_METHOD };
- socket.add(JSON.encoder.convert(shutdownRequest));
+ var request = new Request('0', ServerDomainHandler.SHUTDOWN_METHOD);
+ channel.sendRequest(request);
return process.exitCode
.timeout(new Duration(seconds: 10))
.catchError((error) {
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/channel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698