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

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

Issue 1760033003: Fix Mac OS check for terminal input (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « 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 bool shared: false}) { 10 bool shared: false}) {
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 native.isClosedRead = true; 1236 native.isClosedRead = true;
1237 native.closedReadEventSent = true; 1237 native.closedReadEventSent = true;
1238 return new _RawSocket(native); 1238 return new _RawSocket(native);
1239 } 1239 }
1240 1240
1241 factory _RawSocket._readPipe(int fd) { 1241 factory _RawSocket._readPipe(int fd) {
1242 var native = new _NativeSocket.pipe(); 1242 var native = new _NativeSocket.pipe();
1243 native.isClosedWrite = true; 1243 native.isClosedWrite = true;
1244 if (fd != null) _getStdioHandle(native, fd); 1244 if (fd != null) _getStdioHandle(native, fd);
1245 var result = new _RawSocket(native); 1245 var result = new _RawSocket(native);
1246 result._isMacOSTerminalInput = 1246 if (fd != null) {
1247 Platform.isMacOS && 1247 var socketType = _StdIOUtils._socketType(result._socket);
1248 _StdIOUtils._socketType(result._socket) == _STDIO_HANDLE_TYPE_TERMINAL; 1248 result._isMacOSTerminalInput =
1249 Platform.isMacOS && socketType == _STDIO_HANDLE_TYPE_TERMINAL;
1250 }
1249 return result; 1251 return result;
1250 } 1252 }
1251 1253
1252 StreamSubscription<RawSocketEvent> listen(void onData(RawSocketEvent event), 1254 StreamSubscription<RawSocketEvent> listen(void onData(RawSocketEvent event),
1253 {Function onError, 1255 {Function onError,
1254 void onDone(), 1256 void onDone(),
1255 bool cancelOnError}) { 1257 bool cancelOnError}) {
1256 return _controller.stream.listen( 1258 return _controller.stream.listen(
1257 onData, 1259 onData,
1258 onError: onError, 1260 onError: onError,
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 Datagram _makeDatagram(List<int> data, 1846 Datagram _makeDatagram(List<int> data,
1845 String address, 1847 String address,
1846 List<int> in_addr, 1848 List<int> in_addr,
1847 int port) { 1849 int port) {
1848 return new Datagram( 1850 return new Datagram(
1849 data, 1851 data,
1850 new _InternetAddress(address, null, in_addr), 1852 new _InternetAddress(address, null, in_addr),
1851 port); 1853 port);
1852 } 1854 }
1853 1855
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