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

Side by Side Diff: tools/ddbg.dart

Issue 11336012: Remove public SocketInputStream and SocketOutputStream clases (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « tests/standalone/io/stream_pipe_test.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Simple interactive debugger shell that connects to the Dart VM's debugger 5 // Simple interactive debugger shell that connects to the Dart VM's debugger
6 // connection port. 6 // connection port.
7 7
8 #import("dart:io"); 8 #import("dart:io");
9 #import("dart:json"); 9 #import("dart:json");
10 #import("dart:math", prefix: "Math"); 10 #import("dart:math", prefix: "Math");
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 index = skipString(index); 522 index = skipString(index);
523 } 523 }
524 } 524 }
525 return 0; 525 return 0;
526 } 526 }
527 527
528 528
529 void main() { 529 void main() {
530 outstandingCommands = new Map<int, Completer>(); 530 outstandingCommands = new Map<int, Completer>();
531 vmSock = new Socket("127.0.0.1", 5858); 531 vmSock = new Socket("127.0.0.1", 5858);
532 vmStream = new SocketOutputStream(vmSock); 532 vmStream = vmSock.outputStream;
533 var stdinStream = new StringInputStream(stdin); 533 var stdinStream = new StringInputStream(stdin);
534 stdinStream.onLine = () { 534 stdinStream.onLine = () {
535 processCommand(stdinStream.readLine()); 535 processCommand(stdinStream.readLine());
536 }; 536 };
537 var vmInStream = new SocketInputStream(vmSock); 537 var vmInStream = vmSock.inputStream;
538 vmInStream.onData = () { 538 vmInStream.onData = () {
539 String s = decodeUtf8(vmInStream.read()); 539 String s = decodeUtf8(vmInStream.read());
540 processVmData(s); 540 processVmData(s);
541 }; 541 };
542 vmInStream.onError = (err) { 542 vmInStream.onError = (err) {
543 print("Error in debug connection: $err"); 543 print("Error in debug connection: $err");
544 quitShell(); 544 quitShell();
545 }; 545 };
546 vmInStream.onClosed = () { 546 vmInStream.onClosed = () {
547 print("VM debugger connection closed"); 547 print("VM debugger connection closed");
548 quitShell(); 548 quitShell();
549 }; 549 };
550 } 550 }
OLDNEW
« no previous file with comments | « tests/standalone/io/stream_pipe_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698