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

Side by Side Diff: sdk/lib/io/secure_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/secure_server_socket.dart ('k') | sdk/lib/io/string_transformer.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 * A high-level class for communicating securely over a TCP socket, using 8 * A high-level class for communicating securely over a TCP socket, using
9 * TLS and SSL. The [SecureSocket] exposes both a [Stream] and an 9 * TLS and SSL. The [SecureSocket] exposes both a [Stream] and an
10 * [IOSink] interface, making it ideal for using together with 10 * [IOSink] interface, making it ideal for using together with
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 String this.certificateName, 417 String this.certificateName,
418 bool this.is_server, 418 bool this.is_server,
419 RawSocket socket, 419 RawSocket socket,
420 StreamSubscription this._socketSubscription, 420 StreamSubscription this._socketSubscription,
421 List<int> this._carryOverData, 421 List<int> this._carryOverData,
422 bool this.requestClientCertificate, 422 bool this.requestClientCertificate,
423 bool this.requireClientCertificate, 423 bool this.requireClientCertificate,
424 bool this.sendClientCertificate, 424 bool this.sendClientCertificate,
425 bool this.onBadCertificate(X509Certificate certificate)) { 425 bool this.onBadCertificate(X509Certificate certificate)) {
426 _controller = new StreamController<RawSocketEvent>( 426 _controller = new StreamController<RawSocketEvent>(
427 sync: true,
427 onListen: _onSubscriptionStateChange, 428 onListen: _onSubscriptionStateChange,
428 onPause: _onPauseStateChange, 429 onPause: _onPauseStateChange,
429 onResume: _onPauseStateChange, 430 onResume: _onPauseStateChange,
430 onCancel: _onSubscriptionStateChange); 431 onCancel: _onSubscriptionStateChange);
431 _stream = _controller.stream; 432 _stream = _controller.stream;
432 // Throw an ArgumentError if any field is invalid. After this, all 433 // Throw an ArgumentError if any field is invalid. After this, all
433 // errors will be reported through the future or the stream. 434 // errors will be reported through the future or the stream.
434 _verifyFields(); 435 _verifyFields();
435 _secureFilter.init(); 436 _secureFilter.init();
436 if (_carryOverData != null) _readFromCarryOver(); 437 if (_carryOverData != null) _readFromCarryOver();
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 void destroy(); 966 void destroy();
966 void handshake(); 967 void handshake();
967 void init(); 968 void init();
968 X509Certificate get peerCertificate; 969 X509Certificate get peerCertificate;
969 int processBuffer(int bufferIndex); 970 int processBuffer(int bufferIndex);
970 void registerBadCertificateCallback(Function callback); 971 void registerBadCertificateCallback(Function callback);
971 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler); 972 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler);
972 973
973 List<_ExternalBuffer> get buffers; 974 List<_ExternalBuffer> get buffers;
974 } 975 }
OLDNEW
« no previous file with comments | « sdk/lib/io/secure_server_socket.dart ('k') | sdk/lib/io/string_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698