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

Side by Side Diff: runtime/bin/socket_patch.dart

Issue 14172013: Remove second generic argument of StreamConsumer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | sdk/lib/async/stream.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 patch class RawServerSocket { 5 patch class RawServerSocket {
6 /* patch */ static Future<RawServerSocket> bind([String address = "127.0.0.1", 6 /* patch */ static Future<RawServerSocket> bind([String address = "127.0.0.1",
7 int port = 0, 7 int port = 0,
8 int backlog = 0]) { 8 int backlog = 0]) {
9 return _RawServerSocket.bind(address, port, backlog); 9 return _RawServerSocket.bind(address, port, backlog);
10 } 10 }
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 } 652 }
653 } 653 }
654 654
655 655
656 patch class SecureSocket { 656 patch class SecureSocket {
657 /* patch */ factory SecureSocket._(RawSecureSocket rawSocket) => 657 /* patch */ factory SecureSocket._(RawSecureSocket rawSocket) =>
658 new _SecureSocket(rawSocket); 658 new _SecureSocket(rawSocket);
659 } 659 }
660 660
661 661
662 class _SocketStreamConsumer extends StreamConsumer<List<int>, Socket> { 662 class _SocketStreamConsumer extends StreamConsumer<List<int>> {
663 StreamSubscription subscription; 663 StreamSubscription subscription;
664 final _Socket socket; 664 final _Socket socket;
665 int offset; 665 int offset;
666 List<int> buffer; 666 List<int> buffer;
667 bool paused = false; 667 bool paused = false;
668 668
669 _SocketStreamConsumer(this.socket); 669 _SocketStreamConsumer(this.socket);
670 670
671 Future<Socket> consume(Stream<List<int>> stream) { 671 Future<Socket> consume(Stream<List<int>> stream) {
672 if (socket._raw != null) { 672 if (socket._raw != null) {
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 _raw.onBadCertificate = callback; 973 _raw.onBadCertificate = callback;
974 } 974 }
975 975
976 X509Certificate get peerCertificate { 976 X509Certificate get peerCertificate {
977 if (_raw == null) { 977 if (_raw == null) {
978 throw new StateError("peerCertificate called on destroyed SecureSocket"); 978 throw new StateError("peerCertificate called on destroyed SecureSocket");
979 } 979 }
980 return _raw.peerCertificate; 980 return _raw.peerCertificate;
981 } 981 }
982 } 982 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698