diff --git a/src/services/socketio.service.ts b/src/services/socketio.service.ts index cd03b49..a37c8d0 100644 --- a/src/services/socketio.service.ts +++ b/src/services/socketio.service.ts @@ -8,6 +8,18 @@ class SocketioService { 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(); \ No newline at end of file