| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart_controller_service_isolate; | 5 part of sky_shell_dart_controller_service_isolate; |
| 6 | 6 |
| 7 class WebSocketClient extends Client { | 7 class WebSocketClient extends Client { |
| 8 static const int PARSE_ERROR_CODE = 4000; | 8 static const int PARSE_ERROR_CODE = 4000; |
| 9 static const int BINARY_MESSAGE_ERROR_CODE = 4001; | 9 static const int BINARY_MESSAGE_ERROR_CODE = 4001; |
| 10 static const int NOT_MAP_ERROR_CODE = 4002; | 10 static const int NOT_MAP_ERROR_CODE = 4002; |
| 11 final WebSocket socket; | 11 final WebSocket socket; |
| 12 | 12 |
| 13 WebSocketClient(this.socket, VMService service) : super(service) { | 13 WebSocketClient(this.socket, VMService service) : super(service) { |
| 14 socket.listen((message) => onWebSocketMessage(message)); | 14 socket.listen((message) => onWebSocketMessage(message)); |
| 15 socket.done.then((_) => close()); | 15 socket.done.then((_) => close()); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 print('Could not shutdown Observatory HTTP server:\n$e\n$st\n'); | 216 print('Could not shutdown Observatory HTTP server:\n$e\n$st\n'); |
| 217 _notifyServerState("", 0); | 217 _notifyServerState("", 0); |
| 218 return this; | 218 return this; |
| 219 }); | 219 }); |
| 220 } | 220 } |
| 221 | 221 |
| 222 } | 222 } |
| 223 | 223 |
| 224 _notifyServerState(String ip, int port) | 224 _notifyServerState(String ip, int port) |
| 225 native "ServiceIsolate_NotifyServerState"; | 225 native "ServiceIsolate_NotifyServerState"; |
| OLD | NEW |