});
dspSocket.on('force_reload', function (msg) {
- msgHistory = []; //reset history, sciab was closed or has crashed.
+ msgHistory = []; //reset history, sciab was closed or has crashed.
});
dspSocket.on('imagepath', function (msg) {
dspSocket.on('quit', function () {
L('quit' + '(' + process.pid + ')');
-
+
//prevent accidental close, wait 10 minutes before really close Scilab.
quitTO = setTimeout( function() {
L('send quit to Scilab');
//resend all gui creation information
var size = msgHistory.length;
L('history: ' + size);
- dspSocket.emit("graphic_reconnection", "start");
+ dspSocket.emit("graphic_reconnection", "start");
for(var i = 0 ; i < size ; ++i) {
//L('%d : %s', i+1, msgHistory[i]);
dspSocket.emit('graphic_create', msgHistory[i]);
}
- dspSocket.emit("graphic_reconnection", "end");
+ dspSocket.emit("graphic_reconnection", "end");
});
-
+
L('open commandio socket');
//start command server to chat with Scilab
var commandio = require('socket.io')(cmdPort);
L('scilab graphic disconnected'+ '(' + process.pid + ')');
graphic_ready = false;
});
-
+
//send to server scilab is ready
graphic_ready = true;
if(command_ready) {
scilabApp.stdout.on('data', function(data) {
L('scilab out :' + data.toString());
});
- */
+ */
scilabApp.stderr.on('data', function(data) {
L('scilab err :' + data.toString());
});