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

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: Address review comments 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
« no previous file with comments | « sdk/lib/io/mime_multipart_parser.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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
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>(
125 sync: true,
125 onListen: _onSubscriptionStateChange, 126 onListen: _onSubscriptionStateChange,
126 onPause: _onPauseStateChange, 127 onPause: _onPauseStateChange,
127 onResume: _onPauseStateChange, 128 onResume: _onPauseStateChange,
128 onCancel: _onSubscriptionStateChange); 129 onCancel: _onSubscriptionStateChange);
129 } 130 }
130 131
131 /** 132 /**
132 * Returns a future for a [RawSecureServerSocket]. When the future 133 * Returns a future for a [RawSecureServerSocket]. When the future
133 * completes the server socket is bound to the given [address] and 134 * completes the server socket is bound to the given [address] and
134 * [port] and has started listening on it. 135 * [port] and has started listening on it.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 _subscription = _socket.listen(_onData, 258 _subscription = _socket.listen(_onData,
258 onDone: _onDone, 259 onDone: _onDone,
259 onError: _onError); 260 onError: _onError);
260 } else { 261 } else {
261 close(); 262 close();
262 } 263 }
263 } 264 }
264 } 265 }
265 266
266 267
OLDNEW
« no previous file with comments | « sdk/lib/io/mime_multipart_parser.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698