Chromium Code Reviews| Index: runtime/bin/socket_patch.dart |
| diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart |
| index 512cdbe637e1f8029ebd6f684f834f63256e986a..632278675e88028893a8ace3c4eb615ba512c516 100644 |
| --- a/runtime/bin/socket_patch.dart |
| +++ b/runtime/bin/socket_patch.dart |
| @@ -368,6 +368,12 @@ class _NativeSocket extends NativeFieldWrapperClass1 { |
| eventHandlers = new List(EVENT_COUNT + 1); |
| } |
| + _NativeSocket.watch(int id) : typeFlags = TYPE_NORMAL_SOCKET { |
| + eventHandlers = new List(EVENT_COUNT + 1); |
| + isClosedWrite = true; |
| + setSocketId(id); |
|
Søren Gjesse
2013/09/03 12:19:58
Just call nativeSetSocketId here.
Anders Johnsen
2013/09/03 12:43:32
Done.
|
| + } |
| + |
| int available() { |
| if (isClosing || isClosed) return 0; |
| var result = nativeAvailable(); |
| @@ -653,6 +659,9 @@ class _NativeSocket extends NativeFieldWrapperClass1 { |
| return nativeSetOption(option._value, enabled); |
| } |
| + void setSocketId(int id) => nativeSetSocketId(id); |
|
Søren Gjesse
2013/09/03 12:19:58
No need to this.
Anders Johnsen
2013/09/03 12:43:32
Done.
|
| + |
| + void nativeSetSocketId(int id) native "Socket_SetSocketId"; |
| nativeAvailable() native "Socket_Available"; |
| nativeRead(int len) native "Socket_Read"; |
| nativeWrite(List<int> buffer, int offset, int bytes) |