| Index: runtime/bin/socket_patch.dart
|
| diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
|
| index 490cca5b84ad52593f34f1ce1b33dfb134189c76..65f4a8a13d2225b4e65e791a7cf6535258eb7bb8 100644
|
| --- a/runtime/bin/socket_patch.dart
|
| +++ b/runtime/bin/socket_patch.dart
|
| @@ -375,6 +375,20 @@ class _Socket extends _SocketBase implements Socket {
|
|
|
| _available() native "Socket_Available";
|
|
|
| + List<int> read([int len]) {
|
| + if (len != null && len <= 0) {
|
| + throw new SocketIOException("Illegal length $len");
|
| + }
|
| + var result = _read(len == null ? -1 : len);
|
| + if (result is OSError) {
|
| + _reportError(result, "Read failed");
|
| + return null;
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + _read(int len) native "Socket_Read";
|
| +
|
| int readList(List<int> buffer, int offset, int bytes) {
|
| if (!_closed) {
|
| if (bytes == 0) {
|
|
|