15 lines
312 B
JavaScript
15 lines
312 B
JavaScript
|
const websockets = require("ws");
|
||
|
|
||
|
class GatewayServer {
|
||
|
constructor({ server }) {
|
||
|
this.wss = new websockets.Server({ server });
|
||
|
|
||
|
this.wss.on("connection", (ws) => {
|
||
|
ws.on("message", (data) => {
|
||
|
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = GatewayServer;
|