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

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

Issue 8525002: Provide access to stdin, stdout and stderr (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed issue with Dart not stopping Created 9 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
« runtime/bin/builtin.dart ('K') | « runtime/bin/process_impl.dart ('k') | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 5
6 class _SocketBase { 6 class _SocketBase {
7 // Bit flags used when communicating between the eventhandler and 7 // Bit flags used when communicating between the eventhandler and
8 // dart code. The EVENT flags are used to indicate events of 8 // dart code. The EVENT flags are used to indicate events of
9 // interest when sending a message from dart code to the 9 // interest when sending a message from dart code to the
10 // eventhandler. When receiving a message from the eventhandler the 10 // eventhandler. When receiving a message from the eventhandler the
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 factory _Socket(String host, int port) { 249 factory _Socket(String host, int port) {
250 Socket socket = new _Socket._internal(); 250 Socket socket = new _Socket._internal();
251 if (!socket._createConnect(host, port)) { 251 if (!socket._createConnect(host, port)) {
252 socket.close(); 252 socket.close();
253 return null; 253 return null;
254 } 254 }
255 return socket; 255 return socket;
256 } 256 }
257 257
258 _Socket._internal(); 258 _Socket._internal();
259 _Socket._internalInputOnly() : _closedRead = true; 259 _Socket._internalReadOnly() : _closedWrite = true;
260 _Socket._internalOutputOnly() : _closedWrite = true; 260 _Socket._internalWriteOnly() : _closedRead = true;
261 261
262 int available() { 262 int available() {
263 if (_id >= 0) { 263 if (_id >= 0) {
264 return _available(); 264 return _available();
265 } 265 }
266 throw new 266 throw new
267 SocketIOException("Error: available failed - invalid socket handle"); 267 SocketIOException("Error: available failed - invalid socket handle");
268 } 268 }
269 269
270 int _available() native "Socket_Available"; 270 int _available() native "Socket_Available";
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 return _outputStream; 351 return _outputStream;
352 } 352 }
353 353
354 bool _closedRead = false; 354 bool _closedRead = false;
355 bool _closedWrite = false; 355 bool _closedWrite = false;
356 SocketInputStream _inputStream; 356 SocketInputStream _inputStream;
357 SocketOutputStream _outputStream; 357 SocketOutputStream _outputStream;
358 } 358 }
359 359
OLDNEW
« runtime/bin/builtin.dart ('K') | « runtime/bin/process_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698