Index: runtime/bin/socket_impl.dart |
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart |
index 585a4dfd06ad78a03ac484c58b7327a0f1908ccc..1a5c8930b0785d69956613ebbd862bd19ccabbb4 100644 |
--- a/runtime/bin/socket_impl.dart |
+++ b/runtime/bin/socket_impl.dart |
@@ -41,6 +41,7 @@ class _SocketBase { |
int event_mask = message[0]; |
for (int i = _FIRST_EVENT; i <= _LAST_EVENT; i++) { |
if (((event_mask & (1 << i)) != 0) && _handlerMap[i] !== null) { |
+ print("Event " + i); |
var handleEvent = _handlerMap[i]; |
/* |
* Unregister the out handler before executing it. |
@@ -277,12 +278,25 @@ class _Socket extends _SocketBase implements Socket { |
} |
InputStream get inputStream() { |
+ if (_inputStream2 != null) { |
+ throw new SocketIOException("Illegal input stream use"); |
+ } |
if (_inputStream === null) { |
_inputStream = new SocketInputStream(this); |
} |
return _inputStream; |
} |
+ InputStream2 get inputStream2() { |
+ if (_inputStream != null) { |
+ throw new SocketIOException("Illegal input stream use"); |
+ } |
+ if (_inputStream2 === null) { |
+ _inputStream2 = new SocketInputStream2(this); |
+ } |
+ return _inputStream2; |
+ } |
+ |
OutputStream get outputStream() { |
if (_outputStream === null) { |
_outputStream = new SocketOutputStream(this); |
@@ -291,6 +305,7 @@ class _Socket extends _SocketBase implements Socket { |
} |
SocketInputStream _inputStream; |
+ SocketInputStream2 _inputStream2; |
SocketOutputStream _outputStream; |
} |