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

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

Issue 307553008: Fix test breakage in socket_patch.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « 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 patch class RawServerSocket { 5 patch class RawServerSocket {
6 /* patch */ static Future<RawServerSocket> bind(address, 6 /* patch */ static Future<RawServerSocket> bind(address,
7 int port, 7 int port,
8 {int backlog: 0, 8 {int backlog: 0,
9 bool v6Only: false}) { 9 bool v6Only: false}) {
10 return _RawServerSocket.bind(address, port, backlog, v6Only); 10 return _RawServerSocket.bind(address, port, backlog, v6Only);
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 'name': name, 1109 'name': name,
1110 'user_name': name, 1110 'user_name': name,
1111 'kind': _JSONKind(), 1111 'kind': _JSONKind(),
1112 }; 1112 };
1113 if (ref) { 1113 if (ref) {
1114 return r; 1114 return r;
1115 } 1115 }
1116 var protocol = isTcp ? "TCP" : isUdp ? "UDP" : null; 1116 var protocol = isTcp ? "TCP" : isUdp ? "UDP" : null;
1117 var localAddress; 1117 var localAddress;
1118 var localPort; 1118 var localPort;
1119 var remoteAddress; 1119 var rAddress;
1120 var remotePort; 1120 var rPort;
1121 try { 1121 try {
1122 localAddress = address.address; 1122 localAddress = address.address;
1123 } catch (e) { } 1123 } catch (e) { }
1124 try { 1124 try {
1125 localPort = port; 1125 localPort = port;
1126 } catch (e) { } 1126 } catch (e) { }
1127 try { 1127 try {
1128 remoteAddress = this.remoteAddress.address; 1128 rAddress = this.remoteAddress.address;
1129 } catch (e) { } 1129 } catch (e) { }
1130 try { 1130 try {
1131 remotePort = remotePort; 1131 rPort = remotePort;
1132 } catch (e) { } 1132 } catch (e) { }
1133 r['localAddress'] = localAddress; 1133 r['localAddress'] = localAddress;
1134 r['localPort'] = localPort; 1134 r['localPort'] = localPort;
1135 r['remoteAddress'] = remoteAddress; 1135 r['remoteAddress'] = rAddress;
1136 r['remotePort'] = remotePort; 1136 r['remotePort'] = rPort;
1137 r['protocol'] = protocol; 1137 r['protocol'] = protocol;
1138 r['readClosed'] = isClosedRead; 1138 r['readClosed'] = isClosedRead;
1139 r['writeClosed'] = isClosedWrite; 1139 r['writeClosed'] = isClosedWrite;
1140 r['closing'] = isClosing; 1140 r['closing'] = isClosing;
1141 r['listening'] = isListening; 1141 r['listening'] = isListening;
1142 r['fd'] = nativeGetSocketId(); 1142 r['fd'] = nativeGetSocketId();
1143 if (owner != null) { 1143 if (owner != null) {
1144 r['owner'] = owner._toJSON(true); 1144 r['owner'] = owner._toJSON(true);
1145 } 1145 }
1146 return r; 1146 return r;
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 String address, 1972 String address,
1973 List<int> in_addr, 1973 List<int> in_addr,
1974 int port) { 1974 int port) {
1975 return new Datagram( 1975 return new Datagram(
1976 data, 1976 data,
1977 new _InternetAddress(address, null, in_addr), 1977 new _InternetAddress(address, null, in_addr),
1978 port); 1978 port);
1979 } 1979 }
1980 1980
1981 String _socketsStats() => _SocketsObservatory.toJSON(); 1981 String _socketsStats() => _SocketsObservatory.toJSON();
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