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_io; | 5 library vmservice_io; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 import 'dart:isolate'; | 10 import 'dart:isolate'; |
11 import 'vmservice.dart'; | 11 import 'dart:vmservice'; |
12 | 12 |
| 13 part 'resources.dart'; |
13 part 'server.dart'; | 14 part 'server.dart'; |
14 | 15 |
15 // The TCP port that the HTTP server listens on. | 16 // The TCP port that the HTTP server listens on. |
16 int _port; | 17 int _port; |
17 | 18 |
18 // The receive port that isolate startup / shutdown messages are delivered on. | 19 // The VM service instance. |
19 RawReceivePort _receivePort; | 20 VMService service; |
20 | 21 |
21 main() { | 22 main() { |
22 // Create VmService. | 23 // Get VMService. |
23 var service = new VMService(); | 24 service = new VMService(); |
24 _receivePort = service.receivePort; | |
25 // Start HTTP server. | 25 // Start HTTP server. |
26 var server = new Server(service, _port); | 26 var server = new Server(service, _port); |
27 server.startServer(); | 27 server.startServer(); |
28 } | 28 } |
OLD | NEW |