|
|
|
@ -20,6 +20,7 @@ var kestrel = function( options ){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ee2.call(this); |
|
|
|
} |
|
|
|
util.inherits(kestrel,ee2); |
|
|
|
@ -58,6 +59,10 @@ kestrel.prototype.connect = function(){ |
|
|
|
|
|
|
|
function _createConnection(port, host, self){ |
|
|
|
var connection = net.connect(port,host); |
|
|
|
|
|
|
|
connection.on('error', function(err){ |
|
|
|
console.dir(err); |
|
|
|
}); |
|
|
|
connection.on('data', function(data){ |
|
|
|
_handleData(data,self); |
|
|
|
self.emit('data', data); |
|
|
|
|