Permalink
Browse files

Revert "Revert "oops, stdin replaced by stdout""

This reverts commit 46495b3.
  • Loading branch information...
1 parent 46495b3 commit 5a8aac280f4908103187956e6c426dc55026190b @olalonde committed Mar 31, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 ttychat.js
View
@@ -11,7 +11,7 @@ var socket_path = "/tmp/ttychat.sock";
var socket = new net.Socket({type: 'unix'});
socket.on('data', function(data) {
- process.stdin.write(data);
+ process.stdout.write(data);
});
socket.on('connect', function(data) {
@@ -21,11 +21,11 @@ socket.on('connect', function(data) {
});
socket.on('error', function(data) {
- process.stdin.write("Server is offline.");
+ process.stdout.write("Server is offline.");
});
socket.on('end', function(data) {
- process.stdin.write("Disconnected from server.");
+ process.stdout.write("Disconnected from server.");
process.exit();
});

0 comments on commit 5a8aac2

Please sign in to comment.