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

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

Issue 997503002: Add case to avoid warning when dart2js analyzes dart:io files (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 onError: _reportError, 553 onError: _reportError,
554 onDone: _doneHandler); 554 onDone: _doneHandler);
555 } else { 555 } else {
556 if (_socketSubscription.isPaused) { 556 if (_socketSubscription.isPaused) {
557 _socket.close(); 557 _socket.close();
558 throw new ArgumentError( 558 throw new ArgumentError(
559 "Subscription passed to TLS upgrade is paused"); 559 "Subscription passed to TLS upgrade is paused");
560 } 560 }
561 // If we are upgrading a socket that is already closed for read, 561 // If we are upgrading a socket that is already closed for read,
562 // report an error as if we received READ_CLOSED during the handshake. 562 // report an error as if we received READ_CLOSED during the handshake.
563 if (_socket._socket.closedReadEventSent) { 563 dynamic s = _socket; // Cast to dynamic to avoid warning.
karlklose 2015/03/10 09:20:40 'var s' would be shorter. Is there a better type y
Søren Gjesse 2015/03/10 16:29:01 The type is _RawSocket, but that is currently defi
564 if (s._socket.closedReadEventSent) {
564 _eventDispatcher(RawSocketEvent.READ_CLOSED); 565 _eventDispatcher(RawSocketEvent.READ_CLOSED);
565 } 566 }
566 _socketSubscription 567 _socketSubscription
567 ..onData(_eventDispatcher) 568 ..onData(_eventDispatcher)
568 ..onError(_reportError) 569 ..onError(_reportError)
569 ..onDone(_doneHandler); 570 ..onDone(_doneHandler);
570 } 571 }
571 try { 572 try {
572 _secureFilter.connect(address.host, 573 _secureFilter.connect(address.host,
573 (address as dynamic)._in_addr, 574 (address as dynamic)._in_addr,
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 /** 1429 /**
1429 * An exception that happens in the handshake phase of establishing 1430 * An exception that happens in the handshake phase of establishing
1430 * a secure network connection, when looking up or verifying a 1431 * a secure network connection, when looking up or verifying a
1431 * certificate. 1432 * certificate.
1432 */ 1433 */
1433 class CertificateException extends TlsException { 1434 class CertificateException extends TlsException {
1434 const CertificateException([String message = "", 1435 const CertificateException([String message = "",
1435 OSError osError = null]) 1436 OSError osError = null])
1436 : super._("CertificateException", message, osError); 1437 : super._("CertificateException", message, osError);
1437 } 1438 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698