-
Notifications
You must be signed in to change notification settings - Fork 43
Description
root@mayank-Vostro-460# cd wikistream
root@mayank-Vostro-460:~/wikistream# gedit node_modules/policyfile/lib/server.js
"gedit node_modules/policyfile/lib/server.js"
/New code,/
/**
-
Proxy the event listener requests to the created Net server
*/
var EventEmitter = require('events');
Object.keys(EventEmitter.prototype).forEach(function proxy (key){
Server.prototype[key] = Server.prototype[key] || function () {
if (this.socket) {
this.socket[key].apply(this.socket, arguments);
}return this;
};
});
/******* old code*************/
/**
-
Proxy the event listener requests to the created Net server
*/
Object.keys(process.EventEmitter.prototype).forEach(function proxy (key){
Server.prototype[key] = Server.prototype[key] || function () {
if (this.socket) {
this.socket[key].apply(this.socket, arguments);
}return this;
};
});