| Index: pkg/analysis_server/lib/src/channel/web_socket_channel.dart
|
| diff --git a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
|
| index 21835da125796e3964894128807b1e9c3c58585f..c661bfb90b51ae359c58ff808ef78889210fdfaf 100644
|
| --- a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
|
| +++ b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
|
| @@ -85,12 +85,18 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
|
|
|
| @override
|
| void sendNotification(Notification notification) {
|
| - socket.add(JSON.encode(notification.toJson()));
|
| + ServerCommunicationChannel.ToJson.start();
|
| + String jsonEncoding = JSON.encode(notification.toJson());
|
| + ServerCommunicationChannel.ToJson.stop();
|
| + socket.add(jsonEncoding);
|
| }
|
|
|
| @override
|
| void sendResponse(Response response) {
|
| - socket.add(JSON.encode(response.toJson()));
|
| + ServerCommunicationChannel.ToJson.start();
|
| + String jsonEncoding = JSON.encode(response.toJson());
|
| + ServerCommunicationChannel.ToJson.stop();
|
| + socket.add(jsonEncoding);
|
| }
|
|
|
| /**
|
| @@ -101,7 +107,9 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
|
| if (data is String) {
|
| // Parse the string as a JSON descriptor and process the resulting
|
| // structure as a request.
|
| + ServerCommunicationChannel.FromJson.start();
|
| Request request = new Request.fromString(data);
|
| + ServerCommunicationChannel.FromJson.stop();
|
| if (request == null) {
|
| sendResponse(new Response.invalidRequestFormat());
|
| return;
|
|
|