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'), var http = require('http'),
events = require('events'), events = require('events'),
sys = require('sys'),
path = require('path'), path = require('path'),
ws = require('../vendor/ws'), ws = require('../vendor/ws'),
paperboy = require('../vendor/paperboy'), paperboy = require('../vendor/paperboy'),
@ -65,9 +64,11 @@ exports.createServer = function(options) {
} }
srv.emit('close'); srv.emit('close');
} }
},
webPort: {
get: function () { return settings.webPort; }
} }
}); });
srv.__defineGetter__('webPort', function () { return settings.webPort; });
return srv; return srv;
}; };

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

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

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

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