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

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

Issue 1904553006: Fix strong mode errors in dart:io. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix directory_list rename for dartium. Created 4 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
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/stdio_patch.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(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 bool shared: false}) { 10 bool shared: false}) {
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 /* patch */ factory InternetAddress(String address) { 41 /* patch */ factory InternetAddress(String address) {
42 return new _InternetAddress.parse(address); 42 return new _InternetAddress.parse(address);
43 } 43 }
44 44
45 /* patch */ static Future<List<InternetAddress>> lookup( 45 /* patch */ static Future<List<InternetAddress>> lookup(
46 String host, {InternetAddressType type: InternetAddressType.ANY}) { 46 String host, {InternetAddressType type: InternetAddressType.ANY}) {
47 return _NativeSocket.lookup(host, type: type); 47 return _NativeSocket.lookup(host, type: type);
48 } 48 }
49
50 /* patch */ static InternetAddress _cloneWithNewHost(
51 InternetAddress address, String host) {
52 return (address as _InternetAddress)._cloneWithNewHost(host);
53 }
49 } 54 }
50 55
51 patch class NetworkInterface { 56 patch class NetworkInterface {
52 /* patch */ static bool get listSupported { 57 /* patch */ static bool get listSupported {
53 return _listSupported(); 58 return _listSupported();
54 } 59 }
55 60
56 /* patch */ static Future<List<NetworkInterface>> list({ 61 /* patch */ static Future<List<NetworkInterface>> list({
57 bool includeLoopback: false, 62 bool includeLoopback: false,
58 bool includeLinkLocal: false, 63 bool includeLinkLocal: false,
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 native.closedReadEventSent = true; 1248 native.closedReadEventSent = true;
1244 return new _RawSocket(native); 1249 return new _RawSocket(native);
1245 } 1250 }
1246 1251
1247 factory _RawSocket._readPipe(int fd) { 1252 factory _RawSocket._readPipe(int fd) {
1248 var native = new _NativeSocket.pipe(); 1253 var native = new _NativeSocket.pipe();
1249 native.isClosedWrite = true; 1254 native.isClosedWrite = true;
1250 if (fd != null) _getStdioHandle(native, fd); 1255 if (fd != null) _getStdioHandle(native, fd);
1251 var result = new _RawSocket(native); 1256 var result = new _RawSocket(native);
1252 if (fd != null) { 1257 if (fd != null) {
1253 var socketType = _StdIOUtils._socketType(result._socket); 1258 var socketType = _StdIOUtils._nativeSocketType(result._socket);
1254 result._isMacOSTerminalInput = 1259 result._isMacOSTerminalInput =
1255 Platform.isMacOS && socketType == _STDIO_HANDLE_TYPE_TERMINAL; 1260 Platform.isMacOS && socketType == _STDIO_HANDLE_TYPE_TERMINAL;
1256 } 1261 }
1257 return result; 1262 return result;
1258 } 1263 }
1259 1264
1260 StreamSubscription<RawSocketEvent> listen(void onData(RawSocketEvent event), 1265 StreamSubscription<RawSocketEvent> listen(void onData(RawSocketEvent event),
1261 {Function onError, 1266 {Function onError,
1262 void onDone(), 1267 void onDone(),
1263 bool cancelOnError}) { 1268 bool cancelOnError}) {
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1852 Datagram _makeDatagram(List<int> data, 1857 Datagram _makeDatagram(List<int> data,
1853 String address, 1858 String address,
1854 List<int> in_addr, 1859 List<int> in_addr,
1855 int port) { 1860 int port) {
1856 return new Datagram( 1861 return new Datagram(
1857 data, 1862 data,
1858 new _InternetAddress(address, null, in_addr), 1863 new _InternetAddress(address, null, in_addr),
1859 port); 1864 port);
1860 } 1865 }
1861 1866
OLDNEW
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/stdio_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698