UNPKG

mikudos-socketio-app

Version:

mikudos-socketio-app for connection and call methods and sync events on mikudos-socketio-app server, which is provided only for socket.io connection.

10 lines (7 loc) 278 B
import { mikudos } from '../namespace'; export class HandlerBase { constructor(public eventPath: string) {} async checkRoom(room: string, socket: mikudos.Socket): Promise<boolean> { return (await socket.mikudos.app.clientRooms(socket)).includes(room); } }