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