1
0
forked from noxious/client

New login design, added basic logic for multiplayer (WIP)

This commit is contained in:
2024-05-04 00:27:55 +02:00
parent f63cc93454
commit b16863a363
18 changed files with 206 additions and 78 deletions

View File

@ -1,25 +0,0 @@
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();