| 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 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 class _HttpIncoming extends Stream<List<int>> { | 7 class _HttpIncoming extends Stream<List<int>> { |
| 8 final int _transferLength; | 8 final int _transferLength; |
| 9 final Completer _dataCompleter = new Completer(); | 9 final Completer _dataCompleter = new Completer(); |
| 10 Stream<List<int>> _stream; | 10 Stream<List<int>> _stream; |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 "Content size below specified contentLength. " | 905 "Content size below specified contentLength. " |
| 906 " $_bytesWritten bytes written while expected " | 906 " $_bytesWritten bytes written while expected " |
| 907 "$expectedContentLength."))); | 907 "$expectedContentLength."))); |
| 908 } | 908 } |
| 909 sink.close(); | 909 sink.close(); |
| 910 } | 910 } |
| 911 } | 911 } |
| 912 | 912 |
| 913 | 913 |
| 914 // Extends StreamConsumer as this is an internal type, only used to pipe to. | 914 // Extends StreamConsumer as this is an internal type, only used to pipe to. |
| 915 class _HttpOutgoing implements StreamConsumer<List<int>, dynamic> { | 915 class _HttpOutgoing implements StreamConsumer<List<int>> { |
| 916 Function _onStream; | 916 Function _onStream; |
| 917 final Completer _consumeCompleter = new Completer(); | 917 final Completer _consumeCompleter = new Completer(); |
| 918 | 918 |
| 919 Future onStream(Future callback(Stream<List<int>> stream)) { | 919 Future onStream(Future callback(Stream<List<int>> stream)) { |
| 920 _onStream = callback; | 920 _onStream = callback; |
| 921 return _consumeCompleter.future; | 921 return _consumeCompleter.future; |
| 922 } | 922 } |
| 923 | 923 |
| 924 Future consume(Stream<List<int>> stream) { | 924 Future consume(Stream<List<int>> stream) { |
| 925 _onStream(stream) | 925 _onStream(stream) |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1825 | 1825 |
| 1826 | 1826 |
| 1827 class _RedirectInfo implements RedirectInfo { | 1827 class _RedirectInfo implements RedirectInfo { |
| 1828 const _RedirectInfo(int this.statusCode, | 1828 const _RedirectInfo(int this.statusCode, |
| 1829 String this.method, | 1829 String this.method, |
| 1830 Uri this.location); | 1830 Uri this.location); |
| 1831 final int statusCode; | 1831 final int statusCode; |
| 1832 final String method; | 1832 final String method; |
| 1833 final Uri location; | 1833 final Uri location; |
| 1834 } | 1834 } |
| OLD | NEW |