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

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

Issue 16125005: Make new StreamController be async by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 final String certificateName; 114 final String certificateName;
115 final bool requestClientCertificate; 115 final bool requestClientCertificate;
116 final bool requireClientCertificate; 116 final bool requireClientCertificate;
117 bool _closed = false; 117 bool _closed = false;
118 118
119 RawSecureServerSocket._(RawServerSocket serverSocket, 119 RawSecureServerSocket._(RawServerSocket serverSocket,
120 String this.certificateName, 120 String this.certificateName,
121 bool this.requestClientCertificate, 121 bool this.requestClientCertificate,
122 bool this.requireClientCertificate) { 122 bool this.requireClientCertificate) {
123 _socket = serverSocket; 123 _socket = serverSocket;
124 _controller = new StreamController<RawSecureSocket>( 124 _controller = new StreamController<RawSecureSocket>(sync: true,
floitsch 2013/05/30 12:13:48 next line.
Lasse Reichstein Nielsen 2013/05/31 05:51:59 Done.
125 onListen: _onSubscriptionStateChange, 125 onListen: _onSubscriptionStateChange,
126 onPause: _onPauseStateChange, 126 onPause: _onPauseStateChange,
127 onResume: _onPauseStateChange, 127 onResume: _onPauseStateChange,
128 onCancel: _onSubscriptionStateChange); 128 onCancel: _onSubscriptionStateChange);
129 } 129 }
130 130
131 /** 131 /**
132 * Returns a future for a [RawSecureServerSocket]. When the future 132 * Returns a future for a [RawSecureServerSocket]. When the future
133 * completes the server socket is bound to the given [address] and 133 * completes the server socket is bound to the given [address] and
134 * [port] and has started listening on it. 134 * [port] and has started listening on it.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 _subscription = _socket.listen(_onData, 257 _subscription = _socket.listen(_onData,
258 onDone: _onDone, 258 onDone: _onDone,
259 onError: _onError); 259 onError: _onError);
260 } else { 260 } else {
261 close(); 261 close();
262 } 262 }
263 } 263 }
264 } 264 }
265 265
266 266
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698