| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 var futures = []; | 69 var futures = []; |
| 70 for (var host in addresses) { | 70 for (var host in addresses) { |
| 71 futures.add(testBindShared(host, false)); | 71 futures.add(testBindShared(host, false)); |
| 72 futures.add(testBindShared(host, true)); | 72 futures.add(testBindShared(host, true)); |
| 73 } | 73 } |
| 74 Future.wait(futures).then((_) => asyncEnd()); | 74 Future.wait(futures).then((_) => asyncEnd()); |
| 75 }); | 75 }); |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool supportsIPV6() async { | 78 Future<bool> supportsIPV6() async { |
| 79 try { | 79 try { |
| 80 var socket = await ServerSocket.bind('::1', 0); | 80 var socket = await ServerSocket.bind('::1', 0); |
| 81 await socket.close(); | 81 await socket.close(); |
| 82 return true; | 82 return true; |
| 83 } catch (e) { | 83 } catch (e) { |
| 84 print(e); | 84 print(e); |
| 85 return false; | 85 return false; |
| 86 } | 86 } |
| 87 } | 87 } |
| OLD | NEW |