MCSManager/onlinefs/module/handle.js
2018-01-20 13:17:20 +08:00

21 lines
381 B
JavaScript

const EventEmitter = require("events");
class ControllerHandle extends EventEmitter {
constructor(args) {
super(args);
}
listener(event, ...agrs) {
this.on(event, agrs);
}
notify(event, ...args) {
this.emit(event, args);
}
}
const onlyControllerHandle = new ControllerHandle();
exports.ControllerHandle = onlyControllerHandle;