This commit is contained in:
Danny Coates 2010-09-10 17:59:18 -06:00
Родитель 56c21409b3
Коммит b52dca6607
3 изменённых файлов: 9 добавлений и 25 удалений

Просмотреть файл

@ -1,6 +1,5 @@
var http = require('http'),
events = require('events'),
sys = require('sys'),
path = require('path'),
ws = require('../vendor/ws'),
paperboy = require('../vendor/paperboy'),
@ -65,9 +64,11 @@ exports.createServer = function(options) {
}
srv.emit('close');
}
},
webPort: {
get: function () { return settings.webPort; }
}
});
srv.__defineGetter__('webPort', function () { return settings.webPort; });
return srv;
};

Просмотреть файл

@ -1,6 +1,5 @@
var net = require('net'),
events = require('events'),
sys = require('sys');
events = require('events');
function makeMessage() {
return {
@ -51,7 +50,7 @@ exports.attachDebugger = function (port) {
msg.contentLength = parseInt(m[1], 10);
}
else {
sys.debug('no Content-Length');
console.warn('no Content-Length');
}
buffer = buffer.slice(offset + 4);
parse();
@ -73,11 +72,12 @@ exports.attachDebugger = function (port) {
{
conn.end();
}
},
connected: {
get: function() { return connected; }
}
});
debugr.__defineGetter__('connected', function () { return connected; });
conn.on('connect', function () {
connected = true;
debugr.emit('connect');
@ -104,8 +104,3 @@ exports.attachDebugger = function (port) {
return debugr;
};
exports.startProcess = function (cmd) {
};

Просмотреть файл

@ -1,17 +1,8 @@
var http = require('http'),
events = require('events'),
sys = require('sys'),
path = require('path'),
debugr = require('./debugger');
function override(options, defaults) {
var result = {};
Object.keys(defaults).forEach(function (key) {
result[key] = options[key] || defaults[key];
});
return result;
}
///////////////////////////////////////////////////////////
// exports
@ -126,10 +117,7 @@ exports.createSession = function () {
value: function (conn) {
clients = clients.filter(function(c) { return c !== conn; });
if (clients.length < 1) {
if (debug) {
debug.close();
}
session.emit('close');
session.close();
}
}
}