committed by
Diamond Lewis
parent
d4fa62ae26
commit
bde96a9002
@@ -8,14 +8,16 @@ const WebSocketServer = require('ws').Server;
|
||||
export class WSAdapter extends WSSAdapter {
|
||||
constructor(options: any) {
|
||||
super(options);
|
||||
const wss = new WebSocketServer({ server: options.server });
|
||||
wss.on('listening', this.onListen);
|
||||
wss.on('connection', this.onConnection);
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
onListen() {}
|
||||
onConnection(ws) {}
|
||||
start() {}
|
||||
start() {
|
||||
const wss = new WebSocketServer({ server: this.options.server });
|
||||
wss.on('listening', this.onListen);
|
||||
wss.on('connection', this.onConnection);
|
||||
}
|
||||
close() {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user