Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

This reverts commit 46495b3.
  • Loading branch information...
commit 5a8aac280f4908103187956e6c426dc55026190b 1 parent 46495b3
Olivier Lalonde authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 ttychat.js
6 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();
});
Please sign in to comment.
Something went wrong with that request. Please try again.