OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
| 5 part of dart.io; |
| 6 |
5 class _SocketInputStream implements InputStream { | 7 class _SocketInputStream implements InputStream { |
6 _SocketInputStream(Socket socket) : _socket = socket { | 8 _SocketInputStream(Socket socket) : _socket = socket { |
7 if (_socket._closed) _closed = true; | 9 if (_socket._closed) _closed = true; |
8 _socket.onClosed = _onClosed; | 10 _socket.onClosed = _onClosed; |
9 } | 11 } |
10 | 12 |
11 List<int> read([int len]) { | 13 List<int> read([int len]) { |
12 return _socket.read(len); | 14 return _socket.read(len); |
13 } | 15 } |
14 | 16 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 200 } |
199 } | 201 } |
200 | 202 |
201 Socket _socket; | 203 Socket _socket; |
202 _BufferList _pendingWrites; | 204 _BufferList _pendingWrites; |
203 Function _onNoPendingWrites; | 205 Function _onNoPendingWrites; |
204 Function _onClosed; | 206 Function _onClosed; |
205 bool _closing = false; | 207 bool _closing = false; |
206 bool _closed = false; | 208 bool _closed = false; |
207 } | 209 } |
OLD | NEW |