| OLD | NEW |
| 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([address = "127.0.0.1", | 6 /* patch */ static Future<RawServerSocket> bind(address, |
| 7 int port = 0, | 7 int port, |
| 8 int backlog = 0]) { | 8 {int backlog: 0}) { |
| 9 return _RawServerSocket.bind(address, port, backlog); | 9 return _RawServerSocket.bind(address, port, backlog); |
| 10 } | 10 } |
| 11 } | 11 } |
| 12 | 12 |
| 13 | 13 |
| 14 patch class RawSocket { | 14 patch class RawSocket { |
| 15 /* patch */ static Future<RawSocket> connect(host, int port) { | 15 /* patch */ static Future<RawSocket> connect(host, int port) { |
| 16 return _RawSocket.connect(host, port); | 16 return _RawSocket.connect(host, port); |
| 17 } | 17 } |
| 18 } | 18 } |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 if (_controller.hasListener) { | 730 if (_controller.hasListener) { |
| 731 _resume(); | 731 _resume(); |
| 732 } else { | 732 } else { |
| 733 close(); | 733 close(); |
| 734 } | 734 } |
| 735 } | 735 } |
| 736 } | 736 } |
| 737 | 737 |
| 738 | 738 |
| 739 patch class ServerSocket { | 739 patch class ServerSocket { |
| 740 /* patch */ static Future<ServerSocket> bind([address = "127.0.0.1", | 740 /* patch */ static Future<ServerSocket> bind(address, |
| 741 int port = 0, | 741 int port, |
| 742 int backlog = 0]) { | 742 {int backlog: 0}) { |
| 743 return _ServerSocket.bind(address, port, backlog); | 743 return _ServerSocket.bind(address, port, backlog); |
| 744 } | 744 } |
| 745 } | 745 } |
| 746 | 746 |
| 747 class _ServerSocket extends Stream<Socket> | 747 class _ServerSocket extends Stream<Socket> |
| 748 implements ServerSocket { | 748 implements ServerSocket { |
| 749 final _socket; | 749 final _socket; |
| 750 | 750 |
| 751 static Future<_ServerSocket> bind(address, | 751 static Future<_ServerSocket> bind(address, |
| 752 int port, | 752 int port, |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 _raw.onBadCertificate = callback; | 1088 _raw.onBadCertificate = callback; |
| 1089 } | 1089 } |
| 1090 | 1090 |
| 1091 X509Certificate get peerCertificate { | 1091 X509Certificate get peerCertificate { |
| 1092 if (_raw == null) { | 1092 if (_raw == null) { |
| 1093 throw new StateError("peerCertificate called on destroyed SecureSocket"); | 1093 throw new StateError("peerCertificate called on destroyed SecureSocket"); |
| 1094 } | 1094 } |
| 1095 return _raw.peerCertificate; | 1095 return _raw.peerCertificate; |
| 1096 } | 1096 } |
| 1097 } | 1097 } |
| OLD | NEW |