| Index: sdk/lib/io/websocket_impl.dart
|
| diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
|
| index c660740f0f7543b25769d409d9e1e9c70705919d..65c4ca48f26b9907d7d47b1b469d6e41e53fc815 100644
|
| --- a/sdk/lib/io/websocket_impl.dart
|
| +++ b/sdk/lib/io/websocket_impl.dart
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @@ -62,9 +62,9 @@ class _WebSocketProtocolProcessor {
|
| /**
|
| * Process data received from the underlying communication channel.
|
| */
|
| - void update(List<int> buffer, int offset, int count) {
|
| - int index = offset;
|
| - int lastIndex = offset + count;
|
| + void update(List<int> buffer) {
|
| + int index = 0;
|
| + int lastIndex = buffer.length;
|
| try {
|
| if (_state == CLOSED) {
|
| throw new WebSocketException("Data on closed connection");
|
| @@ -375,13 +375,10 @@ class _WebSocketConnectionBase {
|
| processor.onPong = _onWebSocketPong;
|
| processor.onClosed = _onWebSocketClosed;
|
| if (unparsedData != null) {
|
| - processor.update(unparsedData, 0, unparsedData.length);
|
| + processor.update(unparsedData);
|
| }
|
| _socket.onData = () {
|
| - int available = _socket.available();
|
| - List<int> data = new List<int>.fixedLength(available);
|
| - int read = _socket.readList(data, 0, available);
|
| - processor.update(data, 0, read);
|
| + processor.update(_socket.read());
|
| };
|
| _socket.onClosed = () {
|
| processor.closed();
|
|
|