add heartbeats, better websocket disconnection handling

This commit is contained in:
Evan
2024-12-06 12:36:57 -08:00
parent 89f04739e7
commit b8db74247f
5 changed files with 76 additions and 44 deletions
+5 -2
View File
@@ -1,11 +1,14 @@
import WebSocket from 'ws';
import {ClientID} from '../core/Schemas';
import { ClientID } from '../core/Schemas';
export class Client {
public lastPing: number
constructor(
public readonly id: ClientID,
public readonly ip: string | null,
public readonly ws: WebSocket
public readonly ws: WebSocket,
) { }
}