import { io, Socket } from 'socket.io-client' import config from '@/config'; class SocketioService { socket: Socket | undefined; constructor() {} setupSocketConnection(): void { this.socket = io(config.server_endpoint as string); } disconnect(): void { if (this.socket) { this.socket.disconnect(); } } registerAccount(account: string): void { if (this.socket) { this.socket.emit('register', account); } } } export default new SocketioService();