Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: lib/io/socket_stream_impl.dart

Issue 11337019: Use patching for dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 class _SocketInputStream implements InputStream { 5 class _SocketInputStream implements InputStream {
6 _SocketInputStream(Socket socket) : _socket = socket { 6 _SocketInputStream(Socket socket) : _socket = socket {
7 if (_socket._closed) _closed = true; 7 if (_socket._closed) _closed = true;
8 _socket.onClosed = _onClosed; 8 _socket.onClosed = _onClosed;
9 } 9 }
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 _onError = callback; 70 _onError = callback;
71 } 71 }
72 72
73 void _onClosed() { 73 void _onClosed() {
74 _closed = true; 74 _closed = true;
75 if (_clientCloseHandler !== null) { 75 if (_clientCloseHandler !== null) {
76 _clientCloseHandler(); 76 _clientCloseHandler();
77 } 77 }
78 } 78 }
79 79
80 void _onSocketError(e) { 80 bool _onSocketError(e) {
81 close(); 81 close();
82 if (_onError != null) { 82 if (_onError != null) {
83 _onError(e); 83 _onError(e);
84 return true; 84 return true;
85 } else { 85 } else {
86 return false; 86 return false;
87 } 87 }
88 } 88 }
89 89
90 Socket _socket; 90 Socket _socket;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 } 222 }
223 223
224 Socket _socket; 224 Socket _socket;
225 _BufferList _pendingWrites; 225 _BufferList _pendingWrites;
226 Function _onNoPendingWrites; 226 Function _onNoPendingWrites;
227 Function _onClosed; 227 Function _onClosed;
228 bool _closing = false; 228 bool _closing = false;
229 bool _closed = false; 229 bool _closed = false;
230 } 230 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698