Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: sdk/lib/io/http_parser.dart

Issue 12380059: Fix type warnings and remove unimplemented stuff from HttpClient interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Global constants. 7 // Global constants.
8 class _Const { 8 class _Const {
9 // Bytes for "HTTP". 9 // Bytes for "HTTP".
10 static const HTTP = const [72, 84, 84, 80]; 10 static const HTTP = const [72, 84, 84, 80];
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 202 }
203 203
204 _HttpParser._(this._requestParser) { 204 _HttpParser._(this._requestParser) {
205 _controller = new StreamController<_HttpIncoming>( 205 _controller = new StreamController<_HttpIncoming>(
206 onSubscriptionStateChange: _updateParsePauseState, 206 onSubscriptionStateChange: _updateParsePauseState,
207 onPauseStateChange: _updateParsePauseState); 207 onPauseStateChange: _updateParsePauseState);
208 _reset(); 208 _reset();
209 } 209 }
210 210
211 211
212 StreamSubscription<_HttpIncoming> listen(void onData(List<int> event), 212 StreamSubscription<_HttpIncoming> listen(void onData(_HttpIncoming event),
213 {void onError(AsyncError error), 213 {void onError(AsyncError error),
214 void onDone(), 214 void onDone(),
215 bool unsubscribeOnError}) { 215 bool unsubscribeOnError}) {
216 return _controller.stream.listen(onData, 216 return _controller.stream.listen(onData,
217 onError: onError, 217 onError: onError,
218 onDone: onDone, 218 onDone: onDone,
219 unsubscribeOnError: unsubscribeOnError); 219 unsubscribeOnError: unsubscribeOnError);
220 } 220 }
221 221
222 Future<_HttpParser> consume(Stream<List<int>> stream) { 222 Future<_HttpParser> consume(Stream<List<int>> stream) {
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 StreamController<_HttpIncoming> _controller; 956 StreamController<_HttpIncoming> _controller;
957 StreamController<List<int>> _bodyController; 957 StreamController<List<int>> _bodyController;
958 } 958 }
959 959
960 960
961 class HttpParserException implements Exception { 961 class HttpParserException implements Exception {
962 const HttpParserException([String this.message = ""]); 962 const HttpParserException([String this.message = ""]);
963 String toString() => "HttpParserException: $message"; 963 String toString() => "HttpParserException: $message";
964 final String message; 964 final String message;
965 } 965 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698