| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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:io'; | 6 import 'dart:io'; |
| 6 import 'dart:uri'; | 7 import 'dart:uri'; |
| 7 | 8 |
| 8 void main() { | 9 void main() { |
| 9 var client = new HttpClient(); | 10 var client = new HttpClient(); |
| 10 var server = new HttpServer(); | 11 var server = new HttpServer(); |
| 11 | 12 |
| 12 var count = 0; | 13 var count = 0; |
| 13 server.defaultRequestHandler = (HttpRequest request, HttpResponse response) { | 14 server.defaultRequestHandler = (HttpRequest request, HttpResponse response) { |
| 14 List<int> data = []; | 15 List<int> data = []; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 73 |
| 73 makeRequest(0).then((_) { | 74 makeRequest(0).then((_) { |
| 74 makeRequest(1).then((_) { | 75 makeRequest(1).then((_) { |
| 75 makeRequest(2).then((_) { | 76 makeRequest(2).then((_) { |
| 76 client.shutdown(); | 77 client.shutdown(); |
| 77 server.close(); | 78 server.close(); |
| 78 }); | 79 }); |
| 79 }); | 80 }); |
| 80 }); | 81 }); |
| 81 } | 82 } |
| OLD | NEW |