Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
startSocketIoServer() {
this.io = socketIO(this.webServer);
this.io.on('connection', (socket) => {
const connection = new WebRtcConnection(this, socket);
this.emit('new-connection', connection);
});
}
}
constructor() {
this.app = express();
this.server = http.createServer(this.app);
this.io = SocketIO(this.server);
this.listen();
}
startSocketIoServer() {
this.io = socketIO(this.webServer);
this.io.on('connection', function(socket){
new Connection(server, socket);
});
}
socket(server){
const io = this.websocket.io = IO(server);
io.on("connection", socket =>{
socket.on("disconnect", ()=>{
});
});
}