mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-11-27 06:59:54 +08:00
12 lines
355 B
JavaScript
12 lines
355 B
JavaScript
const EventEmitter = require('events');
|
|
const observerModel = require('./ObserverModel');
|
|
|
|
//事件二次转发 监听ws/req即可监听所有Websocket请求
|
|
observerModel.listener('ws/req', '', (data) => {
|
|
let event = data.RequestValue;
|
|
observerModel.emit(event, data);
|
|
});
|
|
|
|
module.exports.WebSocketObserver = () => {
|
|
return observerModel;
|
|
} |