Added a method to retrieve buffers from controler and logs to debug
This commit is contained in:
@@ -14,7 +14,13 @@ server.createServer(3219, "127.0.0.1", function (password) {
|
||||
|
||||
process.stdin.on("data", function(data) {
|
||||
if (data.toString() !== "exit"){
|
||||
eval(data.toString());
|
||||
try {
|
||||
console.log("CMD : "+data.toString());
|
||||
console.log("RETURNED : "+eval(data.toString()));
|
||||
}
|
||||
catch (ex) {
|
||||
console.log("Erreur : "+ex.message)
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ function NetbeansClient(socket, authentication, onEvent, onError, onDisconnected
|
||||
|
||||
messageTransform.on("data",function (data) {
|
||||
var message = data.toString();
|
||||
console.log(message);
|
||||
console.log("MSG : "+message);
|
||||
|
||||
/* The first message must be an authentication one */
|
||||
if (message.indexOf("AUTH ") === 0 && authentication(message.substring(message.indexOf(" ") + 1))) {
|
||||
@@ -68,7 +68,7 @@ function NetbeansClient(socket, authentication, onEvent, onError, onDisconnected
|
||||
messageTransform.removeAllListeners("data");
|
||||
messageTransform.on("data", function(data) {
|
||||
var message = data.toString();
|
||||
console.log(message);
|
||||
console.log("MSG "+message);
|
||||
|
||||
try {
|
||||
var iName = 0; /*Index of the name separator in case of an Event */
|
||||
@@ -364,7 +364,7 @@ function Controler(socket, authentication) {
|
||||
};
|
||||
|
||||
|
||||
/* CONNEXION CONTROL */
|
||||
/* CONNTROLER CONTROL */
|
||||
|
||||
//Close the underlying connexion with Vim, but not Vim
|
||||
this.detach = function () {
|
||||
@@ -377,6 +377,10 @@ function Controler(socket, authentication) {
|
||||
socket.end("DISCONNECT\n");
|
||||
self.emit("disconnected");
|
||||
};
|
||||
|
||||
this.getBuffer = function(buffId) {
|
||||
return buffers[buffId];
|
||||
};
|
||||
}
|
||||
|
||||
Controler.prototype = EventEmitter.prototype;
|
||||
|
||||
Reference in New Issue
Block a user