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

Unified Diff: runtime/bin/http_parser.dart

Issue 10262031: Add a web socket client (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/http_impl.dart ('k') | runtime/bin/socket_stream_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http_parser.dart
diff --git a/runtime/bin/http_parser.dart b/runtime/bin/http_parser.dart
index ee3dcc83662255818424cebb8cab3d5d37cc995b..66e0b427e24121e6bca61f84dea0fbd4f49e9511 100644
--- a/runtime/bin/http_parser.dart
+++ b/runtime/bin/http_parser.dart
@@ -419,6 +419,8 @@ class _HttpParser {
_expect(byte, _CharCode.LF);
if (_connectionUpgrade) {
_state = _State.UPGRADED;
+ _unparsedData =
+ buffer.getRange(index + 1, count - (index + 1 - offset));
if (headersComplete != null) headersComplete();
} else {
if (headersComplete != null) headersComplete();
@@ -606,6 +608,8 @@ class _HttpParser {
bool get isIdle() => _state == _State.START;
+ List<int> get unparsedData() => _unparsedData;
+
void _bodyEnd() {
if (dataEnd != null) {
dataEnd(_messageType == _MessageType.RESPONSE && !_persistentConnection);
@@ -695,6 +699,7 @@ class _HttpParser {
String _responseToMethod; // Indicates the method used for the request.
int _remainingContent;
+ List<int> _unparsedData; // Unparsed data after connection upgrade.
// Callbacks.
Function requestStart;
Function responseStart;
« no previous file with comments | « runtime/bin/http_impl.dart ('k') | runtime/bin/socket_stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698