|
@@ -4,11 +4,20 @@ const nsp = io.of('/randomFree');
|
|
|
class randomFree {
|
|
|
|
|
|
constructor() {
|
|
|
- nsp.on('connection', function(socket){
|
|
|
+ nsp.on('connection', (socket) => {
|
|
|
console.log('someone connected');
|
|
|
+ this.match();
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ match() {
|
|
|
+ let clients = Object.keys(nsp.sockets);
|
|
|
+ console.log(clients);
|
|
|
+ if(clients.length > 1) {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
join(user){
|
|
|
//join randomFree queue room
|
|
|
}
|