| 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 'dart:vmservice'; | 11 import 'dart:vmservice'; |
| 12 | 12 |
| 13 part 'resources.dart'; | 13 part 'resources.dart'; |
| 14 part 'server.dart'; | 14 part 'server.dart'; |
| 15 | 15 |
| 16 // The TCP port that the HTTP server listens on. | 16 // The TCP ip/port that the HTTP server listens on. |
| 17 int _port; | 17 int _port; |
| 18 String _ip; |
| 18 | 19 |
| 19 // The VM service instance. | 20 // The VM service instance. |
| 20 VMService service; | 21 VMService service; |
| 21 | 22 |
| 22 main() { | 23 main() { |
| 23 // Get VMService. | 24 // Get VMService. |
| 24 service = new VMService(); | 25 service = new VMService(); |
| 25 // Start HTTP server. | 26 // Start HTTP server. |
| 26 var server = new Server(service, _port); | 27 var server = new Server(service, _ip, _port); |
| 27 server.startServer(); | 28 server.startServer(); |
| 28 } | 29 } |
| OLD | NEW |