| // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| library http_lanuch_main; | |
| import 'dart:isolate'; | |
| import 'dart:io'; | |
| main() { | |
| int port = int.parse(new Options().arguments[0]); | |
| SendPort spawnedPort = | |
| spawnUri('http://127.0.0.1:$port/http_isolate_main.dart'); | |
| spawnedPort.call('hello').then((response) { | |
| print(response); | |
| }); | |
| } | |