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

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

Issue 13680002: StreamConsumer has an addStream and a close functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update comments. Created 7 years, 8 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') | sdk/lib/io/io_sink.dart » ('j') | 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 _socketSubscription = stream.listen( 235 _socketSubscription = stream.listen(
236 _onData, 236 _onData,
237 onError: _onError, 237 onError: _onError,
238 onDone: () { 238 onDone: () {
239 _onDone(); 239 _onDone();
240 completer.complete(this); 240 completer.complete(this);
241 }); 241 });
242 return completer.future; 242 return completer.future;
243 } 243 }
244 244
245 Future<_HttpParser> addStream(Stream<List<int>> stream) {
246 throw new UnimplementedError("_HttpParser.addStream");
247 }
248
249 Future<_HttpParser> close() {
250 throw new UnimplementedError("_HttpParser.close");
251 }
252
245 // From RFC 2616. 253 // From RFC 2616.
246 // generic-message = start-line 254 // generic-message = start-line
247 // *(message-header CRLF) 255 // *(message-header CRLF)
248 // CRLF 256 // CRLF
249 // [ message-body ] 257 // [ message-body ]
250 // start-line = Request-Line | Status-Line 258 // start-line = Request-Line | Status-Line
251 // Request-Line = Method SP Request-URI SP HTTP-Version CRLF 259 // Request-Line = Method SP Request-URI SP HTTP-Version CRLF
252 // Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF 260 // Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
253 // message-header = field-name ":" [ field-value ] 261 // message-header = field-name ":" [ field-value ]
254 void _parse() { 262 void _parse() {
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 StreamController<_HttpIncoming> _controller; 979 StreamController<_HttpIncoming> _controller;
972 StreamController<List<int>> _bodyController; 980 StreamController<List<int>> _bodyController;
973 } 981 }
974 982
975 983
976 class HttpParserException implements Exception { 984 class HttpParserException implements Exception {
977 const HttpParserException([String this.message = ""]); 985 const HttpParserException([String this.message = ""]);
978 String toString() => "HttpParserException: $message"; 986 String toString() => "HttpParserException: $message";
979 final String message; 987 final String message;
980 } 988 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/io_sink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698