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

Side by Side Diff: sdk/lib/io/secure_server_socket.dart

Issue 14103010: Change hasSubscribers to hasListener. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years, 8 months 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
« no previous file with comments | « sdk/lib/io/io_sink.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * The [SecureServerSocket] is a server socket, providing a stream of high-level 8 * The [SecureServerSocket] is a server socket, providing a stream of high-level
9 * [Socket]s. 9 * [Socket]s.
10 * 10 *
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 void _onPauseStateChange() { 216 void _onPauseStateChange() {
217 if (_controller.isPaused) { 217 if (_controller.isPaused) {
218 _subscription.pause(); 218 _subscription.pause();
219 } else { 219 } else {
220 _subscription.resume(); 220 _subscription.resume();
221 } 221 }
222 } 222 }
223 223
224 void _onSubscriptionStateChange() { 224 void _onSubscriptionStateChange() {
225 if (_controller.hasSubscribers) { 225 if (_controller.hasListener) {
226 _subscription = _socket.listen(_onData, 226 _subscription = _socket.listen(_onData,
227 onDone: _onDone, 227 onDone: _onDone,
228 onError: _onError); 228 onError: _onError);
229 } else { 229 } else {
230 close(); 230 close();
231 } 231 }
232 } 232 }
233 } 233 }
234 234
235 235
OLDNEW
« no previous file with comments | « sdk/lib/io/io_sink.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698