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

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

Issue 59073003: Version 0.8.10.4 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | « dart/runtime/bin/main.cc ('k') | dart/runtime/bin/vmservice/client/web/index.html » ('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 return _RawServerSocket.bind(address, port, backlog, v6Only); 10 return _RawServerSocket.bind(address, port, backlog, v6Only);
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 onData, 807 onData,
808 onError: onError, 808 onError: onError,
809 onDone: onDone, 809 onDone: onDone,
810 cancelOnError: cancelOnError); 810 cancelOnError: cancelOnError);
811 } 811 }
812 812
813 int available() => _socket.available(); 813 int available() => _socket.available();
814 814
815 List<int> read([int len]) { 815 List<int> read([int len]) {
816 if (_isMacOSTerminalInput) { 816 if (_isMacOSTerminalInput) {
817 var available = available(); 817 var available = this.available();
818 if (available == 0) return null; 818 if (available == 0) return null;
819 var data = _socket.read(len); 819 var data = _socket.read(len);
820 if (data == null || data.length < available) { 820 if (data == null || data.length < available) {
821 // Reading less than available from a Mac OS terminal indicate Ctrl-D. 821 // Reading less than available from a Mac OS terminal indicate Ctrl-D.
822 // This is interpreted as read closed. 822 // This is interpreted as read closed.
823 scheduleMicrotask(() => _controller.add(RawSocketEvent.READ_CLOSED)); 823 scheduleMicrotask(() => _controller.add(RawSocketEvent.READ_CLOSED));
824 } 824 }
825 return data; 825 return data;
826 } else { 826 } else {
827 return _socket.read(len); 827 return _socket.read(len);
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 if (_detachReady != null) { 1216 if (_detachReady != null) {
1217 _detachReady.complete(null); 1217 _detachReady.complete(null);
1218 } else { 1218 } else {
1219 if (_raw != null) { 1219 if (_raw != null) {
1220 _raw.shutdown(SocketDirection.SEND); 1220 _raw.shutdown(SocketDirection.SEND);
1221 _disableWriteEvent(); 1221 _disableWriteEvent();
1222 } 1222 }
1223 } 1223 }
1224 } 1224 }
1225 } 1225 }
OLDNEW
« no previous file with comments | « dart/runtime/bin/main.cc ('k') | dart/runtime/bin/vmservice/client/web/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698