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

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

Issue 14640008: Change the signature for all network bind calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments by whesse@ Created 7 years, 7 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
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([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
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
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 }
OLDNEW
« no previous file with comments | « pkg/http/test/safe_http_server.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/io_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698