Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function Aggregator (conn) {
// make "new" optional
if ( !(this instanceof Aggregator) ) {
return new Aggregator(conn);
}
conn.on('data', _.bind(onSocketData, this));
conn.on('close', _.bind(onSocketClose, this));
this.connection = conn;
this.polledResources = new HashTable();
this.bodyCache = {};
this.log('init');
}