Fix event sent by EventEmitter classes

This commit is contained in:
2014-11-05 01:17:57 +01:00
parent b1ab5822a7
commit 405d5751fb
5 changed files with 102 additions and 52 deletions

View File

@@ -8,14 +8,18 @@ server.createServer(3219, "127.0.0.1", function (password) {
}, function (controler) {
"use strict";
console.log("Connected");
var connected = true;
console.log("Ready to serve");
process.stdin.removeAllListeners("data");
process.stdin.on("data", function(data) {
var cmd = data.toString();
console.log("CMD "+cmd);
controler.on("fileOpened", function() {
console.log("Filed opened dude !");
});
try
{
@@ -61,7 +65,6 @@ server.createServer(3219, "127.0.0.1", function (password) {
});
break;
default :
console.log("CMD : "+data.toString());
console.log("RETURNED : "+eval(data.toString()));
break;
}