| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library vmservice; | 5 library vmservice; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:isolate'; | 9 import 'dart:isolate'; |
| 10 import 'dart:typed_data'; | 10 import 'dart:typed_data'; |
| 11 | 11 |
| 12 part 'client.dart'; | 12 part 'client.dart'; |
| 13 part 'constants.dart'; | 13 part 'constants.dart'; |
| 14 part 'resources.dart'; | |
| 15 part 'running_isolate.dart'; | 14 part 'running_isolate.dart'; |
| 16 part 'running_isolates.dart'; | 15 part 'running_isolates.dart'; |
| 17 part 'message.dart'; | 16 part 'message.dart'; |
| 18 part 'message_router.dart'; | 17 part 'message_router.dart'; |
| 19 | 18 |
| 20 class VMService extends MessageRouter { | 19 class VMService extends MessageRouter { |
| 21 static VMService _instance; | 20 static VMService _instance; |
| 22 /// Collection of currently connected clients. | 21 /// Collection of currently connected clients. |
| 23 final Set<Client> clients = new Set<Client>(); | 22 final Set<Client> clients = new Set<Client>(); |
| 24 /// Collection of currently running isolates. | 23 /// Collection of currently running isolates. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 return message.response; | 79 return message.response; |
| 81 } | 80 } |
| 82 if ((message.path.length == 1) && (message.path[0] == 'clients')) { | 81 if ((message.path.length == 1) && (message.path[0] == 'clients')) { |
| 83 _clientCollection(message); | 82 _clientCollection(message); |
| 84 return message.response; | 83 return message.response; |
| 85 } | 84 } |
| 86 return runningIsolates.route(message); | 85 return runningIsolates.route(message); |
| 87 } | 86 } |
| 88 } | 87 } |
| 89 | 88 |
| 89 RawReceivePort boot() { |
| 90 // Boot the VMService. |
| 91 // Return the port we expect isolate startup and shutdown messages on. |
| 92 return new VMService().receivePort; |
| 93 } |
| 94 |
| 90 void sendServiceMessage(SendPort sp, Object m) | 95 void sendServiceMessage(SendPort sp, Object m) |
| 91 native "VMService_SendServiceMessage"; | 96 native "VMService_SendServiceMessage"; |
| OLD | NEW |