Index: sdk/lib/io/websocket_impl.dart |
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart |
index b7ca9a066c4832ad68d853317655f2aa801d3a01..3d14fa3f4ad185e33076de1559856c46aa8355af 100644 |
--- a/sdk/lib/io/websocket_impl.dart |
+++ b/sdk/lib/io/websocket_impl.dart |
@@ -186,7 +186,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer { |
throw new WebSocketException("Protocol error"); |
case _WebSocketMessageType.TEXT: |
- _buffer.add(_decodeString(buffer.getRange(index, payload))); |
+ _buffer.write(_decodeString(buffer.getRange(index, payload))); |
index += payload; |
if (_remainingPayloadBytes == 0) { |
_messageFrameEnd(sink); |
@@ -194,7 +194,7 @@ class _WebSocketProtocolTransformer extends StreamEventTransformer { |
break; |
case _WebSocketMessageType.BINARY: |
- _buffer.add(buffer.getRange(index, payload)); |
+ _buffer.write(buffer.getRange(index, payload)); |
index += payload; |
if (_remainingPayloadBytes == 0) { |
_messageFrameEnd(sink); |